Child pages
  • XmlReader

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
{hidden} DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING. THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden} {sub-section:description|text=}{sub-section}\\ {table:class=servoy sReturnTypes}{tr:style=height: 30px;}{th}Return Types{th}{tr}{tr}{td}{span:class=sWordList}[XmlNode]{span}{td}{tr}{table}\\ {table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[XmlNode]\[]{td}{td}[#readXmlDocumentFromFile]\() {td}{tr}{tbody}{tbody}{tr}{td}[XmlNode]\[]{td}{td}[#readXmlDocumentFromString]\() {td}{tr}{tbody}{table}\\ {table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=5D5C1F17-5AF9-400D-8305-09839686E9A3}{tr:id=name}{td}h6.readXmlDocumentFromFile{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[XmlNode]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}readXmlDocumentFromFile{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:5D5C1F17-5AF9-400D-8305-09839686E9A3_des|text=|trigger=button}{sub-section}{sub-section:5D5C1F17-5AF9-400D-8305-09839686E9A3_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:5D5C1F17-5AF9-400D-8305-09839686E9A3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5D5C1F17-5AF9-400D-8305-09839686E9A3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:5D5C1F17-5AF9-400D-8305-09839686E9A3_ret|text=|trigger=button}{sub-section}{sub-section:5D5C1F17-5AF9-400D-8305-09839686E9A3_ret|trigger=none|class=sIndent}[XmlNode]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5D5C1F17-5AF9-400D-8305-09839686E9A3_see|text=|trigger=button}{sub-section}{sub-section:5D5C1F17-5AF9-400D-8305-09839686E9A3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5D5C1F17-5AF9-400D-8305-09839686E9A3_see|text=|trigger=button}{sub-section}{sub-section:5D5C1F17-5AF9-400D-8305-09839686E9A3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:5D5C1F17-5AF9-400D-8305-09839686E9A3_sam|text=|trigger=button}{sub-section}{sub-section:5D5C1F17-5AF9-400D-8305-09839686E9A3_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F163453F-C868-4434-A498-185EA82D692A}{tr:id=name}{td}h6.readXmlDocumentFromString{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[XmlNode]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}readXmlDocumentFromString{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:F163453F-C868-4434-A498-185EA82D692A_des|text=|trigger=button}{sub-section}{sub-section:F163453F-C868-4434-A498-185EA82D692A_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:F163453F-C868-4434-A498-185EA82D692A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F163453F-C868-4434-A498-185EA82D692A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F163453F-C868-4434-A498-185EA82D692A_ret|text=|trigger=button}{sub-section}{sub-section:F163453F-C868-4434-A498-185EA82D692A_ret|trigger=none|class=sIndent}[XmlNode]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F163453F-C868-4434-A498-185EA82D692A_see|text=|trigger=button}{sub-section}{sub-section:F163453F-C868-4434-A498-185EA82D692A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F163453F-C868-4434-A498-185EA82D692A_see|text=|trigger=button}{sub-section}{sub-section:F163453F-C868-4434-A498-185EA82D692A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:F163453F-C868-4434-A498-185EA82D692A_sam|text=|trigger=button}{sub-section}{sub-section:F163453F-C868-4434-A498-185EA82D692A_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
Wiki Markup
Div
styledisplay:none

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.

Div
iddescription



HTML Table
id
classservoy sReturnTypes
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Return Types
Table Row (tr)
Table Cell (td)
Span
classsWordList
XmlNode



HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
XmlNode[]
Table Cell (td)
readXmlDocumentFromFile(argument)
Reads an XML document from a file.
Table Row (tr)
Table Cell (td)
XmlNode[]
Table Cell (td)
readXmlDocumentFromString(argument)
Reads an XML document from a string.



HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Details
Table Body (tbody)
idreadXmlDocumentFromFile-Object
Table Row (tr)
idname
Table Cell (td)

readXmlDocumentFromFile

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
XmlNode[]
Span
stylefont-weight: bold;
readXmlDocumentFromFile
Span
(argument)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Reads an XML document from a file.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} argument
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
XmlNode[]
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// 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();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idreadXmlDocumentFromString-String
Table Row (tr)
idname
Table Cell (td)

readXmlDocumentFromString

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
XmlNode[]
Span
stylefont-weight: bold;
readXmlDocumentFromString
Span
(argument)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Reads an XML document from a string.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} argument
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
XmlNode[]
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
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);
Table Row (tr)
classlastDetailRow
Table Cell (td)