public interface ElementHandler
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
handleElement(QName elementName,
ElementParser parser,
URI fromURI)
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(Ws4dXmlSerializer serializer,
QName qname,
java.lang.Object value)
Method to serialize the UnknownElement
|
java.lang.Object handleElement(QName elementName, ElementParser parser, URI fromURI) throws 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 Attention! The provided parser supports neither custom properties, nor
any features! Also, it doesn't accept any entity replacement text.
parser.getName() == elementName.getLocalPart()
parser.getNamespace() == elementName.getNamespace()
elementName - the qualified name of the element to processparser - the parser to obtain element data fromXmlPullParserException - if an error during processing of the element content occursjava.io.IOException - if an error during reading the element source occursvoid serializeElement(Ws4dXmlSerializer 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 UnknownElementjava.lang.IllegalArgumentExceptionWS4DIllegalStateExceptionjava.io.IOException