Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Ron McLeod
paul wheaton
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Himai Minh
Bartenders:
Forum:
Beginning Java
escapre character for xml
fang eve
Greenhorn
Posts: 26
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
i am generating a XML file, using
java
function. I have encounter some problem. When i insert "(" ,")" these 2 character, my XML format will be wrong. How can i escape this character? thanks
shan sundaram
Greenhorn
Posts: 15
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Actually, Where the problem(XML or java program)?
If the problem in handling this
string
in java use,
String str = "\"(\" ,\")\"";
fang eve
Greenhorn
Posts: 26
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
i guess is java. my code is
for (int col=0; col<numOfCol; col++){ for (int row=1; row<numOfRow; row++){ if (col==(numOfCol-1)){ cell=tableCells[col][row].getContents(); cell=cell.replaceAll("'","''"); values+=","+cell+""; // content.add(values); }else{ cell=tableCells[col][row].getContents(); cell=cell.replaceAll("'","''"); values+=","+cell+""; } } //end for (int row=1; row<numOfRow; row++) content.add(values);
My guess is because of the () for the content.add.. Am i correct?
shan sundaram
Greenhorn
Posts: 15
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
yes
Paul Clapham
Sheriff
Posts: 28411
102
I like...
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
No. Parentheses are not special characters in any way in XML. So
you should
investigate your problem again to find out what it really is.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Named entity ref to hex code (using char mapping)
Weird Encoding
NMTOKENS ...
Invalid character(Unicode: 0x7)
Can I check whether a particular pattern of character is there in the attribute
More...