Package org.gjt.xpp

Interface XmlPullNode

    • Method Detail

      • resetPullNode

        void resetPullNode()
      • isFinished

        boolean isFinished()
        Is pull parsing of node finished.
      • getPullParser

        XmlPullParser getPullParser()
                             throws java.io.IOException,
                                    XmlPullParserException
        Get parser that is use to build this node tree and this pull node becomes finished - the caller is responsibile to move pull parser state to the end tag of this node (or parent pull node will be left in unconsistent state!!!!). The returned pull parser position will be before start tag of next child or before final end tag and the caller should use next() to move parser to start reading children. The node state becomes finished and subsequent call to this method will throw exception until setPullParser() is called. The final effect should be equivalen to calling skipNode()!

        NOTE: this pull node must be in unfinished state or exception will be thrown

        Throws:
        java.io.IOException
        XmlPullParserException
      • getChildrenCountSoFar

        int getChildrenCountSoFar()
      • children

        java.util.Enumeration children()
        This is not recommened method to pull children when node is not finished (use readNextChild() instead) as Enumeration interface does not allow to throw XmlPullParserException so any parsing exeption is wrapped into RuntimeException making code more messy...
        Specified by:
        children in interface XmlNode
        See Also:
        readNextChild()
      • readNextChild

        java.lang.Object readNextChild()
                                throws XmlPullParserException,
                                       java.io.IOException
        This is preferred method to pull children (children() requires .wrapping object Enumeration).
        Returns:
        next child (which is String or XmlPullNode) or null if there is no re children
        Throws:
        XmlPullParserException
        java.io.IOException
        See Also:
        children()