save


Purpose
Save an XML document.
Synopsis
procedure save(doc:xmldoc, fname:text)
procedure save(doc:xmldoc, n:integer, fname:text)
Arguments
doc 
Document to save
Node number to use as root node (default: 0)
fname 
Destination file name
Example
This example shows the two versions of this procedure.
 declarations
    DB: xmldoc
    Pers: integer
  end-declarations
  
! Save XML document to file 'results.xml'
  save(DB, "results.xml") 

! Display a subtree on screen
  Pers:= getnode(DB, "personnelList/region/employee[@id='T345']")
  save(DB, Pers, "") 
Further information
1. This routine generates an XML file from the provided xmldoc object. The XML header is produced using the properties defined with setencoding, setxmlversion and setstandalone.
2. When providing an alternative root node, only the specified part of the document tree is exported without any XML header.
3. The document is formatted according to the indentation mode and its associated settings (see setindentmode); XML control characters are encoded (see xmlencode) but no character conversion is performed (i.e. the encoding property of the document as stated via setencoding is saved but not applied to the text of the document).
Related topics
load
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.