469,268 Members | 942 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,268 developers. It's quick & easy.

There is an error in XML document

Okay - I get this error but I cannot tell which node in the XML is
causing the problem. The full error is:
There is an error in XML document (5, 266)
inner exception is:
Input string was not in correct format.

I used xsd.exe on my .xsd file. I have two XML files, one is the full
size of 500Meg and the other is a small sample. The small sample works
perfectly.

My main problem is I cannot tell how to find the error in the big file.

Any help is greatly appreciated.

Thanks!

Jan 1 '07 #1
2 34272
Duane wrote:
Okay - I get this error but I cannot tell which node in the XML is
causing the problem. The full error is:
There is an error in XML document (5, 266)
inner exception is:
Input string was not in correct format.

I used xsd.exe on my .xsd file. I have two XML files, one is the full
size of 500Meg and the other is a small sample. The small sample works
perfectly.

My main problem is I cannot tell how to find the error in the big file.
5 should be the line where the error occurs, 266 the position in the line.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Jan 1 '07 #2
I'm going to take a wild guess and say that one of your XML nodes is
returning an attribute that has one or more unescaped question marks (or any
of the reserved entities, really, such as &, <, >) and is thus illegally
closing the attribute.

Try (and with your doc size, it could take a while):
System.Diagnostics.Debug.WriteLine(myDoc.OuterXml) . That will hopefully
dump to your console but with the line breaks. You then want to copy the
first 6 lines & paste it into VS (or any column-counting editor) and scroll
to column 266, line 5. Or, you could read the XML stream, dumping it out as
it reads it. When it breaks, you'll see the last writeable data in the
console.

Jan 2 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.