471,306 Members | 1,290 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,306 software developers and data experts.

View formatted XML?

Hi everyone, is it possible to return the formatted interpretation of an
XmlDocument object?

Using an XmlWriter object I can write a formatted document to a file,
however I want to store it within a string var and output to the screen.

Is this possible?

Thanks,
Taz
Dec 4 '05 #1
1 1443
XmlTextWriter class has overloaded constructors, one of which accepts a
target stream (could be, for example, a Memorystream). When you are done, you
can call then System.Text.Encoding.UTF8.GetString(yourstream.ToA rray())
and get your string.
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Tarun Mistry" wrote:
Hi everyone, is it possible to return the formatted interpretation of an
XmlDocument object?

Using an XmlWriter object I can write a formatted document to a file,
however I want to store it within a string var and output to the screen.

Is this possible?

Thanks,
Taz

Dec 4 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by T Tran via SQLMonster.com | last post: by
2 posts views Thread by Steven T. Hatton | last post: by
2 posts views Thread by Hope Paka | last post: by
3 posts views Thread by Boni | last post: by
2 posts views Thread by Smokey Grindle | last post: by
3 posts views Thread by Andrew Robinson | last post: by
2 posts views Thread by Sandhya L. Gite | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.