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=F39900C23864E5CF-F09B5CD7-42494499-8206A00F-CB8BFDF9B946C6C2CC06F0C2}{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:F39900C23864E5CF-F09B5CD7-42494499-8206A00F-CB8BFDF9B946C6C2CC06F0C2_des|text=|trigger=button}{sub-section}{sub-section:F39900C23864E5CF-F09B5CD7-42494499-8206A00F-CB8BFDF9B946C6C2CC06F0C2_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:F39900C23864E5CF-F09B5CD7-42494499-8206A00F-CB8BFDF9B946C6C2CC06F0C2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F39900C23864E5CF-F09B5CD7-42494499-8206A00F-CB8BFDF9B946C6C2CC06F0C2_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F39900C23864E5CF-F09B5CD7-42494499-8206A00F-CB8BFDF9B946C6C2CC06F0C2_ret|text=|trigger=button}{sub-section}{sub-section:F39900C23864E5CF-F09B5CD7-42494499-8206A00F-CB8BFDF9B946C6C2CC06F0C2_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F39900C23864E5CF-F09B5CD7-42494499-8206A00F-CB8BFDF9B946C6C2CC06F0C2_see|text=|trigger=button}{sub-section}{sub-section:F39900C23864E5CF-F09B5CD7-42494499-8206A00F-CB8BFDF9B946C6C2CC06F0C2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F39900C23864E5CF-F09B5CD7-42494499-8206A00F-CB8BFDF9B946C6C2CC06F0C2_see|text=|trigger=button}{sub-section}{sub-section:F39900C23864E5CF-F09B5CD7-42494499-8206A00F-CB8BFDF9B946C6C2CC06F0C2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F39900C23864E5CF-F09B5CD7-42494499-8206A00F-CB8BFDF9B946C6C2CC06F0C2_sam|text=|trigger=button}{sub-section}{sub-section:F39900C23864E5CF-F09B5CD7-42494499-8206A00F-CB8BFDF9B946C6C2CC06F0C2_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=BA8C8F7FCEA3AAAA-95CB37F8-43DB4B65-A0668BE8-F6735B0C21E7A99D0899D546}{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:BA8C8F7FCEA3AAAA-95CB37F8-43DB4B65-A0668BE8-F6735B0C21E7A99D0899D546_des|text=|trigger=button}{sub-section}{sub-section:BA8C8F7FCEA3AAAA-95CB37F8-43DB4B65-A0668BE8-F6735B0C21E7A99D0899D546_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:BA8C8F7FCEA3AAAA-95CB37F8-43DB4B65-A0668BE8-F6735B0C21E7A99D0899D546_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BA8C8F7FCEA3AAAA-95CB37F8-43DB4B65-A0668BE8-F6735B0C21E7A99D0899D546_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:BA8C8F7FCEA3AAAA-95CB37F8-43DB4B65-A0668BE8-F6735B0C21E7A99D0899D546_ret|text=|trigger=button}{sub-section}{sub-section:BA8C8F7FCEA3AAAA-95CB37F8-43DB4B65-A0668BE8-F6735B0C21E7A99D0899D546_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BA8C8F7FCEA3AAAA-95CB37F8-43DB4B65-A0668BE8-F6735B0C21E7A99D0899D546_see|text=|trigger=button}{sub-section}{sub-section:BA8C8F7FCEA3AAAA-95CB37F8-43DB4B65-A0668BE8-F6735B0C21E7A99D0899D546_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BA8C8F7FCEA3AAAA-95CB37F8-43DB4B65-A0668BE8-F6735B0C21E7A99D0899D546_see|text=|trigger=button}{sub-section}{sub-section:BA8C8F7FCEA3AAAA-95CB37F8-43DB4B65-A0668BE8-F6735B0C21E7A99D0899D546_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BA8C8F7FCEA3AAAA-95CB37F8-43DB4B65-A0668BE8-F6735B0C21E7A99D0899D546_sam|text=|trigger=button}{sub-section}{sub-section:BA8C8F7FCEA3AAAA-95CB37F8-43DB4B65-A0668BE8-F6735B0C21E7A99D0899D546_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=C0E0C87A103C45C6-7D6FD4E7-477F478C-ABC4A486-37F09D4995514338AB25F97D}{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:C0E0C87A103C45C6-7D6FD4E7-477F478C-ABC4A486-37F09D4995514338AB25F97D_des|text=|trigger=button}{sub-section}{sub-section:C0E0C87A103C45C6-7D6FD4E7-477F478C-ABC4A486-37F09D4995514338AB25F97D_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:C0E0C87A103C45C6-7D6FD4E7-477F478C-ABC4A486-37F09D4995514338AB25F97D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C0E0C87A103C45C6-7D6FD4E7-477F478C-ABC4A486-37F09D4995514338AB25F97D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C0E0C87A103C45C6-7D6FD4E7-477F478C-ABC4A486-37F09D4995514338AB25F97D_ret|text=|trigger=button}{sub-section}{sub-section:C0E0C87A103C45C6-7D6FD4E7-477F478C-ABC4A486-37F09D4995514338AB25F97D_ret|trigger=none|class=sIndent}[XmlNode]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C0E0C87A103C45C6-7D6FD4E7-477F478C-ABC4A486-37F09D4995514338AB25F97D_see|text=|trigger=button}{sub-section}{sub-section:C0E0C87A103C45C6-7D6FD4E7-477F478C-ABC4A486-37F09D4995514338AB25F97D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C0E0C87A103C45C6-7D6FD4E7-477F478C-ABC4A486-37F09D4995514338AB25F97D_see|text=|trigger=button}{sub-section}{sub-section:C0E0C87A103C45C6-7D6FD4E7-477F478C-ABC4A486-37F09D4995514338AB25F97D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C0E0C87A103C45C6-7D6FD4E7-477F478C-ABC4A486-37F09D4995514338AB25F97D_sam|text=|trigger=button}{sub-section}{sub-section:C0E0C87A103C45C6-7D6FD4E7-477F478C-ABC4A486-37F09D4995514338AB25F97D_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=C75E5F7676C6D82A-87FB7F46-484F4701-B15DAA2D-FDAB7A76BE2972F02EBB28D1}{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:C75E5F7676C6D82A-87FB7F46-484F4701-B15DAA2D-FDAB7A76BE2972F02EBB28D1_des|text=|trigger=button}{sub-section}{sub-section:C75E5F7676C6D82A-87FB7F46-484F4701-B15DAA2D-FDAB7A76BE2972F02EBB28D1_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:C75E5F7676C6D82A-87FB7F46-484F4701-B15DAA2D-FDAB7A76BE2972F02EBB28D1_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C75E5F7676C6D82A-87FB7F46-484F4701-B15DAA2D-FDAB7A76BE2972F02EBB28D1_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C75E5F7676C6D82A-87FB7F46-484F4701-B15DAA2D-FDAB7A76BE2972F02EBB28D1_ret|text=|trigger=button}{sub-section}{sub-section:C75E5F7676C6D82A-87FB7F46-484F4701-B15DAA2D-FDAB7A76BE2972F02EBB28D1_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C75E5F7676C6D82A-87FB7F46-484F4701-B15DAA2D-FDAB7A76BE2972F02EBB28D1_see|text=|trigger=button}{sub-section}{sub-section:C75E5F7676C6D82A-87FB7F46-484F4701-B15DAA2D-FDAB7A76BE2972F02EBB28D1_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C75E5F7676C6D82A-87FB7F46-484F4701-B15DAA2D-FDAB7A76BE2972F02EBB28D1_see|text=|trigger=button}{sub-section}{sub-section:C75E5F7676C6D82A-87FB7F46-484F4701-B15DAA2D-FDAB7A76BE2972F02EBB28D1_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C75E5F7676C6D82A-87FB7F46-484F4701-B15DAA2D-FDAB7A76BE2972F02EBB28D1_sam|text=|trigger=button}{sub-section}{sub-section:C75E5F7676C6D82A-87FB7F46-484F4701-B15DAA2D-FDAB7A76BE2972F02EBB28D1_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=F40A58C4AA93A3F8-164BF07D-4219437C-811FB80B-8A14A92EB5759F67D1259470}{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:F40A58C4AA93A3F8-164BF07D-4219437C-811FB80B-8A14A92EB5759F67D1259470_des|text=|trigger=button}{sub-section}{sub-section:F40A58C4AA93A3F8-164BF07D-4219437C-811FB80B-8A14A92EB5759F67D1259470_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:F40A58C4AA93A3F8-164BF07D-4219437C-811FB80B-8A14A92EB5759F67D1259470_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F40A58C4AA93A3F8-164BF07D-4219437C-811FB80B-8A14A92EB5759F67D1259470_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F40A58C4AA93A3F8-164BF07D-4219437C-811FB80B-8A14A92EB5759F67D1259470_ret|text=|trigger=button}{sub-section}{sub-section:F40A58C4AA93A3F8-164BF07D-4219437C-811FB80B-8A14A92EB5759F67D1259470_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F40A58C4AA93A3F8-164BF07D-4219437C-811FB80B-8A14A92EB5759F67D1259470_see|text=|trigger=button}{sub-section}{sub-section:F40A58C4AA93A3F8-164BF07D-4219437C-811FB80B-8A14A92EB5759F67D1259470_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F40A58C4AA93A3F8-164BF07D-4219437C-811FB80B-8A14A92EB5759F67D1259470_see|text=|trigger=button}{sub-section}{sub-section:F40A58C4AA93A3F8-164BF07D-4219437C-811FB80B-8A14A92EB5759F67D1259470_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F40A58C4AA93A3F8-164BF07D-4219437C-811FB80B-8A14A92EB5759F67D1259470_sam|text=|trigger=button}{sub-section}{sub-section:F40A58C4AA93A3F8-164BF07D-4219437C-811FB80B-8A14A92EB5759F67D1259470_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=38D1400A0194149D-834A0902-491A4459-9ACD9872-ACA3593E66DD0B2B28503564}{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:38D1400A0194149D-834A0902-491A4459-9ACD9872-ACA3593E66DD0B2B28503564_des|text=|trigger=button}{sub-section}{sub-section:38D1400A0194149D-834A0902-491A4459-9ACD9872-ACA3593E66DD0B2B28503564_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:38D1400A0194149D-834A0902-491A4459-9ACD9872-ACA3593E66DD0B2B28503564_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:38D1400A0194149D-834A0902-491A4459-9ACD9872-ACA3593E66DD0B2B28503564_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:38D1400A0194149D-834A0902-491A4459-9ACD9872-ACA3593E66DD0B2B28503564_ret|text=|trigger=button}{sub-section}{sub-section:38D1400A0194149D-834A0902-491A4459-9ACD9872-ACA3593E66DD0B2B28503564_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:38D1400A0194149D-834A0902-491A4459-9ACD9872-ACA3593E66DD0B2B28503564_see|text=|trigger=button}{sub-section}{sub-section:38D1400A0194149D-834A0902-491A4459-9ACD9872-ACA3593E66DD0B2B28503564_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:38D1400A0194149D-834A0902-491A4459-9ACD9872-ACA3593E66DD0B2B28503564_see|text=|trigger=button}{sub-section}{sub-section:38D1400A0194149D-834A0902-491A4459-9ACD9872-ACA3593E66DD0B2B28503564_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:38D1400A0194149D-834A0902-491A4459-9ACD9872-ACA3593E66DD0B2B28503564_sam|text=|trigger=button}{sub-section}{sub-section:38D1400A0194149D-834A0902-491A4459-9ACD9872-ACA3593E66DD0B2B28503564_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}