Class LoggingXMLReader
- All Implemented Interfaces:
XMLReader
- Author:
- JAX-RPC Development Team
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionLoggingXMLReader(OutputStream log, XMLReader reader) LoggingXMLReader(PrintWriter log, XMLReader reader) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the XMLReader.Return the current attribute list.intReturn the current element ID.intReturn 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.intgetState()Return the current state of the XMLReader.getURI()Return the current URI.Return the URI for the given prefix.getValue()Return the current value.intnext()Return the next state of the XMLReader.intintReturn the next state of the XMLReader.Records the current element and leaves the reader positioned on its end tag.voidSkip all nodes up to the end tag of the element with the current element ID.voidskipElement(int elementId) Skip all nodes up to the end tag of the element with the given element ID.
-
Constructor Details
-
LoggingXMLReader
-
LoggingXMLReader
-
-
Method Details
-
next
public int next()Description copied from interface:XMLReaderReturn the next state of the XMLReader. The return value is one of: START, END, CHARS, PI, EOF. -
nextContent
public int nextContent()- Specified by:
nextContentin interfaceXMLReader
-
nextElementContent
public int nextElementContent()Description copied from interface:XMLReaderReturn the next state of the XMLReader.Whitespace character content, processing instructions are ignored. Non-whitespace character content triggers an exception.
The return value is one of: START, END, EOF.
- Specified by:
nextElementContentin interfaceXMLReader
-
getState
public int getState()Description copied from interface:XMLReaderReturn the current state of the XMLReader. -
getName
Description copied from interface:XMLReaderReturn the current qualified name.Meaningful only when the state is one of: START, END.
-
getURI
Description copied from interface:XMLReaderReturn the current URI.Meaningful only when the state is one of: START, END.
-
getLocalName
Description copied from interface:XMLReaderReturn the current local name.Meaningful only when the state is one of: START, END, PI.
- Specified by:
getLocalNamein interfaceXMLReader
-
getAttributes
Description copied from interface:XMLReaderReturn the current attribute list.Meaningful only when the state is one of: START.
The returned
Attributesobject belong to the XMLReader and is only guaranteed to be valid until theXMLReader.next()method is called, directly or indirectly.- Specified by:
getAttributesin interfaceXMLReader
-
getValue
Description copied from interface:XMLReaderReturn the current value.Meaningful only when the state is one of: CHARS, PI.
-
getElementId
public int getElementId()Description copied from interface:XMLReaderReturn the current element ID.- Specified by:
getElementIdin interfaceXMLReader
-
getLineNumber
public int getLineNumber()Description copied from interface:XMLReaderReturn the current line number.Due to aggressive parsing, this value may be off by a few lines.
- Specified by:
getLineNumberin interfaceXMLReader
-
getURI
Description copied from interface:XMLReaderReturn the URI for the given prefix.If there is no namespace declaration in scope for the given prefix, return null.
-
getPrefixes
Description copied from interface:XMLReaderReturn an iterator on all prefixes in scope, except for the default prefix.- Specified by:
getPrefixesin interfaceXMLReader
-
recordElement
Description copied from interface:XMLReaderRecords 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.
- Specified by:
recordElementin interfaceXMLReader
-
skipElement
public void skipElement()Description copied from interface:XMLReaderSkip all nodes up to the end tag of the element with the current element ID.- Specified by:
skipElementin interfaceXMLReader
-
skipElement
public void skipElement(int elementId) Description copied from interface:XMLReaderSkip all nodes up to the end tag of the element with the given element ID.- Specified by:
skipElementin interfaceXMLReader
-
close
public void close()Description copied from interface:XMLReaderClose the XMLReader.All subsequent calls to
XMLReader.next()will return EOF.
-