Groups | Blog | Home
all groups > dotnet xml > march 2005 >

dotnet xml : XSD Data type for HTML?


Jon
3/3/2005 5:19:03 AM
Hello all,

I have the below XML file whice has a node called statement. Within this
node is html elements <p>, <strong> etc. I'm trying to load this into a
XmlDataDocument in order to process it, however, i can't seem to get the
string from within the <statement> node. Can anyone help?

thanks,

Jon

<rat>
<answer>
<code><strong>A1000</strong></code>
<statement>
<h2>Summary</h2>
<p>The formation and sustainability:</p>
<ul>
<li>The world of <strong>citizens</strong></li>
</ul>
<p>Multi</p>
</statement>
</answer>
Jon
3/3/2005 7:01:02 AM
Martin, you're a start!

I'd buy you a pint if I could!

Thanks again,

Jon

[quoted text, click to view]
Martin Honnen
3/3/2005 3:07:57 PM


[quoted text, click to view]


[quoted text, click to view]

What kind of string are you exactly looking for? It is certainly
possible to read out the markup with the InnerXml property e.g.

XmlDataDocument xmlDocument = new XmlDataDocument();
xmlDocument.Load(@"test2005030301.xml");
XmlElement statement =
xmlDocument.GetElementsByTagName("statement")[0] as XmlElement;
if (statement != null) {
Console.WriteLine(statement.InnerXml);
}

--

Martin Honnen
AddThis Social Bookmark Button