Package ghidra.xml

Class NonThreadedXmlPullParserImpl

    • Constructor Detail

      • NonThreadedXmlPullParserImpl

        public NonThreadedXmlPullParserImpl​(java.io.File file,
                                            org.xml.sax.ErrorHandler errHandler,
                                            boolean validate)
                                     throws org.xml.sax.SAXException,
                                            java.io.IOException
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
      • NonThreadedXmlPullParserImpl

        public NonThreadedXmlPullParserImpl​(java.lang.String input,
                                            java.lang.String inputName,
                                            org.xml.sax.ErrorHandler errHandler,
                                            boolean validate)
                                     throws org.xml.sax.SAXException
        Throws:
        org.xml.sax.SAXException
      • NonThreadedXmlPullParserImpl

        public NonThreadedXmlPullParserImpl​(java.io.InputStream input,
                                            java.lang.String inputName,
                                            org.xml.sax.ErrorHandler errHandler,
                                            boolean validate)
                                     throws org.xml.sax.SAXException,
                                            java.io.IOException
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
    • Method Detail

      • 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 java.lang.String getName()
        Description copied from interface: XmlPullParser
        Returns the name of this parser.
        Returns:
        the name of this parser
      • getProcessingInstruction

        public java.lang.String getProcessingInstruction​(java.lang.String piName,
                                                         java.lang.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