|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper
org.apache.axiom.util.stax.debug.XMLStreamReaderValidator
public class XMLStreamReaderValidator
There are several places in the code where events are passed from a source to a consumer using XMLStreamReader events. XMLStreamReader (impl)--> consumer of XMLStreamReader events This simple class can be interjected as a filter and used to do some simple validation. Validating the events coming from source (impl) can help find and correct errors when they occur. Otherwise the errors may be caught much further downstream and hard to fix. XMLStreamReader (impl)--> XMLStreamReaderValiator-> consumer of XMLStreamReader events In the initial version, the XMStreamValidator ensures that the start element events match the end element events.
| Field Summary |
|---|
| Fields inherited from interface javax.xml.stream.XMLStreamConstants |
|---|
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT |
| Constructor Summary | |
|---|---|
XMLStreamReaderValidator(javax.xml.stream.XMLStreamReader delegate,
boolean throwExceptions)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getElementText()
|
protected void |
logParserState()
Dump the current event of the delegate. |
int |
next()
|
int |
nextTag()
|
| Methods inherited from class org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper |
|---|
close, getAttributeCount, getAttributeLocalName, getAttributeName, getAttributeNamespace, getAttributePrefix, getAttributeType, getAttributeValue, getAttributeValue, getCharacterEncodingScheme, getEncoding, getEventType, getLocalName, getLocation, getName, getNamespaceContext, getNamespaceCount, getNamespacePrefix, getNamespaceURI, getNamespaceURI, getNamespaceURI, getParent, getPIData, getPITarget, getPrefix, getProperty, getText, getTextCharacters, getTextCharacters, getTextLength, getTextStart, getVersion, hasName, hasNext, hasText, isAttributeSpecified, isCharacters, isEndElement, isStandalone, isStartElement, isWhiteSpace, require, standaloneSet |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLStreamReaderValidator(javax.xml.stream.XMLStreamReader delegate,
boolean throwExceptions)
delegate - XMLStreamReader to validatethrowExceptions - (true if exceptions should be thrown when errors are encountered)| Method Detail |
|---|
public int next()
throws javax.xml.stream.XMLStreamException
next in interface javax.xml.stream.XMLStreamReadernext in class XMLStreamReaderWrapperjavax.xml.stream.XMLStreamException
public java.lang.String getElementText()
throws javax.xml.stream.XMLStreamException
getElementText in interface javax.xml.stream.XMLStreamReadergetElementText in class XMLStreamReaderWrapperjavax.xml.stream.XMLStreamException
public int nextTag()
throws javax.xml.stream.XMLStreamException
nextTag in interface javax.xml.stream.XMLStreamReadernextTag in class XMLStreamReaderWrapperjavax.xml.stream.XMLStreamExceptionprotected void logParserState()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||