Class to search through a XML tree. Example usage of this class can be found in Translator.

Constructors

Methods

Constructors

  • Parameters

    • node: XMLChild

      The root node from which to search from. To obtain the root node of a XML document, use the global function XML.decode(documentString) (it is declared in native_defs.d.ts and implemented in lua/shared/xml.lua).

    Returns XMLSearchNode

Methods

  • Returns the node as a XMLNode. Useful for getting the attributes of the node.

    Returns XMLNode

    The node as a XMLNode

  • Returns string

    The inner text of the node (e.g. <entry>text</entry> => "text")

  • Searches for all children nodes that match the search parameters

    Parameters

    • params: XMLSearchParams

      The search parameters

    Returns XMLSearchNode[]

    An array of XMLSearchNode objects that match the search parameters