|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gjt.xpp.XmlPullParserFactory
public class XmlPullParserFactory
This class is used to create implementations of XML Pull Parser. Based on JAXP ideas but tailored to work in J2ME environments (no access to system properties or file system).
XmlPullParser
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_PROPERTY_NAME
|
Constructor Summary | |
---|---|
protected |
XmlPullParserFactory()
Proteted constructor to be called by factory implementations. |
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_PROPERTY_NAME
Constructor Detail |
---|
protected XmlPullParserFactory()
Method Detail |
---|
public static XmlPullParserFactory newInstance() throws XmlPullParserException
XmlPullParserException
public static XmlPullParserFactory newInstance(java.lang.String factoryClassName) throws XmlPullParserException
factoryClassName
- use specified factory class if not null
XmlPullParserException
public 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 instance
XmlPullParserException
public void setNamespaceAware(boolean awareness) throws XmlPullParserException
awareness
- true if the parser produced by this code
will provide support for XML namespaces; false otherwise.
XmlPullParserException
public boolean isNamespaceAware()
public XmlPullParser newPullParser() throws XmlPullParserException
XmlPullParserException
public XmlEndTag newEndTag() throws XmlPullParserException
XmlPullParserException
public XmlNode newNode() throws XmlPullParserException
XmlPullParserException
public XmlNode newNode(XmlPullParser pp) throws XmlPullParserException, java.io.IOException
XmlPullParserException
java.io.IOException
public XmlPullNode newPullNode(XmlPullParser pp) throws XmlPullParserException
XmlPullParserException
public XmlStartTag newStartTag() throws XmlPullParserException
XmlPullParserException
public XmlFormatter newFormatter() throws XmlPullParserException
XmlPullParserException
public XmlRecorder newRecorder() throws XmlPullParserException
XmlPullParserException
public XmlNode readNode(java.io.Reader reader, boolean closeAtEnd) throws XmlPullParserException, java.io.IOException
XmlPullParserException
java.io.IOException
public XmlNode readNode(java.io.Reader reader) throws XmlPullParserException, java.io.IOException
XmlPullParserException
java.io.IOException
public void writeNode(XmlNode node, java.io.Writer writer, boolean closeAtEnd) throws XmlPullParserException, java.io.IOException
XmlPullParserException
java.io.IOException
public void writeNode(XmlNode node, java.io.Writer writer) throws XmlPullParserException, java.io.IOException
XmlPullParserException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |