Class XmlTreeReader
- All Implemented Interfaces:
XMLReader
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected XmlTreeReader.AttributesAdapter
protected javax.xml.soap.SOAPElement
protected String
protected int
protected ElementIdStack
protected QName
protected javax.xml.soap.SOAPElement
protected int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the XMLReader.Return the current attribute list.int
Return the current element ID.int
Return the current line number.Return the current local name.getName()
Return the current qualified name.Return an iterator on all prefixes in scope, except for the default prefix.int
getState()
Return the current state of the XMLReader.getURI()
Return the current URI.Return the URI for the given prefix.getValue()
Return the current value.int
next()
Return the next state of the XMLReader.void
parse()
Records the current element and leaves the reader positioned on its end tag.void
skipElement
(int elementId) Skip all nodes up to the end tag of the element with the given element ID.Methods inherited from class com.sun.xml.rpc.streaming.XMLReaderBase
nextContent, nextElementContent, skipElement
-
Field Details
-
root
protected javax.xml.soap.SOAPElement root -
currentNode
protected javax.xml.soap.SOAPElement currentNode -
state
protected int state -
name
-
elementIds
-
elementId
protected int elementId -
currentValue
-
attributes
-
-
Constructor Details
-
XmlTreeReader
public XmlTreeReader(javax.xml.soap.SOAPElement root)
-
-
Method Details
-
close
public void close()Description copied from interface:XMLReader
Close the XMLReader.All subsequent calls to
XMLReader.next()
will return EOF. -
getAttributes
Description copied from interface:XMLReader
Return the current attribute list.Meaningful only when the state is one of: START.
The returned
Attributes
object belong to the XMLReader and is only guaranteed to be valid until theXMLReader.next()
method is called, directly or indirectly. -
getElementId
public int getElementId()Description copied from interface:XMLReader
Return the current element ID. -
getLineNumber
public int getLineNumber()Description copied from interface:XMLReader
Return the current line number.Due to aggressive parsing, this value may be off by a few lines.
-
getLocalName
Description copied from interface:XMLReader
Return the current local name.Meaningful only when the state is one of: START, END, PI.
-
getCurrentNode
-
getName
Description copied from interface:XMLReader
Return the current qualified name.Meaningful only when the state is one of: START, END.
-
getPrefixes
Description copied from interface:XMLReader
Return an iterator on all prefixes in scope, except for the default prefix. -
getState
public int getState()Description copied from interface:XMLReader
Return the current state of the XMLReader. -
getURI
Description copied from interface:XMLReader
Return the current URI.Meaningful only when the state is one of: START, END.
-
getURI
Description copied from interface:XMLReader
Return the URI for the given prefix.If there is no namespace declaration in scope for the given prefix, return null.
-
getValue
Description copied from interface:XMLReader
Return the current value.Meaningful only when the state is one of: CHARS, PI.
-
next
public int next()Description copied from interface:XMLReader
Return the next state of the XMLReader. The return value is one of: START, END, CHARS, PI, EOF. -
parse
public void parse() -
recordElement
Description copied from interface:XMLReader
Records the current element and leaves the reader positioned on its end tag.The XMLReader must be positioned on the start tag of the element. The returned reader will play back all events starting with the start tag of the element and ending with its end tag.
-
skipElement
public void skipElement(int elementId) Description copied from interface:XMLReader
Skip all nodes up to the end tag of the element with the given element ID.- Specified by:
skipElement
in interfaceXMLReader
- Specified by:
skipElement
in classXMLReaderBase
-