All Frameworks  Class Hierarchy  This Framework  Indexes   

XMLParser Interface CATIDOMDocument

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


interface CATIDOMDocument

Interface to refer to XML Document nodes in the DOM.
Conceptually, a DOM document node is the root of the document tree, and provides the primary access to the document's data.

Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a CATIDOMDocument, the CATIDOMDocument interface also contains the factory methods needed to create these objects. The CATIDOMNode objects created have a CATIDOMNode.GetOwnerDocument method which associates them with the CATIDOMDocument within whose context they were created.


Method Index


o CreateAttributeNS(CATUnicodeString&,CATUnicodeString&,CATIDOMAttr_var&)
Creates an attribute of the given qualified name and namespace URI.
o CreateAttribute(CATUnicodeString&,CATIDOMAttr_var&)
Creates a CATIDOMAttr of the given name.
o CreateCDATASection(CATUnicodeString&,CATIDOMCDATASection_var&)
Creates a CATIDOMCDATASection node whose value is the specified string.
o CreateComment(CATUnicodeString&,CATIDOMComment_var&)
Creates a CATIDOMComment node given the specified string.
o CreateDocumentFragment(CATIDOMDocumentFragment_var&)
Creates an empty CATIDOMDocumentFragment object.
o CreateElementNS(CATUnicodeString&,CATUnicodeString&,CATIDOMElement_var&)
Creates an element of the given qualified name and namespace URI.
o CreateElement(CATUnicodeString&,CATIDOMElement_var&)
Creates an element of the type specified.
o CreateEntityReference(CATUnicodeString&,CATIDOMEntityReference_var&)
Creates a CATIDOMEntityReference object.
o CreateProcessingInstruction(CATUnicodeString&,CATUnicodeString&,CATIDOMProcessingInstruction_var&)
Creates a CATIDOMProcessingInstruction node given the specified name and data strings.
o CreateTextNode(CATUnicodeString&,CATIDOMText_var&)
Creates a CATIDOMText node given the specified string.
o GetDocType(CATIDOMDocumentType_var&)
Retrieves the Document Type Declaration associated with this document.
o GetDocumentElement(CATIDOMElement_var&)
Retrieves a reference to the root element of the document.
o GetElementById(CATUnicodeString&,CATIDOMElement_var&)
Retrieves the CATIDOMElement whose ID is given by iElementId.
o GetElementsByTagNameNS(CATUnicodeString&,CATUnicodeString&,CATIDOMNodeList_var&)
Retrieves a CATIDOMNodeList of all the CATIDOMElements with a given local name and namespace URI.
o GetElementsByTagName(CATUnicodeString&,CATIDOMNodeList_var&)
Retrieves a CATIDOMNodeList of all the elements with a given tag name.
o GetImplementation(CATIDOMImplementation_var&)
Return the CATIDOMImplementation object that handles this document.
o ImportNode(CATIDOMNode_var&,CATBoolean&,CATIDOMNode_var&)
Imports a copy of a node from another document into this document.

Methods


o CreateAttributeNS
public virtual CreateAttributeNS( const iNamespaceURI,
const iQualifiedName,
oAttribute)
Creates an attribute of the given qualified name and namespace URI.
Parameters:
iNamespaceURI
The namespace URI of the attribute to create. When it is an empty
CATUnicodeString, this method behaves like CreateAttribute.
iQualifiedName
The qualified name of the attribute type to instantiate.
oAttribute
A new
CATIDOMAttr object. The attribute has the following characteristics:
Attribute Value
CATIDOMNode.GetNodeName iQualifiedName
CATIDOMNode.GetNamespaceURI iNamespaceURI
CATIDOMNode.GetPrefix prefix, extracted from iQualifiedName, or an empty CATUnicodeString if there is no prefix
CATIDOMNode.GetLocalName local name, extracted from iQualifiedName
CATIDOMAttr.GetName iQualifiedName
CATIDOMNode.GetNodeValue the empty CATUnicodeString
Errors Returned:
Error Class Error Id Description
CATDOMException XMLParserERR_2205 INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.
o CreateAttribute
public virtual CreateAttribute( const iName,
oAttribute)
Creates a CATIDOMAttr of the given name. Note that the CATIDOMAttr instance can then be attached to a CATIDOMElement using the CATIDOMElement.SetAttribute method.
Parameters:
iName
The name of the attribute.
oAttribute
A
CATIDOMAttr that references the newly created Attr.
Errors Returned:
Error Class Error Id Description
CATDOMException XMLParserERR_2205 INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.
See also:
CATIDOMAttr
o CreateCDATASection
public virtual CreateCDATASection( const iData,
oCDDataSection)
Creates a CATIDOMCDATASection node whose value is the specified string.
Parameters:
iData
The data for the
CATIDOMCDATASection contents.
oCDDataSection
A
CATIDOMCDATASection object.
Errors Returned:
Error Class Error Id Description
CATDOMException XMLParserERR_2209 NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
See also:
CATIDOMCDATASection
o CreateComment
public virtual CreateComment( const iData,
oComment)
Creates a CATIDOMComment node given the specified string.
Parameters:
iData
The data for the comment.
oComment
A
CATIDOMComment that references the newly created comment node.
See also:
CATIDOMComment
o CreateDocumentFragment
public virtual CreateDocumentFragment( oDocumentFragment)
Creates an empty CATIDOMDocumentFragment object.
Parameters:
oDocumentFragment
A
CATIDOMDocumentFragment that references the newly created document fragment.
See also:
CATIDOMDocumentFragment
o CreateElementNS
public virtual CreateElementNS( const iNamespaceURI,
const iQualifiedName,
oElementNS)
Creates an element of the given qualified name and namespace URI.
Parameters:
iNamespaceURI
The namespace URI of the element to create. When it is an empty
CATUnicodeString, this method behaves like CreateElement.
iQualifiedName
The qualified name of the element type to instantiate.
oElementNS
A new
CATIDOMElement object. The element has the following characteristics:
Attribute Value
CATIDOMNode.GetNodeName iQualifiedName
CATIDOMNode.GetNamespaceURI iNamespaceURI
CATIDOMNode.GetPrefix prefix, extracted from iQualifiedName, or an empty CATUnicodeString if there is no prefix
CATIDOMNode.GetLocalName local name, extracted from iQualifiedName
CATIDOMElement.GetTagName iQualifiedName
Errors Returned:
Error Class Error Id Description
CATDOMException XMLParserERR_2205 INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.
o CreateElement
public virtual CreateElement( const iTagName,
oElement)
Creates an element of the type specified. Note that the instance returned implements the CATIDOMElement interface, so attributes can be specified directly on the returned object.
Parameters:
iTagName
The name of the element type to instantiate.
oElement
A
CATIDOMElement that references the new element.
Errors Returned:
Error Class Error Id Description
CATDOMException XMLParserERR_2205 INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.
See also:
CATIDOMElement
o CreateEntityReference
public virtual CreateEntityReference( const iName,
oEntityReference)
Creates a CATIDOMEntityReference object.
Parameters:
iName
The name of the entity to reference.
oEntityReference
A
CATIDOMEntityReference that references the newly created EntityReference node.
Errors Returned:
Error Class Error Id Description
CATDOMException XMLParserERR_2205 INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.
See also:
CATIDOMEntityReference
o CreateProcessingInstruction
public virtual CreateProcessingInstruction( const iTarget,
const iData,
oProcessingInstruction)
Creates a CATIDOMProcessingInstruction node given the specified name and data strings.
Parameters:
iTarget
The target part of the processing instruction.
iData
The data for the node.
oProcessingInstruction
A
CATIDOMProcessingInstruction that references the newly created PI node.
Errors Returned:
Error Class Error Id Description
CATDOMException XMLParserERR_2205 INVALID_CHARACTER_ERR: Raised if an invalid character is specified.
See also:
CATIDOMProcessingInstruction
o CreateTextNode
public virtual CreateTextNode( const iData,
oTextNode)
Creates a CATIDOMText node given the specified string.
Parameters:
iData
The data for the node.
oTextNode
A
CATIDOMText object that references the newly created text node.
See also:
CATIDOMText
o GetDocType
public virtual GetDocType( oDocumentType)
Retrieves the Document Type Declaration associated with this document. For documents without a document type declaration oDocumentType is set to NULL_var. The DOM Level 1 does not support editing the Document Type Declaration, therefore oDocumentType cannot be altered in any way.
Parameters:
oDocumentType
The retrieved Document Type Declaration associated with this document.
See also:
CATIDOMDocumentType
o GetDocumentElement
public virtual GetDocumentElement( oDocumentElement)
Retrieves a reference to the root element of the document.
Parameters:
oDocumentElement
The retrieved reference to the root element of the document.
See also:
CATIDOMElement
o GetElementById
public virtual GetElementById( const iElementId,
oElement)
Retrieves the CATIDOMElement whose ID is given by iElementId. If no such element exists, returns NULL_var. Behavior is not defined if more than one element has this ID.
Parameters:
iElementId
The unique id value for an element.
oElement
The matching element.
o GetElementsByTagNameNS
public virtual GetElementsByTagNameNS( const iNamespaceURI,
const iLocalName,
oNodeList)
Retrieves a CATIDOMNodeList of all the CATIDOMElements with a given local name and namespace URI. The elements are returned in the order in which they would be encountered in a preorder traversal of the CATIDOMDocument tree.
Parameters:
iNamespaceURI
The namespace URI of the elements to match on. The special value "*" matches all namespaces. When it is an empty
CATUnicodeString, this method behaves like GetElementsByTagName.
iLocalName
The local name of the elements to match on. The special value "*" matches all local names.
oNodeList
A new
CATIDOMNodeList object containing all the matched instances of CATIDOMElement.
o GetElementsByTagName
public virtual GetElementsByTagName( const iTagName,
oNodeList)
Retrieves a CATIDOMNodeList of all the elements with a given tag name. The returned node list is "live", in that changes to the document tree made after a nodelist was initially returned will be immediately reflected in the node list. The elements in the node list are ordered in the same order in which they would be encountered in a preorder traversal of the CATIDOMDocument tree.
Parameters:
iTagName
The name of the tag to match on. The special value "*" matches all tags.
oNodeList
A reference to a
CATIDOMNodeList containing all the matched instances of CATIDOMElement.
See also:
CATIDOMNodeList
o GetImplementation
public virtual GetImplementation( oImplementation)
Return the CATIDOMImplementation object that handles this document.
Parameters:
oImplementation
The retrieved
CATIDOMImplementation object that handles this document.
See also:
CATIDOMImplementation
o ImportNode
public virtual ImportNode( const iNode,
const iDeep,
oNode)
Imports a copy of a node from another document into this document. The source node, which may belong to a different document, is copied, with the copy belonging to this document. The copy is not placed into the document (the parent node is NULL_var).
Parameters:
iNode
The node to import.
iDeep
If TRUE, recursively import the subtree under the specified node; if FALSE, import only the node itself (and its attributes, if if is a CATIDOMElement.
oNode
The newly created copy of the source node, belonging to this document

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

Copyright © 2003, Dassault Systèmes. All rights reserved.