Re: XMLDoc.Load problem
- From: Horváth Szilárd <hoszi66@xxxxxxxxxxx>
- Date: Fri, 12 Dec 2008 17:03:30 +0100
Thank you! I'll try it.
Horváth Szilárd wrote:
How can I fix it automaticaly? Or exists somewhere any C# codes for the rules or i have to write all case of errors?
Because i have to write a prorgam which can download a website which is wrong and i have to edit it.
Please stay in the newsgroup.
If you want to parse HTML and not XML then google for HTML agility pack
or SgmlReader.
--
Martin Honnen
http://JavaScript.FAQTs.com/
"Martin Honnen" <mahotrash@xxxxxxxx> a következőket írta üzenetében news:eKtq%23QGXJHA.5052@xxxxxxxxxxxxxxxxxxxxxxx
Horváth Szilárd wrote:
I'd like to know, how can I fix or ignore the XmlDocument Load or LoadXML error when the XML file is wrong (unended tag, missing start tag, missing "" from attribute ...), like IE Developer Toolbar or just a simple Browser?
If the markup you are trying to load is not well-formed XML then you can't load it. It is as simple as that. XML is _not_ HTML tag soup where browsers try to fix your markup errors and try to guess how the document structure is meant to look.
So you need to fix the problem at the source, when you create the XML. Use APIs like XmlWriter for that.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
.
- Follow-Ups:
- Re: XMLDoc.Load problem
- From: Horváth Szilárd
- Re: XMLDoc.Load problem
- References:
- XMLDoc.Load problem
- From: Horváth Szilárd
- Re: XMLDoc.Load problem
- From: Martin Honnen
- XMLDoc.Load problem
- Prev by Date: Re: XMLDoc.Load problem
- Next by Date: Re: XMLDoc.Load problem
- Previous by thread: Re: XMLDoc.Load problem
- Next by thread: Re: XMLDoc.Load problem
- Index(es):
Relevant Pages
|