"Martin Honnen" wrote:
>
>
> Jon wrote:
>
>
> > 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?
>
> > <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>
> > </rat>
>
> 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
>
http://JavaScript.FAQTs.com/