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=24070F1AFC7D2875-46D8B49D-43D547C7-A85DABEC-21EF1F3B957F66BC967999D6}{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:24070F1AFC7D2875-46D8B49D-43D547C7-A85DABEC-21EF1F3B957F66BC967999D6_des|text=|trigger=button}{sub-section}{sub-section:24070F1AFC7D2875-46D8B49D-43D547C7-A85DABEC-21EF1F3B957F66BC967999D6_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:24070F1AFC7D2875-46D8B49D-43D547C7-A85DABEC-21EF1F3B957F66BC967999D6_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:24070F1AFC7D2875-46D8B49D-43D547C7-A85DABEC-21EF1F3B957F66BC967999D6_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:24070F1AFC7D2875-46D8B49D-43D547C7-A85DABEC-21EF1F3B957F66BC967999D6_ret|text=|trigger=button}{sub-section}{sub-section:24070F1AFC7D2875-46D8B49D-43D547C7-A85DABEC-21EF1F3B957F66BC967999D6_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:24070F1AFC7D2875-46D8B49D-43D547C7-A85DABEC-21EF1F3B957F66BC967999D6_see|text=|trigger=button}{sub-section}{sub-section:24070F1AFC7D2875-46D8B49D-43D547C7-A85DABEC-21EF1F3B957F66BC967999D6_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:24070F1AFC7D2875-46D8B49D-43D547C7-A85DABEC-21EF1F3B957F66BC967999D6_see|text=|trigger=button}{sub-section}{sub-section:24070F1AFC7D2875-46D8B49D-43D547C7-A85DABEC-21EF1F3B957F66BC967999D6_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:24070F1AFC7D2875-46D8B49D-43D547C7-A85DABEC-21EF1F3B957F66BC967999D6_sam|text=|trigger=button}{sub-section}{sub-section:24070F1AFC7D2875-46D8B49D-43D547C7-A85DABEC-21EF1F3B957F66BC967999D6_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=D1B5B452C9825733-987B2CB2-41B94DB4-BF45B3F9-1C46783B11DEA6F7192827B4}{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:D1B5B452C9825733-987B2CB2-41B94DB4-BF45B3F9-1C46783B11DEA6F7192827B4_des|text=|trigger=button}{sub-section}{sub-section:D1B5B452C9825733-987B2CB2-41B94DB4-BF45B3F9-1C46783B11DEA6F7192827B4_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:D1B5B452C9825733-987B2CB2-41B94DB4-BF45B3F9-1C46783B11DEA6F7192827B4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D1B5B452C9825733-987B2CB2-41B94DB4-BF45B3F9-1C46783B11DEA6F7192827B4_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D1B5B452C9825733-987B2CB2-41B94DB4-BF45B3F9-1C46783B11DEA6F7192827B4_ret|text=|trigger=button}{sub-section}{sub-section:D1B5B452C9825733-987B2CB2-41B94DB4-BF45B3F9-1C46783B11DEA6F7192827B4_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D1B5B452C9825733-987B2CB2-41B94DB4-BF45B3F9-1C46783B11DEA6F7192827B4_see|text=|trigger=button}{sub-section}{sub-section:D1B5B452C9825733-987B2CB2-41B94DB4-BF45B3F9-1C46783B11DEA6F7192827B4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D1B5B452C9825733-987B2CB2-41B94DB4-BF45B3F9-1C46783B11DEA6F7192827B4_see|text=|trigger=button}{sub-section}{sub-section:D1B5B452C9825733-987B2CB2-41B94DB4-BF45B3F9-1C46783B11DEA6F7192827B4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D1B5B452C9825733-987B2CB2-41B94DB4-BF45B3F9-1C46783B11DEA6F7192827B4_sam|text=|trigger=button}{sub-section}{sub-section:D1B5B452C9825733-987B2CB2-41B94DB4-BF45B3F9-1C46783B11DEA6F7192827B4_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=150A0A599FB5619B-9A599B8E-4CA3482D-A0188528-94E1483A5316C458E78B41BD}{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:150A0A599FB5619B-9A599B8E-4CA3482D-A0188528-94E1483A5316C458E78B41BD_des|text=|trigger=button}{sub-section}{sub-section:150A0A599FB5619B-9A599B8E-4CA3482D-A0188528-94E1483A5316C458E78B41BD_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:150A0A599FB5619B-9A599B8E-4CA3482D-A0188528-94E1483A5316C458E78B41BD_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:150A0A599FB5619B-9A599B8E-4CA3482D-A0188528-94E1483A5316C458E78B41BD_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:150A0A599FB5619B-9A599B8E-4CA3482D-A0188528-94E1483A5316C458E78B41BD_ret|text=|trigger=button}{sub-section}{sub-section:150A0A599FB5619B-9A599B8E-4CA3482D-A0188528-94E1483A5316C458E78B41BD_ret|trigger=none|class=sIndent}[XmlNode]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:150A0A599FB5619B-9A599B8E-4CA3482D-A0188528-94E1483A5316C458E78B41BD_see|text=|trigger=button}{sub-section}{sub-section:150A0A599FB5619B-9A599B8E-4CA3482D-A0188528-94E1483A5316C458E78B41BD_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:150A0A599FB5619B-9A599B8E-4CA3482D-A0188528-94E1483A5316C458E78B41BD_see|text=|trigger=button}{sub-section}{sub-section:150A0A599FB5619B-9A599B8E-4CA3482D-A0188528-94E1483A5316C458E78B41BD_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:150A0A599FB5619B-9A599B8E-4CA3482D-A0188528-94E1483A5316C458E78B41BD_sam|text=|trigger=button}{sub-section}{sub-section:150A0A599FB5619B-9A599B8E-4CA3482D-A0188528-94E1483A5316C458E78B41BD_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=1F6259616CD5BC8E-12D9C849-49254D09-B9FB9A21-0AB61C43A47173C18CED2D32}{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:1F6259616CD5BC8E-12D9C849-49254D09-B9FB9A21-0AB61C43A47173C18CED2D32_des|text=|trigger=button}{sub-section}{sub-section:1F6259616CD5BC8E-12D9C849-49254D09-B9FB9A21-0AB61C43A47173C18CED2D32_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:1F6259616CD5BC8E-12D9C849-49254D09-B9FB9A21-0AB61C43A47173C18CED2D32_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1F6259616CD5BC8E-12D9C849-49254D09-B9FB9A21-0AB61C43A47173C18CED2D32_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1F6259616CD5BC8E-12D9C849-49254D09-B9FB9A21-0AB61C43A47173C18CED2D32_ret|text=|trigger=button}{sub-section}{sub-section:1F6259616CD5BC8E-12D9C849-49254D09-B9FB9A21-0AB61C43A47173C18CED2D32_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1F6259616CD5BC8E-12D9C849-49254D09-B9FB9A21-0AB61C43A47173C18CED2D32_see|text=|trigger=button}{sub-section}{sub-section:1F6259616CD5BC8E-12D9C849-49254D09-B9FB9A21-0AB61C43A47173C18CED2D32_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1F6259616CD5BC8E-12D9C849-49254D09-B9FB9A21-0AB61C43A47173C18CED2D32_see|text=|trigger=button}{sub-section}{sub-section:1F6259616CD5BC8E-12D9C849-49254D09-B9FB9A21-0AB61C43A47173C18CED2D32_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1F6259616CD5BC8E-12D9C849-49254D09-B9FB9A21-0AB61C43A47173C18CED2D32_sam|text=|trigger=button}{sub-section}{sub-section:1F6259616CD5BC8E-12D9C849-49254D09-B9FB9A21-0AB61C43A47173C18CED2D32_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=835CE5372FE33093-95F5CA98-44B24B73-AB7A8D08-E20C2E946680A83F8DBC0898}{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:835CE5372FE33093-95F5CA98-44B24B73-AB7A8D08-E20C2E946680A83F8DBC0898_des|text=|trigger=button}{sub-section}{sub-section:835CE5372FE33093-95F5CA98-44B24B73-AB7A8D08-E20C2E946680A83F8DBC0898_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:835CE5372FE33093-95F5CA98-44B24B73-AB7A8D08-E20C2E946680A83F8DBC0898_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:835CE5372FE33093-95F5CA98-44B24B73-AB7A8D08-E20C2E946680A83F8DBC0898_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:835CE5372FE33093-95F5CA98-44B24B73-AB7A8D08-E20C2E946680A83F8DBC0898_ret|text=|trigger=button}{sub-section}{sub-section:835CE5372FE33093-95F5CA98-44B24B73-AB7A8D08-E20C2E946680A83F8DBC0898_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:835CE5372FE33093-95F5CA98-44B24B73-AB7A8D08-E20C2E946680A83F8DBC0898_see|text=|trigger=button}{sub-section}{sub-section:835CE5372FE33093-95F5CA98-44B24B73-AB7A8D08-E20C2E946680A83F8DBC0898_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:835CE5372FE33093-95F5CA98-44B24B73-AB7A8D08-E20C2E946680A83F8DBC0898_see|text=|trigger=button}{sub-section}{sub-section:835CE5372FE33093-95F5CA98-44B24B73-AB7A8D08-E20C2E946680A83F8DBC0898_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:835CE5372FE33093-95F5CA98-44B24B73-AB7A8D08-E20C2E946680A83F8DBC0898_sam|text=|trigger=button}{sub-section}{sub-section:835CE5372FE33093-95F5CA98-44B24B73-AB7A8D08-E20C2E946680A83F8DBC0898_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=00E836B9858E6F7D-15E37D13-4DE44692-A5EA9C90-92BF50B68AA6540B29292365}{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:00E836B9858E6F7D-15E37D13-4DE44692-A5EA9C90-92BF50B68AA6540B29292365_des|text=|trigger=button}{sub-section}{sub-section:00E836B9858E6F7D-15E37D13-4DE44692-A5EA9C90-92BF50B68AA6540B29292365_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:00E836B9858E6F7D-15E37D13-4DE44692-A5EA9C90-92BF50B68AA6540B29292365_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:00E836B9858E6F7D-15E37D13-4DE44692-A5EA9C90-92BF50B68AA6540B29292365_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:00E836B9858E6F7D-15E37D13-4DE44692-A5EA9C90-92BF50B68AA6540B29292365_ret|text=|trigger=button}{sub-section}{sub-section:00E836B9858E6F7D-15E37D13-4DE44692-A5EA9C90-92BF50B68AA6540B29292365_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:00E836B9858E6F7D-15E37D13-4DE44692-A5EA9C90-92BF50B68AA6540B29292365_see|text=|trigger=button}{sub-section}{sub-section:00E836B9858E6F7D-15E37D13-4DE44692-A5EA9C90-92BF50B68AA6540B29292365_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:00E836B9858E6F7D-15E37D13-4DE44692-A5EA9C90-92BF50B68AA6540B29292365_see|text=|trigger=button}{sub-section}{sub-section:00E836B9858E6F7D-15E37D13-4DE44692-A5EA9C90-92BF50B68AA6540B29292365_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:00E836B9858E6F7D-15E37D13-4DE44692-A5EA9C90-92BF50B68AA6540B29292365_sam|text=|trigger=button}{sub-section}{sub-section:00E836B9858E6F7D-15E37D13-4DE44692-A5EA9C90-92BF50B68AA6540B29292365_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}