aspose file tools*
The moose likes XML and Related Technologies and the fly likes JDOM api and dealing with XML 1.0 non-compliant chars Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "JDOM api and dealing with XML 1.0 non-compliant chars" Watch "JDOM api and dealing with XML 1.0 non-compliant chars" New topic
Author

JDOM api and dealing with XML 1.0 non-compliant chars

Alok Pota
Ranch Hand

Joined: Mar 07, 2001
Posts: 185
JDOM api and dealing with XML 1.0 non-compliant chars

The setText and addContent method of org.jdom.Element throw an exception
when given an illegal char (non compliant XML 1.0 char). By illegal I don't
mean <, > (those are escapable chars not necessarily illegal).

Is there a lib out there that escapes these chars
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12821
    
    5
The java.util.regex package is convenient for finding and "escaping" characters in Strings that need to be XML compliant.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDOM api and dealing with XML 1.0 non-compliant chars