NAMESPACES_FEATURE_ID
protected static final String NAMESPACES_FEATURE_ID
NAMESPACE_PREFIXES_FEATURE_ID
protected static final String NAMESPACE_PREFIXES_FEATURE_ID
POS_ABSOLUTE_END
public final String POS_ABSOLUTE_END
POS_ABSOLUTE_START
public final String POS_ABSOLUTE_START
allowedMixedContent
protected boolean allowedMixedContent
attrPos
protected X2Attribute[] attrPos
temporary array of current attributes
attrPosEnd
protected int attrPosEnd
index for last attribute in attrPos array
attrPosSize
protected int attrPosSize
size of attrPos array
attrQName
protected QName attrQName
contentBuf
protected StringBuffer contentBuf
Content of current element if in CONTENT state
contentEventEnd
protected int contentEventEnd
contentEventStart
protected int contentEventStart
disableOffsetTracking
protected boolean disableOffsetTracking
elStack
protected X2ElementContent[] elStack
temprary array to keep ElementContent stack
elStackDepth
protected int elStackDepth
how many elements are on elStack
elStackSize
protected int elStackSize
size of elStack array
emptyElement
protected boolean emptyElement
Have we read empty element?
eventEnd
protected int eventEnd
end position of current event in tokenizer biffer
eventStart
protected int eventStart
start position of current event in tokenizer biffer
fDocumentSource
protected XMLDocumentSource fDocumentSource
Document source
gotContent
protected boolean gotContent
inputSource
protected XMLInputSource inputSource
locator
protected XMLLocator locator
mixInElement
protected boolean mixInElement
needToSetInput
protected boolean needToSetInput
nextState
protected byte nextState
nonWhitespaceContent
protected boolean nonWhitespaceContent
prefix2Ns
protected Hashtable prefix2Ns
mapping of names prefixes to uris
pullParserConfiguration
protected XMLPullParserConfiguration pullParserConfiguration
reportNsAttribs
protected boolean reportNsAttribs
should parser report namespace xmlns* attributes ?
seenCR
protected boolean seenCR
seenContent
protected boolean seenContent
seenException
protected Exception seenException
seenRootElement
protected boolean seenRootElement
Have we seen root element
shrinkable
protected boolean shrinkable
startTagInitialized
protected boolean startTagInitialized
state
protected byte state
what is current event type as returned from next()?
supportNs
protected boolean supportNs
should parser support namespaces?
characters
public void characters(XMLString text,
Augmentations augs)
throws XNIException
comment
public void comment(XMLString text,
Augmentations augs)
throws XNIException
doctypeDecl
public void doctypeDecl(String rootElement,
String publicId,
String systemId,
Augmentations augs)
throws XNIException
emptyElement
public void emptyElement(QName element,
XMLAttributes attributes,
Augmentations augs)
throws XNIException
endCDATA
public void endCDATA(Augmentations augs)
throws XNIException
endDocument
public void endDocument(Augmentations augs)
throws XNIException
endElement
public void endElement(QName element,
Augmentations augs)
throws XNIException
endEntity
public void endEntity(String name,
Augmentations augs)
throws XNIException
endGeneralEntity
public void endGeneralEntity(String name,
Augmentations augs)
throws XNIException
endPrefixMapping
public void endPrefixMapping(String prefix,
Augmentations augs)
throws XNIException
ensureAttribs
protected void ensureAttribs(int size)
Make sure that in attributes temporary array is enough space.
ensureCapacity
protected void ensureCapacity(int size)
Make sure that we have enough space to keep element stack if passed size.
error
public void error(String domain,
String key,
XMLParseException ex)
throws XNIException
Error.
fatalError
public void fatalError(String domain,
String key,
XMLParseException ex)
throws XNIException
Fatal error.
getDepth
public int getDepth()
Returns the current depth of the element.
- getDepth in interface XmlPullParser
getDocumentSource
public XMLDocumentSource getDocumentSource()
Returns the document source
getEventType
public byte getEventType()
Returns the type of the current element (START_TAG, END_TAG, CONTENT, etc)
- getEventType in interface XmlPullParser
getLocalName
public String getLocalName()
Returns the local name of the current element
(current event must be START_TAG or END_TAG)
- getLocalName in interface XmlPullParser
getNamespaceUri
public String getNamespaceUri()
Returns the namespace URI of the current element
Returns null if not applicable
(current event must be START_TAG or END_TAG)
- getNamespaceUri in interface XmlPullParser
getPosDesc
public String getPosDesc()
Return string describing current position of parser in input stream as
text 'at line %d (row) and column %d (colum) [seen %s...]'.
- getPosDesc in interface XmlPullParser
getPrefix
public String getPrefix()
Returns the prefix of the current element
or null if elemet has no prefix.
(current event must be START_TAG or END_TAG)
- getPrefix in interface XmlPullParser
getQNameLocal
public String getQNameLocal(String qName)
Return local part of qname.
For example for 'xsi:type' it returns 'type'.
- getQNameLocal in interface XmlPullParser
getQNameUri
public String getQNameUri(String qName)
throws XmlPullParserException
Return uri part of qname.
It is depending on current state of parser to find
what namespace uri is mapped from namespace prefix.
For example for 'xsi:type' if xsi namespace prefix
was declared to 'urn:foo' it will return 'urn:foo'.
- getQNameUri in interface XmlPullParser
getRawName
public String getRawName()
Returns the raw name (prefix + ':' + localName) of the current element
(current event must be START_TAG or END_TAG)
- getRawName in interface XmlPullParser
ignorableWhitespace
public void ignorableWhitespace(XMLString text,
Augmentations augs)
throws XNIException
next
public byte next()
throws XmlPullParserException,
IOException
This is a key method - translates XNI callbacks
into XPP events
(such as START_TAG, END_TAG, CONTENT).
or END_DOCUMENT if no more input.
- next in interface XmlPullParser
processingInstruction
public void processingInstruction(String target,
XMLString data,
Augmentations augs)
throws XNIException
readNode
public byte readNode(XmlNode node)
throws XmlPullParserException,
IOException
Read subtree into node: call readNodeWithoutChildren
and then parse subtree adding children
(values obtained with readXontent or readNodeWithoutChildren).
NOTE: parser must be on START_TAG event.
and all events will written into node!
- readNode in interface XmlPullParser
readNodeWithoutChildren
public void readNodeWithoutChildren(XmlNode node)
throws XmlPullParserException
Read node: it calls readStartTag and then if parser is namespaces
aware currently declared nemaspeces will be added
and defaultNamespace will be set.
NOTE: parser must be on START_TAG event.
and all events will written into node!
- readNodeWithoutChildren in interface XmlPullParser
reset
public void reset()
Reset parser state so it can be used to parse new
- reset in interface XmlPullParser
resetState
protected void resetState()
setDocumentSource
public void setDocumentSource(XMLDocumentSource source)
Sets the document source
setNamespaceAttributesReporting
public void setNamespaceAttributesReporting(boolean enable)
throws XmlPullParserException
Make parser to report xmlns* attributes. Disabled by default.
Only meaningful when namespaces are enabled (when namespaces
are disabled all attributes are always reported).
- setNamespaceAttributesReporting in interface XmlPullParser
skipNode
public byte skipNode()
throws XmlPullParserException,
IOException
If parser has just read start tag it allows to skip whoole
subtree contined in this element. Returns when encounters
end tag matching the start tag.
- skipNode in interface XmlPullParser
startCDATA
public void startCDATA(Augmentations augs)
throws XNIException
startDocument
public void startDocument(XMLLocator locator,
String encoding,
Augmentations augs)
throws XNIException
startDocument
public void startDocument(XMLLocator locator,
String encoding,
NamespaceContext namespaceContext,
Augmentations augs)
throws XNIException
startElement
public void startElement(QName element,
XMLAttributes attributes,
Augmentations augs)
throws XNIException
startEntity
public void startEntity(String name,
String publicId,
String systemId,
String baseSystemId,
String encoding,
Augmentations augs)
throws XNIException
startGeneralEntity
public void startGeneralEntity(String name,
XMLResourceIdentifier identifier,
String encoding,
Augmentations augs)
throws XNIException
startPrefixMapping
public void startPrefixMapping(String prefix,
String uri,
Augmentations augs)
throws XNIException
textDecl
public void textDecl(String version,
String encoding,
Augmentations augs)
throws XNIException
warning
public void warning(String domain,
String key,
XMLParseException ex)
throws XNIException
Warning.
xmlDecl
public void xmlDecl(String version,
String encoding,
String standalone,
Augmentations augs)
throws XNIException