CTT_DomNode

Top  Previous  Next

Code generation > Supporting code > CTT_DomNode

 

class CTT_DomNode;

 

 

dnode's in the interpreter are defined as typedef of CTT_DomNode in the exported code.CTT_DomNode capsules a xercesc DOMElement with a xercesc DOMText child. So you can use CTT_DomNode in the same manner as CTT_Node, The name  of the DOMElement represents the label of the node and the value of the DOMText is the value of the node. If you write a CTT_DomNode into a XML file, you get:

 

<label>value</label>

 

While the memory is internally managed for a CTT_Node by reference count of all nodes of a tree, a CTT_DomNode is managed by xerces.

 

If you use  dnodes, you have to chose CTT_ParseStateDomPlugin, and the Xerces library has to be linked to the produced code.

 

 

Before a parser is called in the generated c++ code, the default label has to be set. CTT_DomNode has a static method for this purpose.

 

dnode::SetDefaultLabel(L"default_label");

 

 



This page belongs to the TextTransformer Documentation

Home  Content  German