Strange error with "Replace" in a CDATA Section

Discussion in 'XML' started by Rick Brandt, Aug 19, 2004.

  1. Rick Brandt

    Rick Brandt Guest

    Here is a simplified example of what I am passing to a Java SAX parser
    within a servlet via an HTTPRequest...

    <?xml version="1.0"?>
    <Record>
    <ID>1092853685</ID>
    <Notes><![CDATA[replace]]></Notes>
    </Record>

    I get the following error in the server's log output...

    org.xml.sax.SAXParseException: The root element is required in a
    well-formed document.

    ....BUT (here's the good part) only if the Notes element contains the string
    "replace". Doesn't matter what case it's in. I can have hundreds of
    characters in that element without problem providing that the string
    "replace" doesn't occur anywhere within. "Re place" is fine, "replacement"
    causes the error.

    This also only happens when I send this request to our live web servers.
    When I run the servlet on my own PC with JBuilder (where I can debug the
    code) it doesn't occur.

    Is there something magical about the word "replace" that I should know
    about? We use Sun's I-Planet application server on our web server's
    whereas JBuilder uses Tomcat. I am suspicious that I-Planet has a bug of
    some sort, but have no idea how I would go about proving or disproving
    that.

    Any thoughts appreciated.
     
    Rick Brandt, Aug 19, 2004
    #1
    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. John Davison
    Replies:
    1
    Views:
    636
    Hal Rosser
    Jul 7, 2004
  2. CarlosRivera
    Replies:
    5
    Views:
    887
    CarlosRivera
    Jan 16, 2005
  3. Replies:
    2
    Views:
    1,798
    Richard Tobin
    Nov 27, 2003
  4. Tak Sze
    Replies:
    2
    Views:
    4,414
    Patrick TJ McPhee
    Apr 30, 2004
  5. Replies:
    3
    Views:
    798
    Joe Kesselman
    Mar 6, 2006
Loading...

Share This Page