Class XmlNodeAbstract

The base class for all types of XML nodes.

Hierarchy (View Summary)

Accessors

Methods

Accessors

  • get content(): string
  • The content string of the node.

    Returns string

  • get line(): number
  • The line number of the node if the node is parsed from an XML document.

    Returns number

Methods

  • Find all the descendant nodes matching the given compiled xpath selector.

    Parameters

    Returns XmlNode[]

    An empty array if the provided XPath is invalid or if no nodes are found.

  • Find all the descendant nodes matching the given xpath selector.

    Parameters

    • xpath: string

      XPath selector

    • Optionalnamespaces: NamespaceMap

      mapping between prefix and the namespace URI, used in the XPath

    Returns XmlNode[]

    An empty array if the provided XPath is invalid or if no nodes are found.

  • Remove the node from its parent.

    Returns void