VCOM:VectorWorks:Filing:IXMLFileNode

From Vectorworks Developer
Jump to navigation Jump to search

.SDK|SDK ..SDK:Types|SDK Types ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference

Description

namespace VectorWorks::Filing

This interface represents a node in an XML file and gives the fuctionality to manipulate that node.

This interface is part of VectorWorks::Filing::IXMLFile. As such it doesn't have IID and cannot be queried.

It is not publicly accessible -- there is no VCOM:VWIID for it.

A client uses VectorWorks::Filing::IXMLFile interface to create instances to this one.

Interface

// ----------------------------------------------------------------------------------------------------
class IXMLFileNode : public IVWUnknown
{
public:
  virtual VCOMError VCOM_CALLTYPE IsEmpty(bool& outValue) = 0;
  virtual VCOMError VCOM_CALLTYPE GetNodeName(TXString& outName) = 0;
  virtual VCOMError VCOM_CALLTYPE GetNodeValue(TXString& outValue) = 0;
  virtual VCOMError VCOM_CALLTYPE SetNodeValue(const TXString& value) = 0;
  virtual VCOMError VCOM_CALLTYPE DeleteNode() = 0;
  virtual VCOMError VCOM_CALLTYPE GetNodeAttributeValue(const TXString& attrName, TXString& outValue) = 0;
  virtual VCOMError VCOM_CALLTYPE SetNodeAttributeValue(const TXString& attrName, const TXString& value) = 0;
  virtual VCOMError VCOM_CALLTYPE DeleteNodeAttribute(const TXString& attrName) = 0;
  virtual VCOMError VCOM_CALLTYPE GetNodeCDATA(TXString& outData) = 0;
  virtual VCOMError VCOM_CALLTYPE GetNodeCDATA(void* binaryData, size_t& inOutNumBytes) = 0;
  virtual VCOMError VCOM_CALLTYPE SetNodeCDATA(const TXString& data) = 0;
  virtual VCOMError VCOM_CALLTYPE SetNodeCDATA(const void* const binaryData, size_t numBytes) = 0;
  virtual VCOMError VCOM_CALLTYPE DeleteNodeCDATA() = 0;
  virtual VCOMError VCOM_CALLTYPE CreateChildNode(const TXString& name, IXMLFileNode** ppOutNode) = 0;
  virtual VCOMError VCOM_CALLTYPE GetChildNode(const TXString& name, IXMLFileNode** ppOutNode) = 0;
  virtual VCOMError VCOM_CALLTYPE GetChildNode(const TXString& name, size_t arrayIndex, IXMLFileNode** ppOutNode) = 0;
  virtual VCOMError VCOM_CALLTYPE GetParentNode(IXMLFileNode** ppOutNode) = 0;
  virtual VCOMError VCOM_CALLTYPE GetFirstChildNode(IXMLFileNode** ppOutNode) = 0;
  virtual VCOMError VCOM_CALLTYPE GetLastChildNode(IXMLFileNode** ppOutNode) = 0;
  virtual VCOMError VCOM_CALLTYPE GetNextSiblingNode(IXMLFileNode** ppOutNode) = 0;
  virtual VCOMError VCOM_CALLTYPE GetPrevSiblingNode(IXMLFileNode** ppOutNode) = 0;
  virtual VCOMError VCOM_CALLTYPE FindChildNode(const TXString& nodeName, IXMLFileNode** ppOutNode) = 0;
  virtual VCOMError VCOM_CALLTYPE GetLastError(EXMLFileError& outError) = 0;
};

Members

IsEmpty Checks to see if this XML node instance represents XML node. If outValue returns true means that this class doesnt represent XML node.
GetNodeName Get this node name.
GetNodeValue Get this node value. The value is the XML node's text.
SetNodeValue Set the node value. The value is the XML node's text.
DeleteNode Deletes the XML node that this interface represent. After this command the instance doesn't contain node -- it is empty.
GetNodeAttributeValue Retreives the specified attribute value. The attribute is represented by it's name.
SetNodeAttributeValue Sets the specified attribute value. The attribute is represented by it's name.
DeleteNodeAttribute Delete the specified attribute. The attribute is represented by it's name.
GetNodeCDATA Get the node's CDATA.
SetNodeCDATA Set the node's CDATA.
DeleteNodeCDATA Delete this node's CDATA.
CreateChildNode Create child node within this node.
GetChildNode Get the first occurance of the child with specified name.
GetParentNode Return the parent node of this one.
GetFirstChildNode Return first child node of this one.
GetLastChildNode Return the last child node of this one.
GetNextSiblingNode Return the next sibling node of this one.
GetPrevSiblingNode Return the previos sibling node of this one.
FindChildNode Finds a child node inside this one.
GetLastError Return the last error that occurding during XML operation.

Remarks

There is predefined type for smart VCOM pointer VCOMPtr to IXMLFileNode interface:

typedef VCOMPtr<IXMLFileNode>  IXMLFileNodePtr;

Version

Available from: VectorWorks 12

See Also

VCOM:VCOMPtr | VCOM:VectorWorks:Filing:IFolderIdentifier | VCOM:VectorWorks:Filing:IFileIdentifier | VCOM:VectorWorks:Filing:IXMLFile

[[VCOM:VCOMPtr]] | [[VCOM:VectorWorks:Filing:IFolderIdentifier]] | [[VCOM:VectorWorks:Filing:IFileIdentifier]] | [[VCOM:VectorWorks:Filing:IXMLFile]]