Solved + objXMLSerializer.Deserialize + error in XML document

Posted on 2005-04-28
Last Modified: 2013-11-19
I am working with XMLs and trying to enter the infomation into a database, i try deserializing the XML and get the following error.

There is an error in XML document (1, 2098).

That is it, is there anyway of telling where the actual error is happening or why, obviously there is something wrong with the XML, but i can not see it.

Question by:dkilby
    LVL 9

    Accepted Solution

    Is this just one file you need to check?  Or is it an XML file generated by some other application that will always be returned this way?

    If it's just one file, load it up into VS.NET and click 'Validate XML' from the 'XML' menu.  In the 'Task List' window it will tell you what the error is.

    The "There is an error in XML document" message means the file isn't well-formed.  So it's something simple like a closing tag that doesnt match it's opener (remember XML is case sensitive), or an invalid character, or incorrectly nested tags, etc.

    Author Comment

    Found the problem, was a value of inside one of the tags was not what the schema had indicated


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
    I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
    The viewer will learn how to count occurrences of each item in an array.
    HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now