com.format.xml
API has been deprecated. Instead, use the com.format.xml.bind
API.public interface ILcdXMLDocumentContext
ILcdXMLElementReader
Scope.LOCAL scope.
Additionally, sometimes information needs to be shared by different readers
(e.g., a coordinate system is declared as an attribute of an XML element, and should
be applied to all of its children). In this case, the XML context can also be used to
store these variables, using the Scope.GLOBAL
scope (for document-wide
variables) or the Scope.DESCENDANTS
scope (for variables that should only
be visible by an XML element and all of its children).
An ILcdXMLDocumentContext
is typically created by the XML decoder,
users shouldn't implement this interface. The decoder will take care of all
context management (i.e., storing and retrieving contexts each time another
XML element is read).
Modifier and Type | Interface and Description |
---|---|
static class |
ILcdXMLDocumentContext.Scope
Deprecated.
A type-safe enumeration, representing all possible scopes to be used
in XML document contexts.
|
Modifier and Type | Method and Description |
---|---|
void |
endElement()
Deprecated.
Notifies this document context that the current XML element has been ended.
|
Object |
get(Object aKey,
ILcdXMLDocumentContext.Scope aScope)
Deprecated.
Retrieves the value of a variable in the document context.
|
void |
put(Object aKey,
Object aValue,
ILcdXMLDocumentContext.Scope aScope)
Deprecated.
Stores a variable in the document context.
|
void |
startElement()
Deprecated.
Notifies this document context that a new XML element has been entered.
|
void put(Object aKey, Object aValue, ILcdXMLDocumentContext.Scope aScope)
aKey
- the key, used to identify the variable.aValue
- the value of the variable.aScope
- the scope, in which the variable should be visible.NullPointerException
- if aKey
or aScope
is null
.Object get(Object aKey, ILcdXMLDocumentContext.Scope aScope)
aKey
- the key, used to identify the object.aScope
- the scope in which the variable is stored.null
if no value was stored yet.NullPointerException
- if aKey
or aScope
is null
.void startElement()
void endElement()