Child pages
  • XmlNode

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
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 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)
String[]
Table Cell (td)
getAttributeNames()
Return all the attribute names of the current node.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getAttributeValue(attributeName)
Return the value of the named attribute.
Table Row (tr)
Table Cell (td)
XmlNode[]
Table Cell (td)
getChildNodes()
Return the child nodes of the current node.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getName()
Return the name of the XML node element.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getTextValue()
Return the text-value of the XML node element.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getType()
Return the type of the XML node element.



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)
idgetAttributeNames
Table Row (tr)
idname
Table Cell (td)

getAttributeNames

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String[]
Span
stylefont-weight: bold;
getAttributeNames
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Return all the attribute names of the current node.
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

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

getAttributeValue

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getAttributeValue
Span
(attributeName)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Return the value of the named attribute.
Table Row (tr)
idprs
Table Cell (td)

Parameters

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

Returns

Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)

Sample

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

getChildNodes

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
XmlNode[]
Span
stylefont-weight: bold;
getChildNodes
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Return the child nodes of the current node.
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

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

getName

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getName
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Return the name of the XML node element.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)

Sample

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

getTextValue

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getTextValue
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Return the text-value of the XML node element.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)

Sample

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

getType

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getType
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Return the type of the XML node element.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)

Sample

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