Top Description Constructors Methods
com.thoughtworks.xstream.io.xml.xppdom

public Class XppFactory

extends Object
Class Inheritance
Imports
java.io.IOException, .InputStream, .Reader, .StringReader, org.xmlpull.v1.XmlPullParser, .XmlPullParserException, .XmlPullParserFactory

XmlPullParser utility methods.
Author
Jörg Schaible
Since
1.4.1

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static XppDom
buildDom(String
the XML data
xml
)

Build an XPP DOM hierarchy from a String.

public static XppDom
buildDom(Reader
the reader
r
)

Build an XPP DOM hierarchy from a Reader.

public static XppDom
buildDom(InputStream
the input stream
in
,
String
the encoding of the input stream
encoding
)

Build an XPP DOM hierarchy from an InputStream.

public static XmlPullParser

Returns:

a new parser instance
createDefaultParser
()

Create a new XmlPullParser using the XPP factory.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

XppFactoryback to summary
public XppFactory()

Method Detail

buildDomback to summary
public static XppDom buildDom(String xml) throws XmlPullParserException, IOException

Build an XPP DOM hierarchy from a String.

Parameters
xml:String

the XML data

Exceptions
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
XppDom#build(XmlPullParser)
buildDomback to summary
public static XppDom buildDom(Reader r) throws XmlPullParserException, IOException

Build an XPP DOM hierarchy from a Reader.

Parameters
r:Reader

the reader

Exceptions
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
XppDom#build(XmlPullParser)
buildDomback to summary
public static XppDom buildDom(InputStream in, String encoding) throws XmlPullParserException, IOException

Build an XPP DOM hierarchy from an InputStream.

Parameters
in:InputStream

the input stream

encoding:String

the encoding of the input stream

Exceptions
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
XppDom#build(XmlPullParser)
createDefaultParserback to summary
public static XmlPullParser createDefaultParser() throws XmlPullParserException

Create a new XmlPullParser using the XPP factory.

Returns:XmlPullParser

a new parser instance

Exceptions
XmlPullParserException:
if the factory fails
Since
1.4.1