Package ghidra.xml

Class NonThreadedXmlPullParserImpl

java.lang.Object
ghidra.xml.AbstractXmlPullParser
ghidra.xml.NonThreadedXmlPullParserImpl
All Implemented Interfaces:
XmlPullParser

public class NonThreadedXmlPullParserImpl extends AbstractXmlPullParser
  • Constructor Details

  • Method Details

    • dispose

      public void dispose()
      Description copied from interface: XmlPullParser
      Disposes all resources of the parser. It's important that this is called when a client is finished with the parser, because this allows files to be closed, threads to be stopped, etc.
    • getName

      public String getName()
      Description copied from interface: XmlPullParser
      Returns the name of this parser.
      Returns:
      the name of this parser
    • getProcessingInstruction

      public String getProcessingInstruction(String piName, String attribute)
      Description copied from interface: XmlPullParser
      Returns the value of the attribute of the processing instruction. For example, <?program_dtd version="1"?>
      Parameters:
      piName - the name of the processing instruction
      attribute - the name of the attribute
      Returns:
      the value of the attribute of the processing instruction
    • hasNext

      public boolean hasNext()
      Description copied from interface: XmlPullParser
      Returns whether there is a next element.
      Returns:
      whether there is a next element
    • isPullingContent

      public boolean isPullingContent()
      Description copied from interface: XmlPullParser
      Returns whether the parser will return content elements as well as start and end elements (they're always accumulated and provided in the appropriate end element).
      Returns:
      whether the parser will return content elements
    • next

      public XmlElement next()
      Description copied from interface: XmlPullParser
      Returns the next element, removing it from the queue (assuming there is such a next element). This method should be used RARELY. Typically, when you're reading XML, you almost always at least know that you're either starting or ending a subtree, so start() or end() should be used instead. The only time you really might need to use this is if you don't really know where you are and you need to pop elements off until you synchronize back into a sane state.
      Returns:
      the next element, removing it
    • peek

      public XmlElement peek()
      Description copied from interface: XmlPullParser
      Returns the next element, without removing it from the queue (assuming there is such a next element). This is very useful for examining the next item to decide who should handle the subtree, and then delegating to a subordinate with the parser state intact.
      Returns:
      the next element, without removing it
    • setPullingContent

      public void setPullingContent(boolean pullingContent)
      Description copied from interface: XmlPullParser
      Set whether the parser will return content elements. Note that this method may throw an exception if the parser cannot comply with the setting (usually when setting to true).
      Parameters:
      pullingContent - whether the parser will return content elements