Hierarchy

  • XmlNamedNode
    • XmlElement

Accessors

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

    Returns string

  • get firstChild(): null | XmlNode
  • The node of first child.

    Note that children of an element won't include attributes

    Return null if this node has no child

    Returns null | XmlNode

  • get lastChild(): null | XmlNode
  • The node of last child.

    Note that children of an element won't include attributes

    Return null if this node has no child

    Returns null | XmlNode

  • get line(): number
  • The line number of the node.

    Returns number

  • get name(): string
  • The name of this node.

    Returns string

  • get namespacePrefix(): string
  • The prefix representing the namespace applied to this node.

    Returns string

  • get namespaceUri(): string
  • The URI of the namespace applied to this node.

    Returns string

  • get parent(): null | XmlNode
  • The parent node of this node.

    For root node, it's parent is null.

    Returns null | XmlNode

Methods

  • Get the attribute of this element. Return null if the attribute doesn't exist.

    Parameters

    • name: string

      The name of the attribute

    • Optionalprefix: string

      The prefix to the namespace

    Returns null | XmlAttribute

  • Find out corresponding namespace uri of a prefix

    Parameters

    • prefix: string

    Returns null | string