Solved

How do I write a DOM Document into a istream?

Posted on 2008-10-23
2
992 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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.

630 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