Solved

How do I write a DOM Document into a istream?

Posted on 2008-10-23
2
977 Views
Last Modified: 2013-11-13
I would like to know how to write a Xerces DOM Document tree into a istream type.(preferably with an example).

 I will later need to pass this stream for XSLT transformation (in xalan).

ps: second sentence is only for your better understanding of the situation
0
Comment
Question by:Cool-Guy
2 Comments
 
LVL 3

Accepted Solution

by:
romanm earned 500 total points
ID: 22844815
In general, I would create two objects,
1. A file handler that implements the IStream
2. A MyXMLWriter class that implements XMLFormatTarget and writes into an IStream object.

You create a MyXMLWriter object, set the file handler as its IStream,
Use the serializing sample to handle the writing to the MyXMLWriter object (see samples from links below)

here is some help
http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html

and look for DOMLSSerializer in the following:
http://xerces.apache.org/xerces-c/program-dom-3.html#XercesDOMFeatures

my 2 cents
0
 

Author Closing Comment

by:Cool-Guy
ID: 31509196
Thanks
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now