|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ElementHandler
Implementations of this interface are responsible for parsing a specific XML element and re-creating its content as a Java object graph. Warning: Each element handler instance may and will be called simultaneously by different threads! Therefore, element handlers must not keep any state about the current parse process within local variables or similar or they always must associate it with the current thread.
Method Summary | |
---|---|
java.lang.Object |
handleElement(QName elementName,
ElementParser parser)
Processes the content (both child elements and attributes) of the element with the specified elementName and returns its
representation as a Java object. |
void |
serializeElement(XmlSerializer serializer,
QName qname,
java.lang.Object value)
Method to serialize the UnknownElement |
Method Detail |
---|
java.lang.Object handleElement(QName elementName, ElementParser parser) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException
elementName
and returns its
representation as a Java object. The element content can be obtained
successively from the provided parser
. It is guaranteed that
this parser will be always namespace-aware. Note that the parser's
current position is already at the start position of the current element,
that is, the following assumptions hold immediately after entering this
method:
parser.getEventType() == XmlPullParser.START_TAG
parser.getName() == elementName.getLocalPart()
parser.getNamespace() == elementName.getNamespace()
elementName
- the qualified name of the element to processparser
- the parser to obtain element data from
org.xmlpull.v1.XmlPullParserException
- if an error during processing of the
element content occurs
java.io.IOException
- if an error during reading the element source occursvoid serializeElement(XmlSerializer serializer, QName qname, java.lang.Object value) throws java.lang.IllegalArgumentException, WS4DIllegalStateException, java.io.IOException
serializer
- ,the Serializer which is used to serialize the
UnknownElementqname
- ,the qualified name of the UnknownElement to processvalue
- ,the value of the UnknownElement
java.lang.IllegalArgumentException
WS4DIllegalStateException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |