Class: XmlUtility

XmlUtility

new XmlUtility()

Class to handle XML file and data. This part is partly borrowed from Javascript - The Definitive Guide, 5th Ed and add some code of myself, mainly for Safari (do not support xmldoc.load) and including file handle
Source:

Methods

(static) getXmlDocUrl()

Get url of a XML document
Source:

(static) load()

load XML document from url.
Source:

(static) newDocument()

Create a new XML document
Source:

(static) parse()

parse Xml DOM from text, return XMLDocument
Source:

(static) parseFromJsWrappedCode()

Parse XML from a JavaScript string var
Source:

(static) serializeNode(node, options)

Serialize a XML node content to string.
Parameters:
Name Type Description
node Object
options Object Options for serializing: { prettyPrint: {Bool} whether format output JSON or use a compact one, }
Source:

(static) serializeNodePretty()

Try serialize node content to string in pretty mode. Not always possible in some browser.
Source:

(static) serializeNodeToJsCode()

wrap XML string to a JavaScript var, like "var xmlStr = '';"
Source: