The structure ST_XmlItem is used to describe an element or an attribute that is read from or written to an XML file.
| 
 Name  | 
 Data type  | 
 Description  | 
|---|---|---|
| 
 diParentIndex  | 
 DINT  | 
 Indicates the index of the array where the parent element of the XML item is located (refer to Example for Hierarchical Relations Indicated by uiParentIndex). 
NOTE: The value of -1 indicates the root element and is reserved for the very first item of the array.
 
 | 
| 
 sName  | 
 STRING[GPL.Gc_uiXmlLengthOfString]  | 
 Name of the element or attribute.  | 
| 
 sValue  | 
 STRING[GPL.Gc_uiXmlLengthOfString]  | 
 Value of the element or attribute.  | 
| 
 etType  | 
 ET_XmlItemType  | 
 Indicates the type of the XML item.  | 
| 
 uiNumOfAttributes  | 
 ULINT  | 
 This value depends on the type of the XML item: 
  | 
The example illustrates the correlation between the parameter uiParentIndex in the buffer of type XmlItems provided by the application and the hierarchical structure in the XML document.
| 
 XML document  | 
 Buffer of type XmlItems provided by the application  | 
|---|---|
 | 
 
 | 
| 
 Element  | 
 Parent index  | 
 Explanation  | 
|---|---|---|
| 
 
  | 
 –1  | 
 
  | 
| 
 
  | 
 0  | 
 
  | 
| 
 
  | 
 0  | 
|
| 
 
  | 
 0  | 
|
| 
 
  | 
 3  | 
 
  |