|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
�PREV CLASS�� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CXmlWriter: public Sax::CContentHandler { public: CXmlWriter(); virtual ~CXmlWriter(); public: virtual bool GetUri(CString &strUri) = 0; virtual bool GetNamespaces(bool &bNamespaces) = 0; virtual bool GetMethod( CString &strNamespaceUri, CString &strLocalName) = 0; virtual bool GetVersion(CString &strVersion) = 0; virtual bool GetEncoding(CString &strEncoding) = 0; virtual bool GetOmitXmlDeclaration( bool &bOmitXmlDeclaration) = 0; virtual bool GetStandalone(bool &bStandalone) = 0; virtual bool GetDoctypePublic(CString &strDoctypePublic) = 0; virtual bool GetDoctypeSystem(CString &strDoctypeSystem) = 0; virtual bool GetIndent(bool &bIndent) = 0; virtual bool GetMediaType(CString &strMediaType) = 0; public: virtual void SetUri(const CString &strUri) = 0; virtual void SetNamespaces(bool bNamespaces) = 0; virtual void SetMethod( const CString &strNamespaceUri, const CString &strLocalName) = 0; virtual void SetVersion(const CString &strVersion) = 0; virtual void SetEncoding(const CString &strEncoding) = 0; virtual void SetOmitXmlDeclaration(bool bOmitXmlDeclaration) = 0; virtual void SetStandalone(bool bStandalone) = 0; virtual void SetDoctypePublic( const CString &strDoctypePublic) = 0; virtual void SetDoctypeSystem( const CString &strDoctypeSystem) = 0; virtual void SetIndent(bool bIndent) = 0; virtual void SetMediaType(const CString &strMediaType) = 0; };
The abstract interface to XML writers.
XML writer is represented as the subclass of
SAX content handler (see
Sax::CContentHandler
).
It accepts the stream of XML content events as input.
The application programmer must specify whether
the input stream is expected to perform namespace
processing (see
Sax
for the detailed
discussion of the namespace processing in SAX).
XML writer generates the output text stream in the specified format and sends it to the specified target URI.
XML writer engine is modelled after the output facility specified in XSL Transformations (XSLT) Version 1.0.
In particular, every XML writer owns a collection of properties
corresponding to various attributes specified for XSLT
xsl:output
element. For each property
the
CXmlWriter
class provides a pair of member
functions designed to get or set the property value.
Each property may be assigned a particular value,
or may be undefined.
Following is the complete list of writer properties. Refer to XSL Transformations (XSLT) Version 1.0 for the detailed description of semantics of these properties.
method
attribute on
xsl:output
.version
attribute on
xsl:output
.encoding
attribute on
xsl:output
.omit-xml-declaration
attribute on
xsl:output
.standalone
attribute on
xsl:output
.doctype-system
attribute on
xsl:output
.doctype-public
attribute on
xsl:output
.indent
attribute on
xsl:output
.media-type
attribute on
xsl:output
.Additionaly, there are two writer properties which have no equivalent in XSLT:
Constructor/Destructor Summary | |
CXmlWriter
();
����������Constructs the XML writer. |
|
~CXmlWriter
();
����������Destroys the XML writer. |
Function Summary | |
bool
|
GetUri
(CString &strUri);
����������Queries the target URI. |
bool
|
GetNamespaces
(bool &bNamespaces);
����������Queries the namespace processing indicator. |
bool
|
GetMethod
(CString &strNamespaceUri, CString &strLocalName);
����������Queries the name of the output method. |
bool
|
GetVersion
(CString &strVersion);
����������Queries the version of the output method. |
bool
|
GetEncoding
(CString &strEncoding);
����������Queries the preferred character encoding. |
bool
|
GetOmitXmlDeclaration
(bool &bOmitXmlDeclaration);
����������Queries the omit XML declaration indicator. |
bool
|
GetStandalone
(bool &bStandalone);
����������Queries the standalone indicator. |
bool
|
GetDoctypePublic
(CString &strDoctypePublic);
����������Queries the document type system identifier. |
bool
|
GetDoctypeSystem
(CString &strDoctypeSystem);
����������Queries the document type public identifier. |
bool
|
GetIndent
(bool &bIndent);
����������Queries the indent indicator. |
bool
|
GetMediaType
(CString &strMediaType);
����������Queries the media type. |
void
|
SetUri
(const CString &strUri);
����������Sets the target URI. |
void
|
SetNamespaces
(bool bNamespaces);
����������Sets the namepace processing indicator. |
void
|
SetMethod
(const CString &strNamespaceUri, const CString &strLocalName);
����������Sets the name of the output method. |
void
|
SetVersion
(const CString &strVersion);
����������Sets the version of the output method. |
void
|
SetEncoding
(const CString &strEncoding);
����������Sets the preferred character encoding. |
void
|
SetOmitXmlDeclaration
(bool bOmitXmlDeclaration);
����������Sets the omit XML declaration indicator. |
void
|
SetStandalone
(bool bStandalone);
����������Sets the standalone indicator. |
void
|
SetDoctypePublic
(const CString &strDoctypePublic);
����������Sets the document type public identifier. |
void
|
SetDoctypeSystem
(const CString &strDoctypeSystem);
����������Sets the document type system identifier. |
void
|
SetIndent
(bool bIndent);
����������Sets the indent indicator. |
void
|
SetMediaType
(const CString &strMediaType);
����������Sets the media type. |
Constructor/Destructor Detail |
CXmlWriter();
Constructs the XML writer.
virtual ~CXmlWriter();
Destroys the XML writer.
Function Detail |
virtual bool GetUri(CString &strUri) = 0;
Queries the target URI.
strUri
- on return, the string representing
the target URI, if definedtrue
if the target URI is defined;
false
otherwisevirtual bool GetNamespaces(bool &bNamespaces) = 0;
Queries the namespace processing indicator.
bNamespaces
- on return, the boolean
namespace processing indicator, if definedtrue
if the namespace processing
indicator is defined;
false
otherwisevirtual bool GetMethod( CString &strNamespaceUri, CString &strLocalName) = 0;
Queries the name of the output method.
strNamespaceUri
- on return, the output
method namespace URI, if definedstrLocalName
- on return, the output
method local name, if definedtrue
if the name of the output
method is defined;
false
otherwisevirtual bool GetVersion(CString &strVersion) = 0;
Queries the version of the output method.
strVersion
- on return, the version of
the output method, if definedtrue
if the version of
the output method is defined,
false
otherwisevirtual bool GetEncoding(CString &strEncoding) = 0;
Queries the preferred character encoding.
strEncoding
- on return, the string
representing the encoding name, if definedtrue
if the encoding name is defined;
false
otherwisevirtual bool GetOmitXmlDeclaration( bool &bOmitXmlDeclaration) = 0;
Queries the omit XML declaration indicator.
bOmitXmlDeclaration
- on return, the boolean
XML declaration indicator, if definedtrue
if the omit XML declaration
indicator is defined;
false
otherwisevirtual bool GetStandalone(bool &bStandalone) = 0;
Queries the standalone indicator.
bStandalone
- on return, the boolean
standalone indicator, if definedtrue
if the standalone indicator
is defined;
false
otherwisevirtual bool GetDoctypePublic(CString &strDoctypePublic) = 0;
Queries the document type system identifier.
strDoctypePublic
- on return, the string
representing the document type system identifier,
if definedtrue
if the document system
identifier is defined;
false
otherwisevirtual bool GetDoctypeSystem(CString &strDoctypeSystem) = 0;
Queries the document type public identifier.
strDoctypeSystem
- on return, the string
representing the document type public identifier,
if definedtrue
if the document system
identifier is defined;
false
otherwisevirtual bool GetIndent(bool &bIndent) = 0;
Queries the indent indicator.
bIndent
- on return, the boolean indent
indicator, if definedtrue
if the indent indicator is
defined;
false
otherwisevirtual bool GetMediaType(CString &strMediaType) = 0;
Queries the media type.
strMediaType
- on return, the string
representing the media type, if definedtrue
if the media type is defined;
false
otherwisevirtual void SetUri(const CString &strUri) = 0;
Sets the target URI.
strUri
- the string representing
the target URIvirtual void SetNamespaces(bool bNamespaces) = 0;
Sets the namepace processing indicator.
bNamespaces
- the boolean namespace
processing indicatorvirtual void SetMethod( const CString &strNamespaceUri, const CString &strLocalName) = 0;
Sets the name of the output method.
strNamespaceUri
- the output method namespace URIstrLocalName
- the output method local namevirtual void SetVersion(const CString &strVersion) = 0;
Sets the version of the output method.
strVersion
- the version of the output methodvirtual void SetEncoding(const CString &strEncoding) = 0;
Sets the preferred character encoding.
strEncoding
- the string representing
the encoding namevirtual void SetOmitXmlDeclaration(bool bOmitXmlDeclaration) = 0;
Sets the omit XML declaration indicator.
bOmitXmlDeclaration
- the boolean omit XML
declaration indicatorvirtual void SetStandalone(bool bStandalone) = 0;
Sets the standalone indicator.
bStandalone
- the boolean standalone indicatorvirtual void SetDoctypePublic( const CString &strDoctypePublic) = 0;
Sets the document type public identifier.
strDoctypePublic
- the string representing
the document type public identifiervirtual void SetDoctypeSystem( const CString &strDoctypeSystem) = 0;
Sets the document type system identifier.
strDoctypeSystem
- the string representing
the document type system identifiervirtual void SetIndent(bool bIndent) = 0;
Sets the indent indicator.
bIndent
- the boolean indent indicatorvirtual void SetMediaType(const CString &strMediaType) = 0;
Sets the media type.
strMediaType
- the string representing
the media type
|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
�PREV CLASS�� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |