XMLParserItf 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 , the
interface also contains the factory methods needed to create these objects. The
objects created have a
method which associates them with the
within whose context they were created.
Method Index
- o
CreateAttribute(CATUnicodeString&,CATIDOMAttr_var&)
- Creates a CATIDOMAttr of the given name.
- o
CreateAttributeNS(CATUnicodeString&,CATUnicodeString&,CATIDOMAttr_var&)
- Creates an attribute of the given qualified name and namespace URI.
- 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
CreateElement(CATUnicodeString&,CATIDOMElement_var&)
- Creates an element of the type specified.
- o
CreateElementNS(CATUnicodeString&,CATUnicodeString&,CATIDOMElement_var&)
- Creates an element of the given qualified name and namespace URI.
- 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
GetElementsByTagName(CATUnicodeString&,CATIDOMNodeList_var&)
- Retrieves a CATIDOMNodeList of all the elements with a
given tag name.
- o
GetElementsByTagNameNS(CATUnicodeString&,CATUnicodeString&,CATIDOMNodeList_var&)
- Retrieves a CATIDOMNodeList of all the CATIDOMElements
with a given local name and namespace URI.
- 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 CreateAttribute
public virtual CreateAttribute( | const | iName, |
| | oAttribute) |
-
Creates a CATIDOMAttr of the given name.
Note that the
instance can then be attached to a
using the
method.
- Parameters:
-
- iName
- The name of the attribute.
- oAttribute
- A
that references the newly created Attr.
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2205 |
INVALID_CHARACTER_ERR: Raised if the specified name contains an
invalid character. |
- See also:
-
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
, this method behaves like
.
- iQualifiedName
- The qualified name
of the attribute type to instantiate.
- oAttribute
- A new
object. The attribute has the following characteristics:
Attribute |
Value |
|
iQualifiedName |
| iNamespaceURI |
| prefix, extracted from
iQualifiedName, or an empty
if there is no prefix |
| local name, extracted from
iQualifiedName |
|
iQualifiedName |
| the empty
|
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2205 |
INVALID_CHARACTER_ERR: Raised if the specified name contains an
invalid character. |
o CreateCDATASection
public virtual CreateCDATASection( | const | iData, |
| | oCDDataSection) |
-
Creates a CATIDOMCDATASection node whose value is the specified
string.
- Parameters:
-
- iData
- The data for the
contents.
- oCDDataSection
- A
object.
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2209 |
NOT_SUPPORTED_ERR: Raised if this document is an HTML document. |
- See also:
-
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
that references the newly created comment node.
- See also:
-
o CreateDocumentFragment
public virtual CreateDocumentFragment( | | oDocumentFragment) |
-
Creates an empty CATIDOMDocumentFragment object.
- Parameters:
-
- oDocumentFragment
- A
that references the newly created document fragment.
- See also:
-
o CreateElement
public virtual CreateElement( | const | iTagName, |
| | oElement) |
-
Creates an element of the type specified.
Note that the instance returned implements the
interface, so attributes can be specified directly on the returned object.
- Parameters:
-
- iTagName
- The name of the element type to instantiate.
- oElement
- A
that references the new element.
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2205 |
INVALID_CHARACTER_ERR: Raised if the specified name contains an
invalid character. |
- See also:
-
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
, this method behaves like
.
- iQualifiedName
- The qualified name of the element type to instantiate.
- oElementNS
- A new
object. The element has the following characteristics:
Attribute |
Value |
|
iQualifiedName |
|
iNamespaceURI |
| prefix, extracted
from iQualifiedName, or an empty
if there is no prefix |
| local name, extracted from
iQualifiedName |
|
iQualifiedName |
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2205 |
INVALID_CHARACTER_ERR: Raised if the specified name contains an
invalid character. |
o CreateEntityReference
public virtual CreateEntityReference( | const | iName, |
| | oEntityReference) |
-
Creates a CATIDOMEntityReference object.
- Parameters:
-
- iName
- The name of the entity to reference.
- oEntityReference
- A
that references the newly created EntityReference node.
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2205 |
INVALID_CHARACTER_ERR: Raised if the specified name contains an
invalid character. |
- See also:
-
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
that references the newly created PI node.
- Errors Returned:
-
Error Class |
Error Id |
Description |
| XMLParserERR_2205 |
INVALID_CHARACTER_ERR: Raised if an invalid character is specified. |
- See also:
-
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
object that references the newly created text node.
- See also:
-
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:
-
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:
-
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 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
tree.
- Parameters:
-
- iTagName
- The name of the tag to match on. The special value "*"
matches all tags.
- oNodeList
- A reference to a
containing all the matched instances of
.
- See also:
-
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
tree.
- Parameters:
-
- iNamespaceURI
- The namespace URI of
the elements to match on. The special value "*" matches all
namespaces. When it is an empty
, this method behaves like
.
- iLocalName
- The local name of the
elements to match on. The special value "*" matches all local names.
- oNodeList
- A new
object containing all the matched instances of
.
o GetImplementation
public virtual GetImplementation( | | oImplementation) |
-
Return the CATIDOMImplementation object that handles this document.
- Parameters:
-
- oImplementation
- The retrieved
object that handles this document.
- See also:
-
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: CatXmlItfExt
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.