Package ghidra.xml

Class XmlTreeNode


  • public class XmlTreeNode
    extends java.lang.Object
    A class to represent a corresponding start and end tag. This value is one node on the XML parse tree.
    • 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