SaveXMLFile Method


9.0B, PLBCMP GUI Only

 

The SaveXMLFile method stores the contents of a TREEVIEW in an XML file. The method uses the following format:

 

 

[label]

{object}.SaveXMLFile

[GIVING {return}] USING [*FileName=]{fname}[:

 

 

 

[*Options=]{options}]

 

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.

options

Optional. A decimal number or Numeric Variable that specifies the load options.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. If the value returned is zero, the ZERO Condition Flag is set.

  2. The return value is the same as the I83 sub-code on failure.

  3. The OVER and EOS Condition Flags are always cleared.

  4. When running under the PL/B Application Server, the first character of the file name has special meaning:

  5.  

    Value

    The file ...

    ! (exclamation mark)

    resides on the client rather than the server.

     

  6. The {options} value is a constant as defined in PLBMETH.INC or a numeric variable indicating one or more of the following option values:

  7.  

    Keyword

    Value

    Meaning ...

    $TV_XMLWR_NOATTR

    0x1

    Do not save the attributes of a node. These attributes are the node's image, parameter and selected image values.

    $TV_XMLWR_USE_DTAG

    0x2

    Always output data as a <__dnnn> element.

    $TV_XMLWR_OUTPUTALLATTR

    0x4

    Outputs the image Index, parameter, and selected image attributes.

    $TV_XMLWR_ISO8859

    0x8

    Enables ISO8859 encoding.

    $TV_XMLWR_LOWERCASE

    0x10

    Output the data as lowercase.

    $TV_XMLWR_UPPERCASE

    0x20

    Output the data as uppercase.

    $TV_XMLWR_NOLABEL_KEEP

    0x40

    Prevent output of 'tvn' attribute when a label contains invalid XML tag character(s). (10.6)

     

  8. A child node that has no children of it's own is written as data. If the child has attributes, or has siblings, it is written enclosed by a <__dnnn> element.

  9. Parent node names that contain blanks are converted to underscore (_) characters.

  10. 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

 



PL/B Language Reference LoadXMLFile Method (TREEVIEW) SaveXMLtoDim Method (TREEVIEW)