ae.utils.xml.helpers

Useful ae.utils.xml helpers

Members

Functions

findNodes
XmlNode[] findNodes(XmlNode n, string tag)

Search recursively for all nodes which are tags and have the tag name tag.

findOnlyChild
XmlNode findOnlyChild(XmlNode n, string tag, XmlNodeType type)
XmlNode findOnlyChild(XmlNode n, XmlNodeType type)

Like isTag, but if n does not satisfy the criteria and it has one child node, check it recursively instead. Returns the satisfying node or null.

isTag
bool isTag(XmlNode n, string tag, XmlNodeType type)

Returns true if node n is a tag, and its tag name is tag.

newNode
XmlNode newNode(XmlNodeType type, string tag, string[string] attributes, XmlNode[] children)

Create a new node with the given properties.

newNode
XmlNode newNode(string tag, string[string] attributes, XmlNode[] children)

Create a tag new node with the given properties.

newTextNode
XmlNode newTextNode(string text)

Create a text node with the given contents.

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Vladimir Panteleev <ae@cy.md>