Class XppFactory

java.lang.Object
com.thoughtworks.xstream.io.xml.xppdom.XppFactory

public class XppFactory extends Object
XmlPullParser utility methods.
Since:
1.4.1
  • Constructor Details

    • XppFactory

      public XppFactory()
  • Method Details

    • 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(String xml) throws org.xmlpull.v1.XmlPullParserException, 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
      IOException - if the data cannot be read
      Since:
      1.4.1
      See Also:
    • buildDom

      public static XppDom buildDom(Reader r) throws org.xmlpull.v1.XmlPullParserException, 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
      IOException - if the data cannot be read
      Since:
      1.4.1
      See Also:
    • buildDom

      public static XppDom buildDom(InputStream in, String encoding) throws org.xmlpull.v1.XmlPullParserException, 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
      IOException - if the data cannot be read
      Since:
      1.4.1
      See Also: