473,382 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Strange error with "Replace" in a CDATA Section

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.

Jul 20 '05 #1
0 1327

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Luke Dalessandro | last post by:
I have an application where there is a primary XML data file. I'll use the following as an example: <data> <item id="a"> <name>A</name> <price>$10</price> </item> <item id="b">...
6
by: vigi98 | last post by:
Hello all, Can someone confirme that this: var strURLpiece = "UK & Ireland"; strURLpiece.replace("&", "%26"); replaces all occurrence of the character & by %26 in strURLpiece, ie that...
3
by: asd987 | last post by:
Hi, Can anyone tell me if "replace" is supported by Access 97? I use the Dutch version and get the errormessage "sub or function not supported". Or is the Professional Edition needed? Thanks.
2
by: ad | last post by:
Hello, if I try this ((StringBuilder)sb).Replace("a", "aa"); I get OutOfMemoryException raised if sb contains at least one "a"... It seems like StringBuilder 'seeker' doesn't move to the end...
6
by: Marty | last post by:
Hi, I would like to replace "\r\n" by "_" within a specific string. I tried : strMyString.Replace('\r', '_'); strMyString.Replace('\n', '_'); or...
6
by: Dean Slindee | last post by:
Private NameLastFirst as object = "Public, John Q." NameLastFirst = Replace(LastName, "'", "''") If NameLastFirst contains "Public, John Q." before the above Replace, it will contain "Public"...
0
by: Rave | last post by:
This is a long shot, but I thought I'd try it. I am currently using excel as an inventory tool. I currently have a hand-held scanner plugged into a laptop for reading barcodes. Using the "Find and...
5
by: xla76 | last post by:
Can anyone help me, I'm trying to replace any double quotes in a textbox with a different character. mystring = Replace(TextBox.Text , " , "*") I've tried chr(34) and """"" with no luck. ...
8
by: bsonline | last post by:
I want to replace + sign with 2 blackslash and 1 + sign (\\+)... when I use the replaceAll()... It throws a 500 status error like "java.util.regex.PatternSyntaxException: Dangling meta character...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.