This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XML in the URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML in the URL" Watch "XML in the URL" New topic

XML in the URL

Don boscoo

Joined: Sep 20, 2010
Posts: 28
Hi ,

i want to pass XML String to a class from URL:


xmlText is the XML String, I'm having the logs in the class am passing it to. I cant get the xml string but when i send the normal string, it works fine like


How do i pass XML string in the url. Please Help.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63870

All URL values need to be encoded. Once encoded, XML is just like any other encoded text.

Bear in mind there is a length limitation to URLs imposed by the browsers.

[Asking smart questions] [About Bear] [Books by Bear]
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

And when Bear says "encoded", that means "URL encoded". There's a URLEncoder class which will do that for you.
I agree. Here's the link:
subject: XML in the URL
It's not a secret anymore!