You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Awasthi, Anand" <An...@bmc.com> on 2001/06/14 17:24:29 UTC

DOM Print Sample -- generate XML from DOM

Hi,


I am going thru the DOMPrint sample looking for  how to Generatre XML from
DOM Tree.

actually i want the output XML in two ways :


1.) output xml to come out into the string , which i wll pass a argument 
2.)  output xml  to come into the file, i will pass file name  as argument 

could some pls provide me some example of above cases ??

thanks a lot 


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


RE: DOM Print Sample -- generate XML from DOM

Posted by Evert Haasdijk <ev...@zukkespijkers.nl>.
Anand,

Here's an example of a class I wrote to do just that.
Feel free to use this code; it writes to any std::ostream, so you can use it
for files, strings or stdout. No warranties, though ;-)

Share and enjoy!


> -----Original Message-----
> From: Awasthi, Anand [mailto:Anand_Awasthi@bmc.com]
> Sent: Thursday, June 14, 2001 17:24 PM
> To: 'xerces-c-dev@xml.apache.org'
> Subject: DOM Print Sample -- generate XML from DOM
>
>
> Hi,
>
>
> I am going thru the DOMPrint sample looking for  how to Generatre XML from
> DOM Tree.
>
> actually i want the output XML in two ways :
>
>
> 1.) output xml to come out into the string , which i wll pass a argument
> 2.)  output xml  to come into the file, i will pass file name  as
> argument
>
> could some pls provide me some example of above cases ??
>
> thanks a lot
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>