This is an unexpected token. The expected token is 'NAME'

Discussion in 'ASP .Net' started by Guest, Jul 13, 2007.

  1. Guest

    Guest Guest

    Hi,

    has anyone come across this error before:

    This is an unexpected token. The expected token is 'NAME'

    I am getting it when trying to send an xml file across a web service layer.

    The xml file is well formed, having been checked with XmlSpy. The size of
    the file is roughly 119KB. I think it was written in MS Word and the HTML is
    being sent through the web service layer as a property of a serializable
    object.

    Searching the web has given me lots of results but none have found a
    solution. The error suggests to me that it is reading the xml and suddenly
    stops, which means it cannot find a closing tag. Is there a size limit to
    the amount of data that can be serialized/deserialized in one go?

    Any help would be really appreciated.
     
    Guest, Jul 13, 2007
    #1
    1. Advertisements

  2. Guest

    Patrice Guest

    My first thought would be that some of the enclosed HTML content is parsed
    by the XML parser. Is this HTML fragment enclosed inside a CDATA section ?

    You could also perhaps do a quick test by using a much more simplified HTML
    content to see if it still fails...
     
    Patrice, Jul 13, 2007
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    Hi Patrice,

    I don't think this is the issue, as when the page loads it retrieves
    paragraphs from the data layer which are in exactly the same format, just
    with different wording. They seem to pass through the web service layer with
    no problem.

    When changing a paragraph, I upload a new file containing the paragraph and
    this is sent down through the web service layer along with the other
    paragraph (which is to be deleted). I was thinking that perhaps it was the
    size of these two files which was causing the problem.
     
    Guest, Jul 13, 2007
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.