com.format.xml
API has been deprecated. Instead, use the com.format.xml.bind
API.public interface ILcdXMLElementReader
<document version="1">
<title>
Hello, World!
</title>
This is a text.
<document>
Suppose a document reader DH and title reader TH are registered with an element reader provider.
The following method calls will be performed by the XML decoder, during the decoding process:
DH.startElement([document],[version=1])
DH.getChildreader([document,child],[])(returns TH)
TH.startElement([document,child],[])
TH.content("Hello, World!")
TH.endElement([document,child])(returns the created titleObject)
DH.endChildElement([document,child],TH,titleObject)
DH.content("This is a text.")
DH.endElement([document](returns the created documentObject)
ILcdXMLElementReaderProvider
Modifier and Type | Method and Description |
---|---|
void |
content(ILcdXMLNameStack aElementStack,
char[] aChars,
int aStart,
int aLength,
ILcdXMLDocumentContext aContext)
Deprecated.
Reports some simple character content to be processed.
|
void |
endChildElement(ILcdXMLNameStack aElementStack,
ILcdXMLElementReader aElementReader,
Object aObject,
ILcdXMLDocumentContext aContext)
Deprecated.
Reports the end of a child structure that has been processed by the given reader.
|
Object |
endElement(ILcdXMLNameStack aElementStack,
ILcdXMLDocumentContext aContext)
Deprecated.
Reports the end of the root element of the structure being handled.
|
ILcdXMLElementReader |
getChildReader(ILcdXMLNameStack aElementStack,
ILcdAssocSet aAttributes,
ILcdXMLDocumentContext aContext)
Deprecated.
Reports the start of a child element and requests a reader to process it.
|
void |
startElement(ILcdXMLNameStack aElementStack,
ILcdAssocSet aAttributes,
Object aObject,
ILcdXMLDocumentContext aContext)
Deprecated.
Reports the start of the root element of the structure being handled.
|
void startElement(ILcdXMLNameStack aElementStack, ILcdAssocSet aAttributes, Object aObject, ILcdXMLDocumentContext aContext)
The attributes attached to the element are available through an
immutable ILcdAssocSet
. Only the following methods
of this interface are available:
UnsupportedOperationException
will be thrown if one
of the other methods is called.aElementStack
- The current element name stack, including the element that is started on top.aAttributes
- The attributes of the element.aObject
- The object to be filled in and returned by this reader. If null
,aContext
- The document context for the XML document currently being decoded.Object endElement(ILcdXMLNameStack aElementStack, ILcdXMLDocumentContext aContext)
aElementStack
- The current element name stack, including the element that is ended on top.aContext
- The document context for the XML document currently being decoded.ILcdXMLElementReader getChildReader(ILcdXMLNameStack aElementStack, ILcdAssocSet aAttributes, ILcdXMLDocumentContext aContext)
The attributes attached to the element are available through an
immutable ILcdAssocSet
. Only the following methods
of the interface are available:
UnsupportedOperationException
will be thrown if one
of the other methods is called.aElementStack
- The current element name stack, including the element that is ended on top.aAttributes
- The attributes attributes of the current element.aContext
- The document context for the XML document currently being decoded.null
if no handling is necessary.void endChildElement(ILcdXMLNameStack aElementStack, ILcdXMLElementReader aElementReader, Object aObject, ILcdXMLDocumentContext aContext)
aElementStack
- The current element name stack, including the element that is ended on top.aElementReader
- The reader that was used for the child structure.aObject
- The object that was created by the child reader.aContext
- The document context for the XML document currently being decoded.void content(ILcdXMLNameStack aElementStack, char[] aChars, int aStart, int aLength, ILcdXMLDocumentContext aContext)
aLength == -1
, to indicate that the content block has ended.aElementStack
- The current element name stack, including the container element for this
content on top.aChars
- The characters.aStart
- The start position in the character array.aLength
- The number of characters to use from the character array.aContext
- The document context for the XML document currently being decoded.