Simon's "component" is free and open-source, written in C#, is very
sophisticated, and no, there aren't really any "other ways" unless you want
to use similar code to his.
Essentially, you are creating an HtmlDocument object that behaves like a
well-formed XmlDocument and permits accurate xpath operations.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"em*******@gmail.com" wrote:
Ok, agreed.
I don't want to use third part component. There is another way?
Peter wrote: emferrari,
The important point here is to be able to understand what "well - formed"
means.
You don't say where you got this "XML". but I suspect it was simply
"concocted".
if you want to store markup you need to enclose it in CDATA sections.
If you want to parse HTML AS IF it were legal XML, take a look at Simon
Mourier's HtmlAgilityPack.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"em*******@gmail.com" wrote:
Hi all
I have a XML file with the following:
<Step step="1">
<Text><b>Chapter 1</b>
This is a test. Click <b><i>Load</i></b>
</Text>
</Step>
I'd like to read this node and bring the HTML tags as well. I'm reading
using node["Text"].InnerText but looks like the InnerText remove the
HTML tags from it. Does someone knows how I can read the node with the
HTML tags on it?
Thanks!