SaveXml Method (XDATA)
9.8A
The SaveXml method stores the XDATA nodes as a XML formatted string into a file. The method uses the following format:
|
|
|
|
|
|
|
|
Where:
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 prevents the output of the XML Processing Instruction declaration at the beginning of the XML data. |
|
0x2 |
This bit value causes XML constructs to use indenting. |
|
0x4 |
This bit value causes the XML lines to output with a terminating <CR>+<LF> end of record sequence. |
|
0x8 |
This bit value causes leading and trailing spaces to be suppressed when outputting the XML data. |
|
0x10 |
This bit value causes double-quote (") and single-quote (') characters to always be escaped when outputting XML element data. |
|
0x20 |
This bit value causes any character less than 0x20 to be converted to 0x20 for the XML data being output. |
|
0x40 |
This bit value causes a tab character to be used to indent XML tags when outputting the XML data. |
|
0x80 |
This bit value causes encoding to be set for ISO8859. This allows 8-bit character values in the XML data being output. |
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 PL/B Runtime Reference under the 'I(I/O) Errors' in the 'XML base handler subcodes' table for details where the {return} value can be defined as follows:.
|
Value |
Meaning |
|
0 |
XDATA_ERR_NONE (Success) |
|
5nn |
Where 'nn' is a value found in the 'XML base handler subcodes' found in the PL/B Runtime Reference under the 'I(I/O) Errors' section. |
See Also: XDATA, XDATA Methods, Method Syntax
![]() |