A
Aahz
Hello,
I need to write xml file ( using c#) with some elements inside that
actually contains html code, like this:
'Moscow <p></p><a href="www.google.com"><img
src="gallery/t20.jpg" border="0" /><br /> Red Sqare </
a>
Instead of that every time I got this:
Moscow &lt;p&gt;&lt;/p&gt;&lt;a
href='www.google.com'><img src='/gallery/t20.jpg' border='0' /
&gt;&lt;br /&gt; Red Sqare &lt;/a&gt;
can someone please explain what I need to replace with what and where
to do that???
Thank you
P.S.
here is code:
xmlfile = new XmlDocument();
xmlfilename= Server.MapPath("cities.xml");
writer = new XmlTextWriter(xmlfilename,
System.Text.Encoding.UTF8);
writer.Formatting =
System.Xml.Formatting.Indented;
writer.WriteStartDocument();
writer.WriteComment("this is a comment");
writer.WritetartElement("places");
writer.WriteAttributeString("html",city);
writer.WriteEndElement();
writer.WriteEndElement();
writer.WriteEndDocument();
writer.Flush();
writer.Close();
I need to write xml file ( using c#) with some elements inside that
actually contains html code, like this:
'Moscow <p></p><a href="www.google.com"><img
src="gallery/t20.jpg" border="0" /><br /> Red Sqare </
a>
Instead of that every time I got this:
Moscow &lt;p&gt;&lt;/p&gt;&lt;a
href='www.google.com'><img src='/gallery/t20.jpg' border='0' /
&gt;&lt;br /&gt; Red Sqare &lt;/a&gt;
can someone please explain what I need to replace with what and where
to do that???
Thank you
P.S.
here is code:
<br /> Red Sqare </a>"
xmlfile = new XmlDocument();
xmlfilename= Server.MapPath("cities.xml");
writer = new XmlTextWriter(xmlfilename,
System.Text.Encoding.UTF8);
writer.Formatting =
System.Xml.Formatting.Indented;
writer.WriteStartDocument();
writer.WriteComment("this is a comment");
writer.WritetartElement("places");
writer.WriteAttributeString("html",city);
writer.WriteEndElement();
writer.WriteEndElement();
writer.WriteEndDocument();
writer.Flush();
writer.Close();