View Single Post
  #6 (permalink)  
Old May 28th, 2008, 05:51 AM
Martin Honnen Martin Honnen is offline
Friend of Wrox
Points: 6,676, Level: 34
Points: 6,676, Level: 34 Points: 6,676, Level: 34 Points: 6,676, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2007
Location: Germany
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

The usual approach with Xml(Text)Writer is to write element, attributes, text, comments and it constructs the XML for you.
If you want to write a string of XML and do not want to escape it then you need to use WriteRaw:
Code:
xmlWRITER.WriteRaw(Brand1.ToXml());
It is your responsibility then that you write well-formed markup.
See http://msdn.microsoft.com/en-us/libr....writeraw.aspx


--
  Martin Honnen
  Microsoft MVP - XML
Reply With Quote