I have a big 400kb xml file.
When i try to load it by using:
- IXMLDocument’s LoadXMLData or
- CreateOLEObject(‘MSXML2.DOMDocument.4.0′)’ Load method
I get Undefined error in both methods.
I took the file and pasted to xml validation webpage, it valides ok…
What else can i do?
By the way, Is there any max length for the attribute in the element?
EDIT
it seems that it cannot load long attribute …
i have part of another xml in the xml’s attribute value …
An error pops up: Undefined error. Line: 1 (here is the begining of the xml)
Class of the exception is: EDOMParseError
Generally i would like to achive something like this:
<doc type="X223">
<params id_param="51" value="XML_1" />
<params id_param="52" value="XML_2" />
<params id_param="53" value="XML_3" />
</doc>
If you can change your schema, prefer to store your inner XML files to
CDATA section, if not then try to think about following.Parser failed on your element attribute value most probably due to quote character contained in an XML file you’ve tried to store there. Consider the following case for instance:
As you can see, you might confuse parser with the quote char from that inner XML, so that it could take the above line as:
The easiest you can do when you want to keep your current schema is to escape all quoting characters of your inner XML file.
From the
RFC 2629specification (emphased by me):