Initializing help system before first use

load

Purpose
Load an XML document.
Synopsis
procedure load(doc:xmldoc, fname:text)
Arguments
doc 
Document to use
fname 
File name of the document to load
Example
This code reads in a document and displays its contents on screen applying automatic formatting instead of its original formatting.
  declarations
    DB: xmldoc
  end-declarations

! Reading data from an XML file
  load(DB, "refexample.xml")

! Set indentation mode for XML output (default after load: MANUAL)
  setindentmode(DB, XML_AUTO)

! Display document contents on screen
  save(DB, "")
Further information
This routine replaces the content of the provided document object with the XML file given as second argument: all properties of the document are reset to their default value and the indentation mode is set to XML_MANUAL (see setindentmode). Vertical and horizontal spacing of each loaded node are set in order to preserve as much as possible the original formatting of the document. If the file cannot be accessed or if an error occurs during reading, the procedure generates an IO error (which may be intercepted if the control parameter ioctrl is true).
Related topics
Module

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.