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
1. 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.
2. The parser accepts USACII, UTF8 and ISO-8859-1 encoded documents (documents using other encodings are not supported). Texts are stored in their original encoding: no conversion is performed. However, XML encoded symbols (e.g. &) are replaced by the corresponding symbol.
Related topics
save
Module
mmxml


If you have any comments or suggestions about these pages, please send mail to support@fico.com.

© Copyright 2001-2013 Fair Isaac Corporation. All rights reserved.