473,395 Members | 1,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Small doubt regarding XmlDocument::LoadXml(String xml)

According to msdn, this method throws XmlException when
"There is a load or parse error in the XML. In this case, the
document
remains empty."

I cannot understand the difference between load and parse error.
IMO, only thing that would cause exception is Malformed xml.
right?

May 10 '07 #1
1 4145
GeezerButler wrote:
According to msdn, this method throws XmlException when
"There is a load or parse error in the XML. In this case, the
document
remains empty."

I cannot understand the difference between load and parse error.
IMO, only thing that would cause exception is Malformed xml.
right?
The XML could have a DOCTYPE declaration referencing a URL on a HTTP
server somewhere and then, if that URL is not available, you could get a
load error. At least that is what I assume the author of the
documentation had in mind when distinguishing between load and parse error.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
May 11 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Martin Honnen | last post by:
With both .NET 1.0 and 1.1 I have found the following strange behaviour where System.Xml.XmlDocument.LoadXml doesn't throw an error when parsing a text node with a character reference to an invalid...
2
by: Eric Zechman via .NET 247 | last post by:
I have a project in which I get xml posted via a hidden form field (data=<xml></xml>). People are entering names like Bill & Sandy Smith. this is coming over as:...
1
by: AJ Brown | last post by:
I'm loading an XmlDocument object from a string using LoadXml. The string is a well-formed XML fragment (see example) and loads fine, however there are entities (&amp;) within attribute values. The...
8
by: pete | last post by:
Hi there, Can someone explain to me why I can't bind to an XmlDocument but I can bind to an XmlNodeList. It's my understanding that they both implement the IEnumerable interface which is...
11
by: David Thielen | last post by:
Hi; Once I have loaded an xml file into a DOM, is there any way to then get any namespace declarations that were in the xml file? Or are those just discarded as the DOM is populated? And if...
4
by: Chad Scharf | last post by:
I am having difficulty taking an xml string passed as a string from a web service. I am not using SOAP, but rather calling the web service within an ASP.NET web form. Reviewing the XML object...
2
by: Lupina | last post by:
Hi I want load whole xml file, I try do it in the same way as I did it in windows application. try { XmlDocument myDoc = new XmlDocument();
5
by: David Ricker | last post by:
Hi, Does anyone have any ideas as to why the LoadXml statement in the following code takes so 8-10 seconds on a 2.4 GHz machine? Just seems to me that it should be a great deal faster. Also if...
2
by: ian | last post by:
Hi, I've got the weirdest garbage collection problem - I'd appreciate any advice you've got. 1. A class 'X' in a system I'm working on contains a reference to an XmlDocument, populated via...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.