DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.

Enter additional information related to this 'class' inside the {div} macro with 'id=description'



Return Types
XmlNode



Method Summary
XmlNode[]
readXmlDocumentFromFile(argument)
Reads an XML document from a file.
XmlNode[]
readXmlDocumentFromString(argument)
Reads an XML document from a string.



Method Details

readXmlDocumentFromFile

XmlNode[]
readXmlDocumentFromFile
(argument)
Reads an XML document from a file.

Parameters

{Object} argument

Returns

XmlNode[]

Sample

// specifies a reference to a file containing valid XML
var xmlNodes = plugins.XmlReader.readXmlDocumentFromFile('c:/test.xml');
var childNodes = xmlNodes[0].getChildNodes();
// shows a dialog to open an xml file, then reads the file
var xmlFile = plugins.file.showFileOpenDialog(1);
var xmlNodes = plugins.XmlReader.readXmlDocumentFromFile(xmlFile);
var childNodes = xmlNodes[0].getChildNodes();
 

readXmlDocumentFromString

XmlNode[]
readXmlDocumentFromString
(argument)
Reads an XML document from a string.

Parameters

{String} argument

Returns

XmlNode[]

Sample

var xmlString = '<books><book price="44.95">' +
'<title>Core Java 1.5</title>' +
'<author>Piet Klerksen</author>' +
'<nrPages>1487</nrPages>' +
'</book>' +
'<book price="59.95">' +
'<title>Developing with Servoy</title>' +
'<author>Cheryl Owens and others</author><nrPages>492</nrPages></book></books>';
var xmlNodes = plugins.XmlReader.readXmlDocumentFromString(xmlString);