public class XmlPullParserFactory
extends java.lang.Object
XmlPullParser| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_PROPERTY_NAME |
| Modifier | Constructor and Description |
|---|---|
protected |
XmlPullParserFactory()
Proteted constructor to be called by factory implementations.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isNamespaceAware()
Indicates whether or not the factory is configured to produce
parsers which are namespace aware.
|
XmlEndTag |
newEndTag()
Create new end tag.
|
XmlFormatter |
newFormatter()
Return new XML formatter.
|
static XmlPullParserFactory |
newInstance()
Get a new instance of a PullParserFactory used to create XPP.
|
static XmlPullParserFactory |
newInstance(java.lang.Class classLoaderCtx)
Get a new instance of a PullParserFactory used to create XPP.
|
static XmlPullParserFactory |
newInstance(java.lang.String factoryClassName)
Get a new instance of a PullParserFactory from given class name.
|
XmlNode |
newNode()
Return new XML node.
|
XmlNode |
newNode(XmlPullParser pp)
Return new XML node that is represeting tree from current pull parser start tag.
|
XmlPullNode |
newPullNode(XmlPullParser pp)
Return new XML pull node that is represeting tree from current pull parser start tag.
|
XmlPullParser |
newPullParser()
Create new XML pull parser.
|
XmlRecorder |
newRecorder()
Return new XML recorder.
|
XmlStartTag |
newStartTag()
Return new XML start tag.
|
XmlNode |
readNode(java.io.Reader reader)
Equivalent to calling readNode(reader, false);
|
XmlNode |
readNode(java.io.Reader reader,
boolean closeAtEnd)
Read XmlNode from input - essentially it is utility function that
will create instance of pull parser, feed input inpt it and
return new node tree parsed form the input.
|
void |
setNamespaceAware(boolean awareness)
Specifies that the parser produced by this factory will provide
support for XML namespaces.
|
void |
writeNode(XmlNode node,
java.io.Writer writer)
Equivalent to calling writeNode(node, writer, false);
|
void |
writeNode(XmlNode node,
java.io.Writer writer,
boolean closeAtEnd) |
public static final java.lang.String DEFAULT_PROPERTY_NAME
protected XmlPullParserFactory()
public static XmlPullParserFactory newInstance() throws XmlPullParserException
XmlPullParserExceptionpublic static XmlPullParserFactory newInstance(java.lang.String factoryClassName) throws XmlPullParserException
factoryClassName - use specified factory class if not nullXmlPullParserExceptionpublic static XmlPullParserFactory newInstance(java.lang.Class classLoaderCtx) throws XmlPullParserException
NOTE: passing classLoaderCtx is not very useful in ME but can be useful in container environment where multiple class loaders are used (it is using Class as ClassLoader is not in ME profile).
classLoaderCtx - if not null it is used to find
default factory and to create instanceXmlPullParserExceptionpublic void setNamespaceAware(boolean awareness)
throws XmlPullParserException
awareness - true if the parser produced by this code
will provide support for XML namespaces; false otherwise.XmlPullParserExceptionpublic boolean isNamespaceAware()
public XmlPullParser newPullParser() throws XmlPullParserException
XmlPullParserExceptionpublic XmlEndTag newEndTag() throws XmlPullParserException
XmlPullParserExceptionpublic XmlNode newNode() throws XmlPullParserException
XmlPullParserExceptionpublic XmlNode newNode(XmlPullParser pp) throws XmlPullParserException, java.io.IOException
XmlPullParserExceptionjava.io.IOExceptionpublic XmlPullNode newPullNode(XmlPullParser pp) throws XmlPullParserException
XmlPullParserExceptionpublic XmlStartTag newStartTag() throws XmlPullParserException
XmlPullParserExceptionpublic XmlFormatter newFormatter() throws XmlPullParserException
XmlPullParserExceptionpublic XmlRecorder newRecorder() throws XmlPullParserException
XmlPullParserExceptionpublic XmlNode readNode(java.io.Reader reader, boolean closeAtEnd) throws XmlPullParserException, java.io.IOException
XmlPullParserExceptionjava.io.IOExceptionpublic XmlNode readNode(java.io.Reader reader) throws XmlPullParserException, java.io.IOException
XmlPullParserExceptionjava.io.IOExceptionpublic void writeNode(XmlNode node, java.io.Writer writer, boolean closeAtEnd) throws XmlPullParserException, java.io.IOException
XmlPullParserExceptionjava.io.IOExceptionpublic void writeNode(XmlNode node, java.io.Writer writer) throws XmlPullParserException, java.io.IOException
XmlPullParserExceptionjava.io.IOExceptionCopyright (c) 2003 IU Extreme! Lab http://www.extreme.indiana.edu/ All Rights Reserved.
Note this package is deprecated by XPP3 that implements XmlPull API