InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IXMLAttributeCommands Class Referenceabstract

#include <IXMLAttributeCommands.h>

Inheritance diagram for IXMLAttributeCommands:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IXMLATTRIBUTECOMMANDS }
 

Public Member Functions

virtual ErrorCode CreateAttribute (const XMLReference &element, const WideString &name, const WideString &value, bool16 removable=kTrue)=0
 
virtual ErrorCode DeleteAttribute (const XMLReference &element, const WideString &name)=0
 
virtual ErrorCode SetAttributeName (const XMLReference &element, const WideString &name, const WideString &newName)=0
 
virtual ErrorCode SetAttributeValue (const XMLReference &element, const WideString &name, const WideString &value)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Exposes methods to change the attributes present in the document logical structure.

Member Function Documentation

virtual ErrorCode IXMLAttributeCommands::CreateAttribute (const XMLReferenceelement,
const WideStringname,
const WideStringvalue,
bool16 removable = kTrue 
)
pure virtual

Method for creating an XML element attribute. Some attributes are generated automatically and should not be removed. If your attribute is one that should not be deleted then set the removable paramter to kFalse. This and related methods may process a command of type kXMLCreateAttributeCmdBoss behind the facade

Parameters
elementreference to the element the attribute will be added to
namethe name of the attribute
valuespecifies the value of the attribute which should be added
removableset to kTrue if attribute should be able to be deleted
Returns
ErrorCode kSucess if the operation could be completed, kFailure otherwise
virtual ErrorCode IXMLAttributeCommands::DeleteAttribute (const XMLReferenceelement,
const WideStringname 
)
pure virtual

Method to delete an attribute. This and related methods may process a command of type kXMLDeleteAttributeCmdBoss behind the facade

Parameters
elementreference to the element that the attribute is to be deleted from
namethe name of the attribute to delete
Returns
ErrorCode kSucess if the operation could be completed, kFailure otherwise
virtual ErrorCode IXMLAttributeCommands::SetAttributeName (const XMLReferenceelement,
const WideStringname,
const WideStringnewName 
)
pure virtual

Change the name of an attribute. This and related methods may process a command of type kXMLSetAttributeNameCmdBoss behind the facade

Parameters
elementreference to the element that the attribute is to be renamed
namethe name of the attribute to be changed
newNamethe new name of the attribute
Returns
ErrorCode kSucess if the operation could be completed, kFailure otherwise
virtual ErrorCode IXMLAttributeCommands::SetAttributeValue (const XMLReferenceelement,
const WideStringname,
const WideStringvalue 
)
pure virtual

Method to change the value of an attribute. This and related methods may process a command of type kXMLSetAttributeValueCmdBoss behind the facade

Parameters
elementreference to the element that the attribute value is to be changed
namespecifies the attribute whose value is to be changed
valuenew value of the attribute
Returns
ErrorCode kSucess if the operation could be completed, kFailure otherwise