XMLParserItf Interface CATIXMLDOMDocumentBuilder

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIXMLDOMDocumentBuilder

Interface to parse or to create DOM documents.


Method Index


o CreateDocument(CATIDOMDocument_var&)
Creates a new empty DOM document.
o GetDOMImplementation(CATIDOMImplementation_var&)
Retrieves the DOM implementation object for this implementation.
o GetSupportedOptions(CATListOfCATUnicodeString&)
Returns the list of options which can be used to customize the Parse methods.
o Parse(CATUnicodeString&,CATIDOMDocument_var&,CATListOfCATUnicodeString&,CATListOfCATUnicodeString&,CATISAXEntityResolver_var&,CATISAXErrorHandler_var&)
Parses the supplied URI to generate a DOM document.
o Parse(CATISAXInputSource_var&,CATIDOMDocument_var&,CATListOfCATUnicodeString&,CATListOfCATUnicodeString&,CATISAXEntityResolver_var&,CATISAXErrorHandler_var&)
Parses the supplied input source to generate a DOM document.
o Write(CATIDOMNode_var&,CATUnicodeString&,CATListOfCATUnicodeString&,CATListOfCATUnicodeString&)
Writes the node in a CATUnicodeString.
o WriteToFile(CATIDOMNode_var&,CATUnicodeString&,CATListOfCATUnicodeString&,CATListOfCATUnicodeString&)
Writes the node to the specified file.

Methods


o CreateDocument
public virtual CreateDocument( oDocument)
Creates a new empty DOM document.
Parameters:
oDocument
The resulting
o GetDOMImplementation
public virtual GetDOMImplementation( oImplementation)
Retrieves the DOM implementation object for this implementation.
Parameters:
oImplementation
the DOM implementation object for this implementation
o GetSupportedOptions
public virtual GetSupportedOptions( oOptions)
Returns the list of options which can be used to customize the Parse methods.
Parameters:
oOptions
The list of options supported by the
methods. The current list of options is
Option name Description Possible values Default value
CATDoValidation Specifies if validation check is performed during parse true or false true
CATEnableNameSpaces Specifies if the builder is XML namespace aware true or false true (NB: false is not supported by MSXML)
CATExpandEntityReferences Specifies if the builder expands entity reference at parse time true or false false
o Parse
public virtual Parse( const iSystemId,
oDocument,
const iOptions= CATListOfCATUnicodeString(),
const iOptionValues= CATListOfCATUnicodeString(),
const iEntityResolver= NULL_var,
const iErrorHandler= NULL_var)
Parses the supplied URI to generate a DOM document.
Parameters:
iSystemId
The URI of the entity to parse
oDocument
The resulting
iOptions
The names of the options to set
iOptionValues
The values of the options to set.
iEntityResolver
An optional
which can be used to resolve entities during parse.
iErrorHandler
An optional
which can be used to control the errors during parse.
Errors Returned:
Error Class Error Id Description
XMLParserERR_2100 Invalid options definition
XMLParserERR_2101 Unsupported option
XMLParserERR_2102 Illegal option value
XMLParserERR_2000 If an error (such as a not well formed XML document) occurs during parse
XMLParserERR_2001 If an I/O error occurs during parse
o Parse
public virtual Parse( const iInputSource,
oDocument,
const iOptions= CATListOfCATUnicodeString(),
const iOptionValues= CATListOfCATUnicodeString(),
const iEntityResolver= NULL_var,
const iErrorHandler= NULL_var)
Parses the supplied input source to generate a DOM document.
Parameters:
iInputSource
The
to parse
oDocument
The resulting
iOptions
The names of the options to set
iOptionValues
The values of the options to set.
iEntityResolver
An optional
which can be used to resolve entities during parse.
iErrorHandler
An optional
which can be used to control the errors during parse.
Errors Returned:
Error Class Error Id Description
XMLParserERR_2100 Invalid options definition
XMLParserERR_2101 Unsupported option
XMLParserERR_2102 Illegal option value
XMLParserERR_2000 If an error (such as a not well formed XML document) occurs during parse
XMLParserERR_2001 If an I/O error occurs during parse
o Write
public virtual Write( const iNode,
oResult,
const iOptions= CATListOfCATUnicodeString(),
const iOptionValues= CATListOfCATUnicodeString())
Writes the node in a CATUnicodeString.
Parameters:
iNode
the root of the DOM tree to write
oResult
the resulting
iOptions
The names of the options to set
iOptionValues
The values of the options to set. The current list of options is
Option name Description Possible values Default value
CATExpandEntityReferences Specifies if the entities references are to be expanded in the generated XML text true or falsefalse
CATEncoding If the node is a document node, the supplied value will be inserted in the 'encoding' attribute of the XML header Do not specify this attribute if you want the XML parser to autodetect the encoding. encoding valueempty
CATSortAttributes Sorts the attributes of each elements alphabetically. true or falsefalse
CATIndentation Controls how the output is formatted to produce human-readable indented XML. A positive or null integer specifying the number of indentation characters to insert before each element 0 (no identation)
CATIndentationCharacter Specifies the indentation character to use when indentation is requested. A valid indentation character (space or tab) space
Errors Returned:
Error Class Error Id Description
XMLParserERR_2100 Invalid options definition
XMLParserERR_2101 Unsupported option
XMLParserERR_2102 Illegal option value
o WriteToFile
public virtual WriteToFile( const iNode,
const iPath,
const iOptions= CATListOfCATUnicodeString(),
const iOptionValues= CATListOfCATUnicodeString())
Writes the node to the specified file.
Parameters:
iNode
the root of the DOM tree to write
iPath
the path of the file to write
iOptions
The names of the options to set
iOptionValues
The values of the options to set. The current list of options is
Option name Description Possible values Default value
CATExpandEntityReferences Specifies if the entities references are to be expanded in the generated XML text true or falsefalse
CATEncoding The encoding to use to write the file. Furthermore if the node is a document node, the supplied value will be inserted in the 'encoding' attribute of the XML header. Note that you should not normally use an empty value since it makes the XML file not portable from one platform to another. However, if you want to edit the XML file with an external, plain text editor which does not support UTF-8 and you do not wish to exchange files, this value can exceptionally be used. UTF-8, UTF-16 or empty UTF-8
CATSortAttributes Sorts the attributes of each elements alphabetically. true or falsefalse
CATIndentation Controls how the output is formatted to produce human-readable indented XML. A positive or null integer specifying the number of indentation characters to insert before each element 0 (no identation)
CATIndentationCharacter Specifies the indentation character to use when indentation is requested. A valid indentation character (space or tab) space
Errors Returned:
Error Class Error Id Description
XMLParserERR_2100 Invalid options definition
XMLParserERR_2101 Unsupported option
XMLParserERR_2102 Illegal option value

This object is included in the file: CATIXMLDOMDocumentBuilder.h
If needed, your Imakefile.mk should include the module: CatXmlItfExt

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.