LoadXml Method (XDATA)
9.8A
The LoadXml method loads XML data into a XDATA object. The input data can be loaded directly from a DIM variable or from a specified file that contains a valid XML stream. The new XML data replaces all currently existing data in the XDATA object. The method uses the following format:
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. An XDATA object.
Optional. A Numeric Variable that receives a value to signify a pass or fail condition for the method execution.
Required. A Character String Variable or literal that that specifies a fully qualified path and file name that contains the XML data stream. Additionally, the {data} string value can be the actual XML data stream.
Optional. A Numeric Variable or decimal number that specifies a bit mask value to control the operations of this method.
Flags Affected: EOS, OVER, ZERO
Note the following:
The ZERO flag is set if the {return} value is zero.
The OVER flag is set TRUE if the {return} variable is too small where the returned value is truncated.
The EOS flag is always cleared.
The *OPTIONS {mask} values are defined as follows:
|
Value |
Description |
|
0x1 |
This bit value indicates that the {data} method parameter contains a path and file name which contains the XML data to be loaded. |
|
0x2 |
Open a XML file in read only mode. |
The {return} value is a zero if the method execution is successful. Otherwise, a non-zero value is returned to indicate an error has occurred. See the XDATA Method Return Values for more details.
This method can return these values:
|
Value |
Meaning |
|
0 |
XDATA_ERR_NONE (Success) |
|
1 |
XDATA_ERR_NO_MEM |
|
12 |
XDATA_ERR_OPEN_FAILED |
|
13 |
XDATA_ERR_PARSER_CREATE |
|
14 |
XDATA_ERR_PARSE |
See Also: XDATA, XDATA Methods, Method Syntax
![]() |