User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » java escape strings for XML Page [1]  
rynop
All American
829 Posts
user info
edit post

Is there any functions in java that will escape strings that are going to be put in an XML file?

For example, the 4 characters listed here need to be escaped:
http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/sax/4_refs.html

For example - the string: "Hello > World" needs to be "Hello > World" before being put into XML. Is there any api's that search for all chars that would mess up in XML and replace them? I have characters such as " (but not just double quote, the angled double quote) trying to be written to my xml file (which when in the xml file it looks like garbage) - the angled quotes are not listed in the table in the link above, but I assume they need to be escaped. I know someone has ran into this problem before and has written a function to replace the chars. google has been no help.

1/27/2006 4:46:39 PM

 Message Boards » Tech Talk » java escape strings for XML Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.