Initializing help system before first use

load

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.
Related topics
Module