Xml Debug - Dealing with Malformation

VBAHole22

Well-known member
Joined
Oct 21, 2003
Messages
432
Location
VA
I have a webservice that is returning an XmlDocument to the calling code.
When I set a web reference I get a proxy that returns XmlNode element. No big deal, I take that node and it becomes an xmlDoc and everything is cool.

The problem I am having is that sometimes I malform the xmlDoc. This gives me an ugly result in the client. Id like to form my xml well. If there was a way I could debug and see what the xml is I could see what is wrong with it.

Trouble is I am using a stream, not an xml file. I create an xmlWriter and use the stream to create the doc. When I am done I send the stream to a xmlDoc and then that gets returned to the client (where it blows apart). Is there a way i can intercept the xml from the stream and actually see it so I know what is wrong with it?

Working with xml in .NET is sure easy, but the ease doesnt replace not knowing any xml. Im new to this and the whole idea of just making sh*t up in xml and it working is pretty far out.
 
Back
Top