That depends on how well formed the HTML source is. Most likely the answer
is "no", since the HTML format allows for tags without a closing element.
<br> for example does not need a closing </br> tag. Some people do write
their HTML that it's compatible with XML. They write <br /> for example, to
fake an empty XML element when HTML tag does not have a closing tag, but
that doesn't help you if you're looking to retreive arbitrary pages.
You can embed XML data islands into an HTML page, but it doesn't sound like
that this is what you are trying to do.
If you are just looking to load an HTML page into a DOM, then you can
instantiate an Internet Explorer control and have it load the HTML
programmatically. Then you can traverse the DOM in a manner similar to an
XmlDocument. Maybe you can walk the IE DOM to populate an XmlDocument is
that solves your problem.
--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor
"Zürcher See" <aq****@cannabismail.com> wrote in message
news:10***************@fuchs.cyberlink.ch...
I use a httpWebrequest to download an html page as string, then I would
like to have xml document, but html and xml are "incompatible"
There is a way to convert html to xml?