Converting HTML character entities into a plain string?

Put your problem here if it does not fit any of the other categories.

Converting HTML character entities into a plain string?

Postby Sweevo » Wed Nov 12, 2008 10:28 pm

I'm extending org.xml.sax.helpers.DefaultHandler to parse XML. There's only one problem - when I convert characters into a string, I end up with HTML entities like & , " , and even weird stuff like “ and ” (double quotation marks somebody typed using a word processor, not the "real" ones in ASCII.

I just know there's a method somewhere to convert all the character entities into a simple string, but I can't find it.
Sweevo
Developer
Developer
 
Posts: 35
Joined: Thu Oct 16, 2008 9:27 am

Top

Postby bostone » Wed Nov 26, 2008 6:29 pm

Did you ever figured it out? I have same problem
bostone
Freshman
Freshman
 
Posts: 2
Joined: Wed Nov 26, 2008 6:27 pm

Postby Sweevo » Wed Nov 26, 2008 9:32 pm

I ended up using an external library: org.apache.commons.lang.
Sweevo
Developer
Developer
 
Posts: 35
Joined: Thu Oct 16, 2008 9:27 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 13 guests