public class XmlTreeReader extends XMLReaderBase
| Modifier and Type | Class and Description |
|---|---|
class |
XmlTreeReader.AttributesAdapter |
| Modifier and Type | Field and Description |
|---|---|
protected XmlTreeReader.AttributesAdapter |
attributes |
protected SOAPElement |
currentNode |
protected String |
currentValue |
protected int |
elementId |
protected ElementIdStack |
elementIds |
protected QName |
name |
protected SOAPElement |
root |
protected int |
state |
| Constructor and Description |
|---|
XmlTreeReader(SOAPElement root) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the XMLReader.
|
Attributes |
getAttributes()
Return the current attribute list.
|
Element |
getCurrentNode() |
int |
getElementId()
Return the current element ID.
|
int |
getLineNumber()
Return the current line number.
|
String |
getLocalName()
Return the current local name.
|
QName |
getName()
Return the current qualified name.
|
Iterator |
getPrefixes()
Return an iterator on all prefixes in scope, except for the default prefix.
|
int |
getState()
Return the current state of the XMLReader.
|
String |
getURI()
Return the current URI.
|
String |
getURI(String prefix)
Return the URI for the given prefix.
|
String |
getValue()
Return the current value.
|
int |
next()
Return the next state of the XMLReader.
|
void |
parse() |
XMLReader |
recordElement()
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.
|
nextContent, nextElementContent, skipElementprotected SOAPElement root
protected SOAPElement currentNode
protected int state
protected QName name
protected ElementIdStack elementIds
protected int elementId
protected String currentValue
protected XmlTreeReader.AttributesAdapter attributes
public XmlTreeReader(SOAPElement root)
public void close()
XMLReader All subsequent calls to XMLReader.next() will return EOF.
public Attributes getAttributes()
XMLReaderMeaningful only when the state is one of: START.
The returned Attributes object belong to the XMLReader and is
only guaranteed to be valid until the XMLReader.next() method is called,
directly or indirectly.
public int getElementId()
XMLReaderpublic int getLineNumber()
XMLReaderDue to aggressive parsing, this value may be off by a few lines.
public String getLocalName()
XMLReaderMeaningful only when the state is one of: START, END, PI.
public Element getCurrentNode()
public QName getName()
XMLReaderMeaningful only when the state is one of: START, END.
public Iterator getPrefixes()
XMLReaderpublic int getState()
XMLReaderpublic String getURI()
XMLReaderMeaningful only when the state is one of: START, END.
public String getURI(String prefix)
XMLReaderIf there is no namespace declaration in scope for the given prefix, return null.
public String getValue()
XMLReaderMeaningful only when the state is one of: CHARS, PI.
public int next()
XMLReaderpublic void parse()
public XMLReader recordElement()
XMLReaderThe 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.
public void skipElement(int elementId)
XMLReaderskipElement in interface XMLReaderskipElement in class XMLReaderBaseCopyright © 2017–2019 Eclipse Foundation. All rights reserved.