This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See  RSS feed
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranches,

I'm returning an OMElement on the webservice method that's called, but the problem is when it has the & ampersand char I cannot get the whole xml, seems that it stops sending the xml from that point on and just go straight to the closing tags.

Does anyone have any idea how to solve this? because sometimes I may return some other weird characters such as japanese, chinese or things like that so I just want to make sure those characters won't mess my xml up.



Posts: 23273
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not that the ampersand is a "weird" character (as you so rudely describe Japanese and Chinese), it's just that your XML document is not well-formed. You have to escape that character if you use it in a text node:
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!