Name: | XML |
Version: | 1.0 |
ID: | ID_XML |
Status: | In Development |
Category: | Data |
Include: | pandora/data/xml.h |
Date: | January 2004 |
Author: | Rocklyte Systems |
Copyright: | Rocklyte Systems (c) 2001-2004. All rights reserved. |
The XML class provides the necessary functionality to create and maintain XML data files. It is capable of interpreting and validating XML files with or without correct structure and can perform various data manipulations while doing so. The XML class is also designed to minimise the amount of resources used in storing XML information and exhibits excellent performance in its processing.
Data can be loaded into an XML object either by specifying a file Location or by giving it an XML Statement. If you have multiple XML statements to process, you can reset the Location or Statement fields after initialisation and the XML object will rebuild itself. This saves you from having to allocate multiple XML objects for batch processing.
Once an XML object has interpreted a statement, you can read the information by scanning the array stored in the Tags field. This array contains an XMLTag structure for each tag found in the original XML statement. For more information on how to scan this information, refer to the Tags field.
The XML class supports the following actions:
Clear Clears all of the data held in an XML object. DataChannel XML data can be added to an XML object through this action. GetUnlistedField Retrieves data from an xml object. Reset Clears the information held in an XML object. SaveToObject Saves XML data to a data storage object.
The XML class implements the following methods:
GetXMLContent Extracts the content embedded inside an XML tag. GetXMLString Retrieves data from an XML object in standard XML string format. RemoveXMLTag Removes tag(s) from the XML structure. SetXMLAttribute Adds and updates XML attributes. SortXML Sorts XML tags to your specifications.
The XML object consists of the following public fields:
CurrentTag Determines the index of the main tag to use when building XML strings. Flags Optional flags. Location Set this field if the XML statement originates from a file source. Statement XML data is processed through this field. TagCount Reflects the total number of tags in the XML array. Tags Points to an array of tags loaded into an XML object.
Method: | GetXMLString() | |||||||||||||||||||
Synonym: | GetString | |||||||||||||||||||
Short: | Retrieves data from an XML object in standard XML string format. | |||||||||||||||||||
Arguments: |
| |||||||||||||||||||
|
Method: | RemoveXMLTag() | ||||
Synonym: | RemoveTag | ||||
Short: | Removes tag(s) from the XML structure. | ||||
Arguments: |
| ||||
|
Method: | SetXMLAttribute() | |||||||||
Synonym: | SetAttribute | |||||||||
Short: | Adds and updates XML attributes. | |||||||||
Arguments: |
| |||||||||
|
Method: | SortXML() | |||||||||||
Short: | Sorts XML tags to your specifications. | |||||||||||
Arguments: |
| |||||||||||
|
Field: | CurrentTag | |
Short: | Determines the index of the main tag to use when building XML strings. | |
Type: | LONG | |
Status: | Read/Write | |
|
Field: | Flags | |||||||||||||
Short: | Optional flags. | |||||||||||||
Type: | LONG | |||||||||||||
Prefix: | XMF | |||||||||||||
Status: | Read/Write | |||||||||||||
|
Field: | Location | |
Synonyms: | Src | |
Short: | Set this field if the XML statement originates from a file source. | |
Type: | STRING | |
Status: | Read/Write | |
|
Field: | Statement | |
Short: | XML data is processed through this field. | |
Type: | STRING | |
Status: | Get/Set | |
|
Field: | TagCount | |
Short: | Reflects the total number of tags in the XML array. | |
Type: | LONG | |
Status: | Read | |
|
Field: | Tags | |
Short: | Points to an array of tags loaded into an XML object. | |
Type: | struct XMLTag ** | |
Status: | Read | |
|