@jhulford/libxmljs - v0.0.1-alpha.3
    Preparing search index...

    Class XMLElement

    Hierarchy (View Summary)

    Index

    Methods

    • set multiple attributes BREAKING CHANGE: no longer overloaded for setting single attr

      Parameters

      • attributes: XMLAttributeMap

      Returns XMLElement

    • Parameters

      • xpath: string
      • Optionalnamespace: XPathNamespace

      Returns xmlXPathObjectPtr

    • Find decendant nodes matching the given xpath selector

      Parameters

      • xpath: string

        XPath selector

      • Optionalnamespace: XPathNamespace

        optional namespace

      Returns XMLXPathNode[]

      array of matching decendant nodes

    • Find the first decendant node matching the given xpath selector

      Parameters

      • xpath: string

        XPath selector

      • Optionalnamespace: XPathNamespace

        optional namespace

      Returns string | number | boolean | XMLXPathNode | null

      first matching decendant node

    • Get the line number that this node starts on in the original parsed document

      Returns number

      line number

    • Get the tag name of current node

      Parameters

      • Optionalvalue: string

      Returns string

      name

    • Get an array of namespaces that appy to the current node

      Parameters

      • onlyLocal: boolean = false

        whether to include inherited namespaces

      Returns XMLNamespace[]

      an array of namespaces for the current node

    • Create a new element with the given name and content, then append it as a child of the current node

      Parameters

      • name: string
      • Optionalcontent: string

      Returns XMLElement

      the appended element

      XMLNode.createElement

    • Parameters

      • Optionalcontent: string

      Returns string

    • Get the type of element (XMLElementType)

      "text" | "cdata" | "comment" | "element" | "node"

      Returns
          | "document"
          | "text"
          | "node"
          | "element"
          | "attribute"
          | "cdata"
          | "entity_ref"
          | "entity"
          | "pi"
          | "comment"
          | "document_type"
          | "document_frag"
          | "notation"
          | "html_document"
          | "dtd"
          | "element_decl"
          | "attribute_decl"
          | "entity_decl"
          | "namespace_decl"
          | "xinclude_start"
          | "xinclude_end"
          | "docb_document"

      the node type