All Frameworks  Class Hierarchy  This Framework  Next  Indexes

XMLParser Interface CATIDOMAttr

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---XMLParser.CATIDOMNode
        |
        +---CATIDOMAttr
 

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


interface CATIDOMAttr

Interface that refers to an attribute of an XML element.
Typically the allowable values for the attribute are defined in a document type definition.

CATIDOMAttr objects inherit the CATIDOMNode interface, but since attributes are not actually child nodes of the elements they are associated with, the DOM does not consider them part of the document tree. Thus, the returned CATIDOMNode value for the CATIDOMNode.GetParentNode, CATIDOMNode.GetPreviousSibling, and CATIDOMNode.GetNextSibling is NULL_var for CATIDOMAttr objects. The DOM takes the view that attributes are properties of elements rather than having a separate identity from the elements they are associated with ; this should make it more efficient to implement such features as default attributes associated with all elements of a given type. Furthermore, attribute nodes may not be immediate children of a CATIDOMDocumentFragment. However, they can be associated with CATIDOMElement nodes contained within a CATIDOMDocumentFragment. In short, users of the DOM need to be aware that CATIDOMAttr nodes have some things in common with other objects inheriting the CATIDOMNode interface, but they also are quite distinct.

See also:
CATIDOMNode, CATIDOMDocumentFragment, CATIDOMElement


Method Index


o GetName(CATUnicodeString&)
Retrieves the name of this attribute.
o GetOwnerElement(CATIDOMElement_var&)
Retrieves the CATIDOMElement node this attribute is attached.
o GetSpecified(CATBoolean&)
Returns wether the attribute's value was specified or not.
o GetValue(CATUnicodeString&)
Retrieves the value of the attribute.
o SetValue(CATUnicodeString&)
Sets the value of the attribute.

Methods


o GetName
public virtual HRESULT GetName(CATUnicodeString& oName) = 0
Retrieves the name of this attribute.
Parameters:
oName
The name of this attribute.
o GetOwnerElement
public virtual HRESULT GetOwnerElement(CATIDOMElement_var& oOwnerElement) = 0
Retrieves the CATIDOMElement node this attribute is attached. oOwnerElement is set to NULL_var if this attribute is not in use.
Parameters:
oOwnerElement
The retrieved
CATIDOMElement node this attribute is attached.
o GetSpecified
public virtual HRESULT GetSpecified(CATBoolean& oIsSpecified) = 0
Returns wether the attribute's value was specified or not. Returns TRUE if the attribute received its value explicitly in the XML document, or if a value was assigned programatically with the SetValue function. Returns FALSE if the attribute value came from the default value declared in the document's DTD.
Parameters:
oIsSpecified
The retrieved boolean specifying wether the attribute's value was specified or not.
o GetValue
public virtual HRESULT GetValue(CATUnicodeString& oValue) = 0
Retrieves the value of the attribute. The value of the attribute is returned as a string. Character and general entity references are replaced with their values.
Parameters:
oValue
The retrieved value of the attribute.
o SetValue
public virtual HRESULT SetValue( const CATUnicodeString& iValue) = 0
Sets the value of the attribute. A CATIDOMText node with the unparsed contents of the string will be created.
Parameters:
iValue
The value of the DOM attribute to be set.
Errors Returned:
Error Class Error Id Description
CATDOMException XMLParserERR_2207 NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

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

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