com.format.xml
API has been deprecated. Instead, use the com.format.xml.bind
API.public class TLcdXMLDecoder extends Object implements ILcdInputStreamFactoryCapable
ILcdXMLElementReader
's,
provided by an ILcdXMLElementReaderProvider
.
The decoder will read the XML document, and, for each start of an element (opening XML tag), content
or end of an element (closing XML tag), retrieve an element reader via the element reader provider
or another reader, and call the reader's corresponding method, with the current element name stack as
a parameter (and, optionally, other relevant parameters).
A matching reader is retrieved as follows:
ILcdXMLElementReader
,
ILcdXMLElementReaderProvider
Constructor and Description |
---|
TLcdXMLDecoder()
Deprecated.
Creates a new XML decoder instance.
|
Modifier and Type | Method and Description |
---|---|
Object |
decodeXML(String aSource)
Deprecated.
Processes the given XML source document, and returns the object that is created by the root
element's reader - and can thus be anything.
|
ILcdXMLElementReaderProvider |
getElementReaderProvider()
Deprecated.
Returns the currently used
ILcdXMLElementreaderProvider . |
ILcdInputStreamFactory |
getInputStreamFactory()
Deprecated.
Returns the input stream factory that is currently used for creating input streams
given source names.
|
ILcdXMLPrefixMap |
getPrefixMap()
Deprecated.
Returns the prefix map that is used by this decoder.
|
ILcdXMLSchemaLocationsMap |
getSchemaLocationsMap()
Deprecated.
Returns the
ILcdXMLSchemaLocationsMap that contains all schema locations
read during the decoding of XML documents. |
void |
setElementReaderProvider(ILcdXMLElementReaderProvider aReaderSupport)
Deprecated.
Sets the
ILcdXMLElementReaderProvider to be used. |
void |
setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
Deprecated.
Sets the input stream factory that will be used for creating input streams
given source names.
|
void |
setPrefixMap(ILcdXMLPrefixMap aPrefixMap)
Deprecated.
Sets the prefix map to be used by this decoder.
|
void |
setSchemaLocationsMap(ILcdXMLSchemaLocationsMap aSchemaLocationsMap)
Deprecated.
Sets the
ILcdXMLSchemaLocationsMap in which all schema locations that are declared
in the read XML documents should be stored. |
public TLcdXMLDecoder()
public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
setInputStreamFactory
in interface ILcdInputStreamFactoryCapable
aInputStreamFactory
- the input stream factory to be used.public ILcdInputStreamFactory getInputStreamFactory()
getInputStreamFactory
in interface ILcdInputStreamFactoryCapable
public void setElementReaderProvider(ILcdXMLElementReaderProvider aReaderSupport)
ILcdXMLElementReaderProvider
to be used.aReaderSupport
- the ILcdXMLElementreaderProvider
to be used.public ILcdXMLElementReaderProvider getElementReaderProvider()
ILcdXMLElementreaderProvider
.ILcdXMLElementreaderProvider
.public void setPrefixMap(ILcdXMLPrefixMap aPrefixMap)
aPrefixMap
- the prefix map to be used by this decoder.getPrefixMap()
public ILcdXMLPrefixMap getPrefixMap()
xmlns:prefix="namespace"
), the prefix, together with its corresponding
namespace, will be added to the prefix map. This way, the prefix mapping of the original XML
document can be shared with other applications (e.g., an XML encoder).public ILcdXMLSchemaLocationsMap getSchemaLocationsMap()
ILcdXMLSchemaLocationsMap
that contains all schema locations
read during the decoding of XML documents. Each schema location declaration
(xsi:schemaLocations="..."
), read during the decoding, will be added to the schema
locations map. This way, the schema locations of the original XML document can be shared with
other applications (e.g., an XML encoder).ILcdXMLSchemaLocationsMap
that contains all schema locations in the
decoded XML documents.getSchemaLocationsMap()
public void setSchemaLocationsMap(ILcdXMLSchemaLocationsMap aSchemaLocationsMap)
ILcdXMLSchemaLocationsMap
in which all schema locations that are declared
in the read XML documents should be stored.aSchemaLocationsMap
- the ILcdXMLSchemaLocationsMap
in which all schema
locations declared in XML documents should be stored.public Object decodeXML(String aSource) throws IOException
aSource
- the full path to the file to be decoded, including the file name.IOException
- thrown if an error occurs during the read process.IllegalArgumentException
- thrown if the supplied argument is null
.