TXmlNode() > Methods for XML code xHarbour Developers Network  

oTXmlNode:write()

Writes an XML formatted character string to a file.

Syntax

:write( <nFileHandle>, <nStyle> ) --> lSuccess

Arguments

<nFileHandle>
This is the handle of a file to write XML data to. It is returned from function FCreate().
<nStyle>
This parameter instructs the TXmlNode object how to create the XML code. #define constants listed in Hbxml.ch are used to specify <nStyle>:

Constants for XML code creation
ConstantValueDescription
HBXML_STYLE_INDENT1Indents XML nodes with one space
HBXML_STYLE_TAB2Indents XML nodes with tabs
HBXML_STYLE_THREESPACES4Indents XML nodes with three spaces
HBXML_STYLE_NOESCAPE8Creates unescaped characters
  in data sections

Description

Method :write() writes all XML nodes and data currently held by the TXmlNode object and all sub-nodes to the open file <nFileHandle>. The <nStyle> parameter can be used to indent the nodes for readability, or to leave characters in data sections unescaped.


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe