LoadXMLFile Method
9.0B, PLBCMP GUI Only
The LoadXMLFile method stores the contents of an XML file into a TREEVIEW object. The method uses the following format:
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A TREEVIEW object that is accessed.
return
Optional. A Numeric Variable that indicates the success or failure of the method.
fname
Required. A Character String Variable or literal that specifies the file name or the XML data stream to be loaded directly.
options
Optional. A decimal number or Numeric Variable that specifies the load options.
Flags Affected: EOS, OVER, ZERO
Note the following:
The {*FileName} parameter allows either the file name of an XML file or an XML data stream as extracted from an XFILE. The XML data stream may be retrieved using the GETFILE XMLDATA.
If the value returned is zero, the ZERO Condition Flag is set.
The OVER and EOS Condition Flags are always cleared.
When running under the PL/B Application Server, the first character of the file name has special meaning:
|
Value |
The file ... |
|
! (exclamation mark) |
resides on the client rather than the server. |
|
? (question mark) |
should be either obtained from the cache or from the server and placed in the cache. |
|
* (asterisk) |
should be either obtained from the in-memory cache or from the server and placed only in the in-memory cache. |
The {options} value is a constant as defined in PLBMETH.INC or a numeric variable indicating one or more of the following option values:
|
Keyword |
Value |
Meaning ... |
|
$TV_XMLRD_IGNORE_ATTR |
0x1 |
Ignore XML attributes in the file |
|
$TV_XMLRD_NO_CONV |
0x2 |
Do not convert an underscore in an element name to blanks. |
|
$TV_XMLRD_ADDLAST |
0x4 |
The data for sub-item element fields is added to the end of a list of sub-items. |
|
$TV_XMLWR_ISO8859 |
0x8 |
Enables ISO8859 encoding |
All <__dnnn> elements are stripped during the load.
A return value of zero (0) indicates success. Failures return one of the I83 subcode values found in the Runtime Reference.
See Also: Method Syntax, TREEVIEW Methods
![]() |