• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to decode xml special character coming from soap web service value

 
vijayakumar durai
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can any body tell how to decode the xml special character like <>" coming from web service value ? I want to parse the value so i have to replace



Thanks
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XML strongly suggests using UTF-8. The Basic Profile Version 1.0 says -


The Profile consistently requires either UTF-8 or UTF-16 encoding for both SOAP and WSDL (see also R1012).

R4003 A DESCRIPTION MUST use either UTF-8 or UTF-16 encoding.


What's the special character we are talking about?

Regards,
Dan
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Either wrap the element value that contains the "<" and/or ">" characters in a CDATA section. Reference: http://www.w3schools.com/XML/xml_cdata.asp
...or use the characters "& lt;" (without the space after the ampersand) instead of "<" and "& gt;" (again without the space after the ampersand) instead of ">".
Best wishes!
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right, Ivan is right, please look at Predefined entities in XML.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic