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

Discussion in 'ASP .Net' started by =?Utf-8?B?Y2FzaGRlc2ttYWM=?=, Jul 13, 2007.

  1. 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.
     
    =?Utf-8?B?Y2FzaGRlc2ttYWM=?=, Jul 13, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?Y2FzaGRlc2ttYWM=?=

    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


    "cashdeskmac" <> a écrit dans le
    message de news: ...
    > 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.
     
    Patrice, Jul 13, 2007
    #2
    1. Advertising

  3. 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.
     
    =?Utf-8?B?Y2FzaGRlc2ttYWM=?=, Jul 13, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cronus
    Replies:
    1
    Views:
    693
    Paul Mensonides
    Jul 15, 2004
  2. G Fernandes
    Replies:
    1
    Views:
    539
  3. Wessi
    Replies:
    3
    Views:
    878
    Lawrence Kirby
    Aug 11, 2005
  4. bubzilla
    Replies:
    2
    Views:
    948
    bubzilla
    Sep 25, 2006
  5. Shea Barton
    Replies:
    2
    Views:
    181
    Shea Barton
    Aug 17, 2010
Loading...

Share This Page