Package ghidra.xml
Class XmlTreeNode
java.lang.Object
ghidra.xml.XmlTreeNode
A class to represent a corresponding start and end tag. This value is one
node on the XML parse tree.
-
Constructor Summary
ConstructorDescriptionXmlTreeNode
(XmlPullParser parser) Constructs a new XML tree node given the specified parser. -
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteChildNode
(XmlTreeNode node) Deletes the specified child node.Returns the first child element with the specified name.getChildAt
(int index) int
Returns the number of children below this node.Returns an iterator over all of the children of this node.getChildren
(String name) Returns an iterator over all of the children of this node with the specfied name.Returns the end element of this node.Returns the start element of this node.
-
Constructor Details
-
XmlTreeNode
Constructs a new XML tree node given the specified parser.- Parameters:
parser
- the XML parser- Throws:
SAXParseException
- if an XML parser error occurs
-
-
Method Details
-
getStartElement
Returns the start element of this node.- Returns:
- the start element of this node
-
getEndElement
Returns the end element of this node.- Returns:
- the end element of this node
-
getChildCount
public int getChildCount()Returns the number of children below this node.- Returns:
- the number of children below this node
-
getChildren
Returns an iterator over all of the children of this node.- Returns:
- an iterator over all of the children of this node
-
getChildren
Returns an iterator over all of the children of this node with the specfied name.- Parameters:
name
- the name of the desired children- Returns:
- an iterator over all of the children of this node with the specfied name
-
getChild
Returns the first child element with the specified name.- Parameters:
name
- the name of the desired child element- Returns:
- the first child element with the specified name
-
getChildAt
-
deleteChildNode
Deletes the specified child node.- Parameters:
node
- the node to delete
-