I have original XML file :
 
<?xml version="1.0"?>
<web-app>
<servlet>
 <servlet-name>a</servlet-name>
 <servlet-class>Halo</servlet-class>
</servlet>
</web-app>
 
i want change the text element in <servlet-name>, with ASCII code 132, i use
element.setText(String.valueOf((char)132));
output is :
 
<servlet-name>?</servlet-name>
 
then in another process i need the ASCII value, i use
Character a =element.getTextTrim().charAt(0);
System.out.println(a.hashCode()+" "+a);
output : 63 ?
output that i need is the real value = 132;
PLEASE HELP ME!!, sorry i'm a newbies in programming


Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football

Reply via email to