Package ghidra.xml
Class XmlTreeNode
- java.lang.Object
-
- ghidra.xml.XmlTreeNode
-
public class XmlTreeNode extends java.lang.ObjectA class to represent a corresponding start and end tag. This value is one node on the XML parse tree.
-
-
Constructor Summary
Constructors Constructor Description XmlTreeNode(XmlPullParser parser)Constructs a new XML tree node given the specified parser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteChildNode(XmlTreeNode node)Deletes the specified child node.XmlTreeNodegetChild(java.lang.String name)Returns the first child element with the specified name.XmlTreeNodegetChildAt(int index)intgetChildCount()Returns the number of children below this node.java.util.Iterator<XmlTreeNode>getChildren()Returns an iterator over all of the children of this node.java.util.Iterator<XmlTreeNode>getChildren(java.lang.String name)Returns an iterator over all of the children of this node with the specfied name.XmlElementgetEndElement()Returns the end element of this node.XmlElementgetStartElement()Returns the start element of this node.
-
-
-
Constructor Detail
-
XmlTreeNode
public XmlTreeNode(XmlPullParser parser) throws org.xml.sax.SAXParseException
Constructs a new XML tree node given the specified parser.- Parameters:
parser- the XML parser- Throws:
org.xml.sax.SAXParseException- if an XML parser error occurs
-
-
Method Detail
-
getStartElement
public XmlElement getStartElement()
Returns the start element of this node.- Returns:
- the start element of this node
-
getEndElement
public XmlElement 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
public java.util.Iterator<XmlTreeNode> getChildren()
Returns an iterator over all of the children of this node.- Returns:
- an iterator over all of the children of this node
-
getChildren
public java.util.Iterator<XmlTreeNode> getChildren(java.lang.String name)
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
public XmlTreeNode getChild(java.lang.String name)
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
public XmlTreeNode getChildAt(int index)
-
deleteChildNode
public void deleteChildNode(XmlTreeNode node)
Deletes the specified child node.- Parameters:
node- the node to delete
-
-