Skip to content

# skip

## `xsdata.formats.dataclass.parsers.nodes.skip`

### `SkipNode`

Bases: `XmlNode`

Utility node to skip parsing unknown properties.

Source code in `xsdata/formats/dataclass/parsers/nodes/skip.py`

     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21

    class SkipNode(XmlNode):
        """Utility node to skip parsing unknown properties."""

        __slots__ = "ns_map"

        def __init__(self):
            """Initialize the xml node."""
            self.ns_map = {}

        def child(self, qname: str, attrs: dict, ns_map: dict, position: int) -> XmlNode:
            """Skip nodes children are skipped as well."""
            return self

        def bind(
            self, qname: str, text: str | None, tail: str | None, objects: list
        ) -> bool:
            """Skip nodes are not building any objects."""
            return False

#### `__init__()`

Initialize the xml node.

Source code in `xsdata/formats/dataclass/parsers/nodes/skip.py`

     9
    10
    11

    def __init__(self):
        """Initialize the xml node."""
        self.ns_map = {}

#### `child(qname, attrs, ns_map, position)`

Skip nodes children are skipped as well.

Source code in `xsdata/formats/dataclass/parsers/nodes/skip.py`

    13
    14
    15

    def child(self, qname: str, attrs: dict, ns_map: dict, position: int) -> XmlNode:
        """Skip nodes children are skipped as well."""
        return self

#### `bind(qname, text, tail, objects)`

Skip nodes are not building any objects.

Source code in `xsdata/formats/dataclass/parsers/nodes/skip.py`

    17
    18
    19
    20
    21

    def bind(
        self, qname: str, text: str | None, tail: str | None, objects: list
    ) -> bool:
        """Skip nodes are not building any objects."""
        return False