aspose file tools*
The moose likes Beginning Java and the fly likes escapre character for xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "escapre character for xml" Watch "escapre character for xml" New topic
Author

escapre character for xml

fang eve
Greenhorn

Joined: Jun 22, 2006
Posts: 26
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

Joined: Feb 07, 2004
Posts: 15
Actually, Where the problem(XML or java program)?
If the problem in handling this string in java use,
String str = "\"(\" ,\")\"";
fang eve
Greenhorn

Joined: Jun 22, 2006
Posts: 26
i guess is java. my code is


My guess is because of the () for the content.add.. Am i correct?
shan sundaram
Greenhorn

Joined: Feb 07, 2004
Posts: 15
yes
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18656
    
    8

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: escapre character for xml