classIBXMLCALL InputSource

Input source for XML data

Public

[more] Constructors and destructor.
[more] Input source interface.


Documentation

Input source for XML data.

The InputSource class contains information about a single input source of XML content for use by a parser. The InputSource class is used as an input parameter to the parse() method of a Parse object, and as a return value from the resolveEntity() method of an EntityResolver object.

In both cases the InputSource is used by the parser to read XML data. The parser will not modify the content of the InputSource object received. The InputSource objects belong to the application and they are always passed as constant reference to the parser.

The information in the object includes: a public identifier and a system identifier. The parser will use the system identifier to open a connection to the URI specified by the system identifier.

Please note that this interface deviates slightly from the SAX version 1.0 for Java(tm) implementation and its definition due to differences between the Java(tm) language and C++. At the time of writing, no formal definition of SAX version 1.0 or 2.0 for C++ has been completed.

o Constructors and destructor.

o InputSource()
Construct an input source.

o InputSource(const ibxmlchar* systemId)
Construct an input source with a specified system identifier.

The system identifier is set in order to provide a base URI for resolving relative URIs in the XML document.

Parameters:
systemId - A pointer to a string containing the name of the system identifier to use for the input source.

o InputSource(const char* systemId)
Construct an input source with a specified system identifier.

The system identifier is set in order to provide a base URI for resolving relative URIs in the XML document.

Parameters:
systemId - A pointer to a string containing the name of the system identifier to use for the input source.

ovirtual ~InputSource()
Destructor.

o Input source interface.

oibxmlchar* getPublicId() const
Get public identifier of the input source.

Returns:
A pointer to a string containing the name of the public identifier of the input source, or null if none was specified.

oibxmlchar* getSystemId() const
Get system identifier of the input source.

Returns:
A pointer to a string containing the name of the system identifier of the input source, or null if none was specified.

ovoid setEncoding(const ibxmlchar* encoding)
Set encoding of the input source.

An input source can be set to force the parser to assume a particular encoding. If none is set, it is derived from the document.

Parameters:
encoding - A pointer to a string containing the name of the encoding to force. The encoding must conform to the encoding declaration rules in the W3C XML Specification 1.0 section 4.3.3.

oibxmlchar* getEncoding() const
Get encoding of the input source.

An input source can be set to force the parser to assume a particular encoding. If none is set, it is derived from the document.

Returns:
A pointer to a string containing the name of the encoding to force, or null if none is forced.

oInputStreamByte* getByteStream()
Get a byte stream representing the input source.

The returned InputStreamByte object has to be deleted by the user, i.e. the user owns the returned object.

Returns:
A pointer to an InputStreamByte object from which the data encapsulated by the input source can be read.


This class has no child classes.

Alphabetic index Hierarchy of classes



This page was generated with the help of DOC++.