Child pages
  • XmlNode

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{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 sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[String]\[]{td}{td}[#getAttributeNames]\()
Return all the attribute names of the current node.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getAttributeValue]\()
Return the value of the named attribute.{td}{tr}{tbody}{tbody}{tr}{td}[XmlNode]\[]{td}{td}[#getChildNodes]\()
Return the child nodes of the current node.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getName]\()
Return the name of the XML node element.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getTextValue]\()
Return the text-value of the XML node element.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getType]\()
Return the type of the XML node element.{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=3864E5CF39AC861A-5CD73D4E-44994B7A-A00FB432-C6C2CC06F0C296768887C254}{tr:id=name}{td}h6.getAttributeNames{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getAttributeNames{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:3864E5CF39AC861A-5CD73D4E-44994B7A-A00FB432-C6C2CC06F0C296768887C254_des|text=|trigger=button}{sub-section}{sub-section:3864E5CF39AC861A-5CD73D4E-44994B7A-A00FB432-C6C2CC06F0C296768887C254_des|trigger=none|class=sIndent}Return all the attribute names of the current node.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:3864E5CF39AC861A-5CD73D4E-44994B7A-A00FB432-C6C2CC06F0C296768887C254_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3864E5CF39AC861A-5CD73D4E-44994B7A-A00FB432-C6C2CC06F0C296768887C254_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:3864E5CF39AC861A-5CD73D4E-44994B7A-A00FB432-C6C2CC06F0C296768887C254_ret|text=|trigger=button}{sub-section}{sub-section:3864E5CF39AC861A-5CD73D4E-44994B7A-A00FB432-C6C2CC06F0C296768887C254_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3864E5CF39AC861A-5CD73D4E-44994B7A-A00FB432-C6C2CC06F0C296768887C254_see|text=|trigger=button}{sub-section}{sub-section:3864E5CF39AC861A-5CD73D4E-44994B7A-A00FB432-C6C2CC06F0C296768887C254_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3864E5CF39AC861A-5CD73D4E-44994B7A-A00FB432-C6C2CC06F0C296768887C254_see|text=|trigger=button}{sub-section}{sub-section:3864E5CF39AC861A-5CD73D4E-44994B7A-A00FB432-C6C2CC06F0C296768887C254_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3864E5CF39AC861A-5CD73D4E-44994B7A-A00FB432-C6C2CC06F0C296768887C254_sam|text=|trigger=button}{sub-section}{sub-section:3864E5CF39AC861A-5CD73D4E-44994B7A-A00FB432-C6C2CC06F0C296768887C254_sam|class=sIndent|trigger=none}{code:language=javascript}
nodes = plugins.XmlReader.readXmlDocumentFromString("<root attr1='value1' attr2='value2'/>")
rootNode = nodes[0];
attributes = rootNode.getAttributeNames();
application.output(attributes[0])
application.output(attributes[1])
val1 = rootNode.getAttributeValue('attr1');
application.output(val1)
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=CEA3AAAA95CBBA84-37F8FE19-4B6547EF-8BE89465-A99D0899D5467C398E0A3FE6}{tr:id=name}{td}h6.getAttributeValue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getAttributeValue{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:CEA3AAAA95CBBA84-37F8FE19-4B6547EF-8BE89465-A99D0899D5467C398E0A3FE6_des|text=|trigger=button}{sub-section}{sub-section:CEA3AAAA95CBBA84-37F8FE19-4B6547EF-8BE89465-A99D0899D5467C398E0A3FE6_des|trigger=none|class=sIndent}Return the value of the named attribute.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:CEA3AAAA95CBBA84-37F8FE19-4B6547EF-8BE89465-A99D0899D5467C398E0A3FE6_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CEA3AAAA95CBBA84-37F8FE19-4B6547EF-8BE89465-A99D0899D5467C398E0A3FE6_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:CEA3AAAA95CBBA84-37F8FE19-4B6547EF-8BE89465-A99D0899D5467C398E0A3FE6_ret|text=|trigger=button}{sub-section}{sub-section:CEA3AAAA95CBBA84-37F8FE19-4B6547EF-8BE89465-A99D0899D5467C398E0A3FE6_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:CEA3AAAA95CBBA84-37F8FE19-4B6547EF-8BE89465-A99D0899D5467C398E0A3FE6_see|text=|trigger=button}{sub-section}{sub-section:CEA3AAAA95CBBA84-37F8FE19-4B6547EF-8BE89465-A99D0899D5467C398E0A3FE6_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:CEA3AAAA95CBBA84-37F8FE19-4B6547EF-8BE89465-A99D0899D5467C398E0A3FE6_see|text=|trigger=button}{sub-section}{sub-section:CEA3AAAA95CBBA84-37F8FE19-4B6547EF-8BE89465-A99D0899D5467C398E0A3FE6_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:CEA3AAAA95CBBA84-37F8FE19-4B6547EF-8BE89465-A99D0899D5467C398E0A3FE6_sam|text=|trigger=button}{sub-section}{sub-section:CEA3AAAA95CBBA84-37F8FE19-4B6547EF-8BE89465-A99D0899D5467C398E0A3FE6_sam|class=sIndent|trigger=none}{code:language=javascript}
nodes = plugins.XmlReader.readXmlDocumentFromString("<root attr1='value1' attr2='value2'/>")
rootNode = nodes[0];
attributes = rootNode.getAttributeNames();
application.output(attributes[0])
application.output(attributes[1])
val1 = rootNode.getAttributeValue('attr1');
application.output(val1)
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=103C45C63AE538AC-D4E75E83-478C4516-A4869499-4338AB25F97DD6153A93166E}{tr:id=name}{td}h6.getChildNodes{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[XmlNode]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getChildNodes{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:103C45C63AE538AC-D4E75E83-478C4516-A4869499-4338AB25F97DD6153A93166E_des|text=|trigger=button}{sub-section}{sub-section:103C45C63AE538AC-D4E75E83-478C4516-A4869499-4338AB25F97DD6153A93166E_des|trigger=none|class=sIndent}Return the child nodes of the current node.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:103C45C63AE538AC-D4E75E83-478C4516-A4869499-4338AB25F97DD6153A93166E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:103C45C63AE538AC-D4E75E83-478C4516-A4869499-4338AB25F97DD6153A93166E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:103C45C63AE538AC-D4E75E83-478C4516-A4869499-4338AB25F97DD6153A93166E_ret|text=|trigger=button}{sub-section}{sub-section:103C45C63AE538AC-D4E75E83-478C4516-A4869499-4338AB25F97DD6153A93166E_ret|trigger=none|class=sIndent}[XmlNode]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:103C45C63AE538AC-D4E75E83-478C4516-A4869499-4338AB25F97DD6153A93166E_see|text=|trigger=button}{sub-section}{sub-section:103C45C63AE538AC-D4E75E83-478C4516-A4869499-4338AB25F97DD6153A93166E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:103C45C63AE538AC-D4E75E83-478C4516-A4869499-4338AB25F97DD6153A93166E_see|text=|trigger=button}{sub-section}{sub-section:103C45C63AE538AC-D4E75E83-478C4516-A4869499-4338AB25F97DD6153A93166E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:103C45C63AE538AC-D4E75E83-478C4516-A4869499-4338AB25F97DD6153A93166E_sam|text=|trigger=button}{sub-section}{sub-section:103C45C63AE538AC-D4E75E83-478C4516-A4869499-4338AB25F97DD6153A93166E_sam|class=sIndent|trigger=none}{code:language=javascript}
nodes = plugins.XmlReader.readXmlDocumentFromString('<father><child1>John</child1><child2>Mary</child2></father>');
application.output(nodes[0].getName())
application.output(nodes[0].getTextValue())
application.output(nodes[0].getType())
childs = nodes[0].getChildNodes()
application.output(childs[0].getName())
application.output(childs[0].getTextValue())
application.output(childs[0].getType())
subChilds = childs[0].getChildNodes()
application.output(subChilds[0].getName())
application.output(subChilds[0].getTextValue())
application.output(subChilds[0].getType())
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=76C6D82A5769B585-7F46DCCC-47014D68-AA2DA186-72F02EBB28D1FCC45128A357}{tr:id=name}{td}h6.getName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:76C6D82A5769B585-7F46DCCC-47014D68-AA2DA186-72F02EBB28D1FCC45128A357_des|text=|trigger=button}{sub-section}{sub-section:76C6D82A5769B585-7F46DCCC-47014D68-AA2DA186-72F02EBB28D1FCC45128A357_des|trigger=none|class=sIndent}Return the name of the XML node element.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:76C6D82A5769B585-7F46DCCC-47014D68-AA2DA186-72F02EBB28D1FCC45128A357_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:76C6D82A5769B585-7F46DCCC-47014D68-AA2DA186-72F02EBB28D1FCC45128A357_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:76C6D82A5769B585-7F46DCCC-47014D68-AA2DA186-72F02EBB28D1FCC45128A357_ret|text=|trigger=button}{sub-section}{sub-section:76C6D82A5769B585-7F46DCCC-47014D68-AA2DA186-72F02EBB28D1FCC45128A357_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:76C6D82A5769B585-7F46DCCC-47014D68-AA2DA186-72F02EBB28D1FCC45128A357_see|text=|trigger=button}{sub-section}{sub-section:76C6D82A5769B585-7F46DCCC-47014D68-AA2DA186-72F02EBB28D1FCC45128A357_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:76C6D82A5769B585-7F46DCCC-47014D68-AA2DA186-72F02EBB28D1FCC45128A357_see|text=|trigger=button}{sub-section}{sub-section:76C6D82A5769B585-7F46DCCC-47014D68-AA2DA186-72F02EBB28D1FCC45128A357_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:76C6D82A5769B585-7F46DCCC-47014D68-AA2DA186-72F02EBB28D1FCC45128A357_sam|text=|trigger=button}{sub-section}{sub-section:76C6D82A5769B585-7F46DCCC-47014D68-AA2DA186-72F02EBB28D1FCC45128A357_sam|class=sIndent|trigger=none}{code:language=javascript}
nodes = plugins.XmlReader.readXmlDocumentFromString('<father><child1>John</child1><child2>Mary</child2></father>');
application.output(nodes[0].getName())
application.output(nodes[0].getTextValue())
application.output(nodes[0].getType())
childs = nodes[0].getChildNodes()
application.output(childs[0].getName())
application.output(childs[0].getTextValue())
application.output(childs[0].getType())
subChilds = childs[0].getChildNodes()
application.output(subChilds[0].getName())
application.output(subChilds[0].getTextValue())
application.output(subChilds[0].getType())
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AA93A3F8CD426300-F07D0362-437C46FD-B80BBFA5-9F67D1259470A1C6B84CE7A5}{tr:id=name}{td}h6.getTextValue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getTextValue{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:AA93A3F8CD426300-F07D0362-437C46FD-B80BBFA5-9F67D1259470A1C6B84CE7A5_des|text=|trigger=button}{sub-section}{sub-section:AA93A3F8CD426300-F07D0362-437C46FD-B80BBFA5-9F67D1259470A1C6B84CE7A5_des|trigger=none|class=sIndent}Return the text-value of the XML node element.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:AA93A3F8CD426300-F07D0362-437C46FD-B80BBFA5-9F67D1259470A1C6B84CE7A5_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AA93A3F8CD426300-F07D0362-437C46FD-B80BBFA5-9F67D1259470A1C6B84CE7A5_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:AA93A3F8CD426300-F07D0362-437C46FD-B80BBFA5-9F67D1259470A1C6B84CE7A5_ret|text=|trigger=button}{sub-section}{sub-section:AA93A3F8CD426300-F07D0362-437C46FD-B80BBFA5-9F67D1259470A1C6B84CE7A5_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AA93A3F8CD426300-F07D0362-437C46FD-B80BBFA5-9F67D1259470A1C6B84CE7A5_see|text=|trigger=button}{sub-section}{sub-section:AA93A3F8CD426300-F07D0362-437C46FD-B80BBFA5-9F67D1259470A1C6B84CE7A5_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AA93A3F8CD426300-F07D0362-437C46FD-B80BBFA5-9F67D1259470A1C6B84CE7A5_see|text=|trigger=button}{sub-section}{sub-section:AA93A3F8CD426300-F07D0362-437C46FD-B80BBFA5-9F67D1259470A1C6B84CE7A5_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AA93A3F8CD426300-F07D0362-437C46FD-B80BBFA5-9F67D1259470A1C6B84CE7A5_sam|text=|trigger=button}{sub-section}{sub-section:AA93A3F8CD426300-F07D0362-437C46FD-B80BBFA5-9F67D1259470A1C6B84CE7A5_sam|class=sIndent|trigger=none}{code:language=javascript}
nodes = plugins.XmlReader.readXmlDocumentFromString('<father><child1>John</child1><child2>Mary</child2></father>');
application.output(nodes[0].getName())
application.output(nodes[0].getTextValue())
application.output(nodes[0].getType())
childs = nodes[0].getChildNodes()
application.output(childs[0].getName())
application.output(childs[0].getTextValue())
application.output(childs[0].getType())
subChilds = childs[0].getChildNodes()
application.output(subChilds[0].getName())
application.output(subChilds[0].getTextValue())
application.output(subChilds[0].getType())
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=0194149D3011841F-090295FE-44594514-9872BAF7-0B2B28503564EEB3F2DEA8D2}{tr:id=name}{td}h6.getType{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getType{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:0194149D3011841F-090295FE-44594514-9872BAF7-0B2B28503564EEB3F2DEA8D2_des|text=|trigger=button}{sub-section}{sub-section:0194149D3011841F-090295FE-44594514-9872BAF7-0B2B28503564EEB3F2DEA8D2_des|trigger=none|class=sIndent}Return the type of the XML node element.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:0194149D3011841F-090295FE-44594514-9872BAF7-0B2B28503564EEB3F2DEA8D2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0194149D3011841F-090295FE-44594514-9872BAF7-0B2B28503564EEB3F2DEA8D2_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:0194149D3011841F-090295FE-44594514-9872BAF7-0B2B28503564EEB3F2DEA8D2_ret|text=|trigger=button}{sub-section}{sub-section:0194149D3011841F-090295FE-44594514-9872BAF7-0B2B28503564EEB3F2DEA8D2_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:0194149D3011841F-090295FE-44594514-9872BAF7-0B2B28503564EEB3F2DEA8D2_see|text=|trigger=button}{sub-section}{sub-section:0194149D3011841F-090295FE-44594514-9872BAF7-0B2B28503564EEB3F2DEA8D2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0194149D3011841F-090295FE-44594514-9872BAF7-0B2B28503564EEB3F2DEA8D2_see|text=|trigger=button}{sub-section}{sub-section:0194149D3011841F-090295FE-44594514-9872BAF7-0B2B28503564EEB3F2DEA8D2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:0194149D3011841F-090295FE-44594514-9872BAF7-0B2B28503564EEB3F2DEA8D2_sam|text=|trigger=button}{sub-section}{sub-section:0194149D3011841F-090295FE-44594514-9872BAF7-0B2B28503564EEB3F2DEA8D2_sam|class=sIndent|trigger=none}{code:language=javascript}
nodes = plugins.XmlReader.readXmlDocumentFromString('<father><child1>John</child1><child2>Mary</child2></father>');
application.output(nodes[0].getName())
application.output(nodes[0].getTextValue())
application.output(nodes[0].getType())
childs = nodes[0].getChildNodes()
application.output(childs[0].getName())
application.output(childs[0].getTextValue())
application.output(childs[0].getType())
subChilds = childs[0].getChildNodes()
application.output(subChilds[0].getName())
application.output(subChilds[0].getTextValue())
application.output(subChilds[0].getType())
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}