Constructors
XMLNode(XMLNode)
XMLNode(String)
Methods
toString(Integer)
Creates a string containing the XMLNode as a formatted string. Child nodes are also included.toJSON(Integer)
Creates a string containing XML nodes formatted as a JSON document. Child nodes are also included.Valid types: object, array, string, number, bool, and null.
addChild(XMLNode)
Add one node as a child node of the current node.getChildren()
Returns an array of the current node’s children.setChildren(XMLNode[])
Sets an array of XMLNodes as the children of the current node.getName()
Gets the name of the XML tag.setName(String)
Sets the tag name of the node.getParameter(String)
Gets a parameter (attribute) from the node with a given name.setParameter(String, String)
Sets a parameter with name and value. A node can have any number of parameters but all names must be unique.getText()
Gets the text between two tags. For example, >TAG>Returns this text>/TAG>setText(String)
Sets the text between 2 tags.getValueFromPath(String)
This function will return the value for the given path. The path should be a dot-separated string containing either names of nodes or indices.If your path does not lead to a node, you will get a String with a null value back (can be checked with isNull()).
getNodeFromPath(String)
This function will return the XMLNode for the given path. The path should be a dot-separated string containing either names of nodes or indices.If your path does not lead to a node, you will get an empty XMLnode back.