jhuerta
December 29th, 2008, 03:59 AM
Hi all,
I have an XML as following. I'm trying to read it with the following code:
DataSet cars = new DataSet();
cars.ReadXml("http://localhost/cars/newcars.xml");
All the nodes are getting properly populated into the Dataset created EXCEPT the "description" node. I can't find a way to make ReadXML (or similar method) to get the content of the description node and skip the HTML tags. I would like just treat that portion as pure text, ignoring the html content.
My question would be: How can I read an XML file which some of the nodes have HTML tags inserted? How could I avoid that the program treats the HTML tags as XML nodes>
thanks,
Juan
<cars>
<car>
<color>red</color>
<model>ford</model>
<description>
<p xmlns="http://www.w3.org/1999/xhtml"><span class="textnorm" title="">Super</br>fast</br></span></p><h2 xmlns="http://www.w3.org/1999/xhtml"><span class="textnorm" title="">Reasons to buy</span></h2><p xmlns="http://www.w3.org/1999/xhtml">Just because</p>
</description>
</car>
</cars>
I have an XML as following. I'm trying to read it with the following code:
DataSet cars = new DataSet();
cars.ReadXml("http://localhost/cars/newcars.xml");
All the nodes are getting properly populated into the Dataset created EXCEPT the "description" node. I can't find a way to make ReadXML (or similar method) to get the content of the description node and skip the HTML tags. I would like just treat that portion as pure text, ignoring the html content.
My question would be: How can I read an XML file which some of the nodes have HTML tags inserted? How could I avoid that the program treats the HTML tags as XML nodes>
thanks,
Juan
<cars>
<car>
<color>red</color>
<model>ford</model>
<description>
<p xmlns="http://www.w3.org/1999/xhtml"><span class="textnorm" title="">Super</br>fast</br></span></p><h2 xmlns="http://www.w3.org/1999/xhtml"><span class="textnorm" title="">Reasons to buy</span></h2><p xmlns="http://www.w3.org/1999/xhtml">Just because</p>
</description>
</car>
</cars>