Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
< and > in java string
Ambika Jain
Ranch Hand
Posts: 48
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello,
I want to save xml in
java
string
. For example <data>100</data>.
When I save this I get <data>100</data>
what should I do to save it with < and > brackets.
Thanks !
Ambika Jain
Olivier Houyoux
Greenhorn
Posts: 13
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
You could use the simple Java-based JDOM library (
http://www.jdom.org
) for manipulating XML.
SCJP5
SCJD
SCMAD
Jesper de Jong
Java Cowboy
Posts: 16084
88
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I don't understand your question.
The characters < and > are not special characters in Java strings, so what's the problem?
Jesper's Blog
-
Pluralsight Author Page
Ambika Jain
Ranch Hand
Posts: 48
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
my problem is that, the xml is getting saved as
<Data>100</Data> instead of <Data>100</Data>
Thanks,
Ambika Jain
Ambika Jain
Ranch Hand
Posts: 48
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What I mean is :
& l t ; Data & g t ;
when I post this reply, I get it converted to < and >
Ambika Jain
Jesper de Jong
Java Cowboy
Posts: 16084
88
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
How are you saving the data? Java does not automatically escape < and > into & l t ; and & g t ;
Jesper's Blog
-
Pluralsight Author Page
I love a good mentalist. And so does this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
session data mixed up problem
Resetting Values in JSP Page
Nested members in XML-RPC
Null Pointer Exception
jsp & HTML
More...