XML Structure

<< Click to Display Table of Contents >>

Navigation:  Concepts >

XML Structure

The XML structure consists of header, instructions, footer.




<?xml version="1.0" encoding="UTF-8" standalone="no"?>

Standard XML  Declaration string.

<cadsofttools version="2.0">

Standard CADSoftTools XML Declaration string.


Instructions are XML nodes that store all needed parameters to manage CADEditorX.



Adds entities. The ADD instruction adds entities and the Drawing Structure Data to the current drawing. There are many examples of adding particular classes by the ADD instruction that are described in  the Classes examples.

 <!-- The following line adds a line. -->

Commentary inside XML.

   <cstLine Point="0,0,0" Point1="10,0,0"/>

Nodes inside the <Add/> instruction are Entities Classes. This code adds Line with the following coordinate parameters Point.X = 0; Point.Y=0; Point.Z=0 and Point1.X=1; Point1.Y=1; Point1.Z=1.

<cstLine />


<cstLine/> is an empty-element tag while <Add> has the end tag.

<FitToSize/> - Fit to Size instruction

The Fit to Size instruction.


Learn more about tag syntax.



End-tag for the <cadsofttools> node.

The XML code described above is contained inside XML IDE:


When the Execute XML button is pressed, the line is added and zoomed to window:


After pressing Execute XML, CADEditorX also returns the result in XML format:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<cadsofttools version="2.0">  
   <Result Instruction="add">          
       <Created Handle="$22" Position="6,6"/>
   <Result Instruction="FitToSize"/>


Result has the same Header and Footer:


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<cadsofttools version="2.0">  





Results are contained inside the <Results> tag. Each instruction returns to the <Result> tag

<Result> has subnodes: <Output> or <Errors>:

       <Created Handle="$22" Position="6,6"/>


The <Created> node means that a new Entitiy (Class) is created.



Unique identification of the Entity.


Position in the input XML file where this instruction was written.


The last one is used for debugging. Just double-click the Result inside XML IDE and the instruction will be highlighted in the input window:


Go to CADEditorX