Sign in to follow this  

Trouble parsing end of XML document from memory

This topic is 4811 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So I'm using MSXML 3. I'm parsing through my XML doc which is setup in memory rather than parsing from a file and I get this fatal error called... Fatal Error at file (null), line 2, char 88 Message: Invalid at the top level of the document. where line 2, char 88 is the final character of the XML text. It don't make no sense! I've tried making the last character a null character, I've tried making it a blank character I've tried making the last character the final bracket of the XML document and stll it flags this error. I'm running out of ideas here. If anyone has used MSXML I would appreciate any advice you have.

Share this post


Link to post
Share on other sites
Mabey you need a newline char at the end of the file. Some XML parsers will read until a newline char and then process the line.
I would also recommend the expat parser. I use it and it work great. It's very easy to use and is pretty fast as well.

Try parsing a simple file like this:

<?xml version='1.0' standalone='yes'?>
<root>
<test/>
</root>

Dont forget the line break at end. And if the parser fails, you are either using the library wrong or it is bugged.

Share this post


Link to post
Share on other sites

This topic is 4811 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this