D
Darryl R.
Everyone, I'm trying to create a JSP page that returns an XML string to the
caller (browser). Some of the elements will contain characters that should
be encoded before being added to the XML string (e.g. A&P should be changed
to A&P before it is added to the string). I'm looking for some code that
will do this, since the org.w3c.dom package doesn't seem to have any classes
with static methods that do this.
What I'm looking for is a the source code to create a method that accepts an
unencoded string and returns an encoded string. For example:
String s = "A&P";
String encodedS = encode(s);
//The method should return "A&P"
Any help would be greatly appreciated.
Thanks,
Darryl R.
caller (browser). Some of the elements will contain characters that should
be encoded before being added to the XML string (e.g. A&P should be changed
to A&P before it is added to the string). I'm looking for some code that
will do this, since the org.w3c.dom package doesn't seem to have any classes
with static methods that do this.
What I'm looking for is a the source code to create a method that accepts an
unencoded string and returns an encoded string. For example:
String s = "A&P";
String encodedS = encode(s);
//The method should return "A&P"
Any help would be greatly appreciated.
Thanks,
Darryl R.