Class XppFactory


  • public class XppFactory
    extends java.lang.Object
    XmlPullParser utility methods.
    Since:
    1.4.1
    • Constructor Summary

      Constructors 
      Constructor Description
      XppFactory()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static XppDom buildDom​(java.io.InputStream in, java.lang.String encoding)
      Build an XPP DOM hierarchy from an InputStream.
      static XppDom buildDom​(java.io.Reader r)
      Build an XPP DOM hierarchy from a Reader.
      static XppDom buildDom​(java.lang.String xml)
      Build an XPP DOM hierarchy from a String.
      static org.xmlpull.v1.XmlPullParser createDefaultParser()
      Create a new XmlPullParser using the XPP factory.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XppFactory

        public XppFactory()
    • Method Detail

      • createDefaultParser

        public static org.xmlpull.v1.XmlPullParser createDefaultParser()
                                                                throws org.xmlpull.v1.XmlPullParserException
        Create a new XmlPullParser using the XPP factory.
        Returns:
        a new parser instance
        Throws:
        org.xmlpull.v1.XmlPullParserException - if the factory fails
        Since:
        1.4.1
      • buildDom

        public static XppDom buildDom​(java.lang.String xml)
                               throws org.xmlpull.v1.XmlPullParserException,
                                      java.io.IOException
        Build an XPP DOM hierarchy from a String.
        Parameters:
        xml - the XML data
        Throws:
        org.xmlpull.v1.XmlPullParserException - if the default parser cannot be created or fails with invalid XML
        java.io.IOException - if the data cannot be read
        Since:
        1.4.1
        See Also:
        XppDom.build(XmlPullParser)
      • buildDom

        public static XppDom buildDom​(java.io.Reader r)
                               throws org.xmlpull.v1.XmlPullParserException,
                                      java.io.IOException
        Build an XPP DOM hierarchy from a Reader.
        Parameters:
        r - the reader
        Throws:
        org.xmlpull.v1.XmlPullParserException - if the default parser cannot be created or fails with invalid XML
        java.io.IOException - if the data cannot be read
        Since:
        1.4.1
        See Also:
        XppDom.build(XmlPullParser)
      • buildDom

        public static XppDom buildDom​(java.io.InputStream in,
                                      java.lang.String encoding)
                               throws org.xmlpull.v1.XmlPullParserException,
                                      java.io.IOException
        Build an XPP DOM hierarchy from an InputStream.
        Parameters:
        in - the input stream
        encoding - the encoding of the input stream
        Throws:
        org.xmlpull.v1.XmlPullParserException - if the default parser cannot be created or fails with invalid XML
        java.io.IOException - if the data cannot be read
        Since:
        1.4.1
        See Also:
        XppDom.build(XmlPullParser)