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 Ana Raquel Gouveia Amaro <an...@ergoprocesso.pt> on 2001/09/20 18:06:19 UTC

generating XML through Xerces

Hi. I'm new at this "XML and DOM stuff", specially DOM.
I need to make an application that receives input from an user and writes
these inputs in a XML file. I've been reading the documentation provided at
the Xerces web page, but I couldn't find any information on how to write the
information to the file. I need to be able to change the file each time the
application is run by the user. What I need to know in order to do this is
if there is documentation that explains the main existing functions that can
be used to create / modify the XML file.

Thanks
Ana Raquel


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


Re: generating XML through Xerces

Posted by Gavin Stokes <ga...@AmbitiousProductions.com>.
Hi Ana.

The reason you didn't find any documentation about file output is because 
there is no such capability specified by the DOM spec.  Incredibly, the 
spec provides no way to get XML out of your XML document.  And thus, 
neither does Xerces.

Every time this question is asked (and it's asked A LOT, understandably), 
people will refer you to the DOMPrint example.  I have to admit that I 
found this example to be somewhat tedious, and in fact I ended up 
abandoning the entire C++ version of Xerces and rewriting everything in 
Java.  Java language features made it easy to get XML out of a DOM document.

Good luck!
Gavin


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


RE: generating XML through Xerces

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

I've written a class that outputs XML to any stream. Feel free to use and
amend it. No warranties :)

> -----Original Message-----
> From: Ana Raquel Gouveia Amaro [mailto:ana.raquel@ergoprocesso.pt]
> Sent: Thursday, September 20, 2001 18:06 PM
> To: xerces C++ XML
> Subject: generating XML through Xerces
>
>
> Hi. I'm new at this "XML and DOM stuff", specially DOM.
> I need to make an application that receives input from an user and writes
> these inputs in a XML file. I've been reading the documentation
> provided at
> the Xerces web page, but I couldn't find any information on how
> to write the
> information to the file. I need to be able to change the file
> each time the
> application is run by the user. What I need to know in order to do this is
> if there is documentation that explains the main existing
> functions that can
> be used to create / modify the XML file.
>
> Thanks
> Ana Raquel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>