| Constructor and Description |
|---|
LoggingXMLReader(OutputStream log,
XMLReader reader) |
LoggingXMLReader(PrintWriter log,
XMLReader reader) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the XMLReader.
|
Attributes |
getAttributes()
Return the current attribute list.
|
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.
|
int |
nextContent() |
int |
nextElementContent()
Return the next state of the XMLReader.
|
XMLReader |
recordElement()
Records the current element and leaves the reader positioned on its end tag.
|
void |
skipElement()
Skip all nodes up to the end tag of the element with the current element ID.
|
void |
skipElement(int elementId)
Skip all nodes up to the end tag of the element with the given element ID.
|
public LoggingXMLReader(OutputStream log, XMLReader reader)
public LoggingXMLReader(PrintWriter log, XMLReader reader)
public int next()
XMLReaderpublic int nextContent()
nextContent in interface XMLReaderpublic int nextElementContent()
XMLReaderWhitespace character content, processing instructions are ignored. Non-whitespace character content triggers an exception.
The return value is one of: START, END, EOF.
nextElementContent in interface XMLReaderpublic int getState()
XMLReaderpublic QName getName()
XMLReaderMeaningful only when the state is one of: START, END.
public String getURI()
XMLReaderMeaningful only when the state is one of: START, END.
public String getLocalName()
XMLReaderMeaningful only when the state is one of: START, END, PI.
getLocalName in interface XMLReaderpublic 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.
getAttributes in interface XMLReaderpublic String getValue()
XMLReaderMeaningful only when the state is one of: CHARS, PI.
public int getElementId()
XMLReadergetElementId in interface XMLReaderpublic int getLineNumber()
XMLReaderDue to aggressive parsing, this value may be off by a few lines.
getLineNumber in interface XMLReaderpublic String getURI(String prefix)
XMLReaderIf there is no namespace declaration in scope for the given prefix, return null.
public Iterator getPrefixes()
XMLReadergetPrefixes in interface XMLReaderpublic 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.
recordElement in interface XMLReaderpublic void skipElement()
XMLReaderskipElement in interface XMLReaderpublic void skipElement(int elementId)
XMLReaderskipElement in interface XMLReaderpublic void close()
XMLReader All subsequent calls to XMLReader.next() will return EOF.
Copyright © 2017–2019 Eclipse Foundation. All rights reserved.