Class XppFactory
- java.lang.Object
-
- com.thoughtworks.xstream.io.xml.xppdom.XppFactory
-
public class XppFactory extends java.lang.ObjectXmlPullParser 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 XppDombuildDom(java.io.InputStream in, java.lang.String encoding)Build an XPP DOM hierarchy from an InputStream.static XppDombuildDom(java.io.Reader r)Build an XPP DOM hierarchy from a Reader.static XppDombuildDom(java.lang.String xml)Build an XPP DOM hierarchy from a String.static org.xmlpull.v1.XmlPullParsercreateDefaultParser()Create a new XmlPullParser using the XPP factory.
-
-
-
Method Detail
-
createDefaultParser
public static org.xmlpull.v1.XmlPullParser createDefaultParser() throws org.xmlpull.v1.XmlPullParserExceptionCreate 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 XMLjava.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 XMLjava.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 streamencoding- the encoding of the input stream- Throws:
org.xmlpull.v1.XmlPullParserException- if the default parser cannot be created or fails with invalid XMLjava.io.IOException- if the data cannot be read- Since:
- 1.4.1
- See Also:
XppDom.build(XmlPullParser)
-
-