Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
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:
Java in General
how to pass a String which contain xml data
shawn peter
Ranch Hand
Posts: 1325
1
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I need to pass a
String
which contain xml data.below is the String .Can i use Sax parser for this ?
<Entries xmlns="http://ws.wso2.org/dataservice"> <Entry> <name xmlns="http://ws.wso2.org/dataservice">Chamara</name> <marks xmlns="http://ws.wso2.org/dataservice">88</marks> </Entry> <Entry> <name xmlns="http://ws.wso2.org/dataservice">John</name> <marks xmlns="http://ws.wso2.org/dataservice">76</marks> </Entry> <Entry> <name xmlns="http://ws.wso2.org/dataservice">Suminda</name> <marks xmlns="http://ws.wso2.org/dataservice">69</marks> </Entry> <Entry> <name xmlns="http://ws.wso2.org/dataservice">Peter</name> <marks xmlns="http://ws.wso2.org/dataservice">41</marks> </Entry> </Entries>
Jesper de Jong
Java Cowboy
Posts: 16084
88
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What do you mean by "pass" a String? Do you mean:
parse
a String? Yes, you could use a SAX parser or any other kind of XML parser for that.
Jesper's Blog
-
Pluralsight Author Page
shawn peter
Ranch Hand
Posts: 1325
1
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
can we use this in android.Because i am getting above XML String in Android as a input.I need to extract data from that String.
Ulf Dittmer
Rancher
Posts: 43081
77
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Yes, Android has a SAX parser built in.
You should
not normally use XML without an XML declaration that specifies the encoding, though.
shawn peter
Ranch Hand
Posts: 1325
1
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
thanks ULF.
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
i am getting HttpHostConnectException
data service url gives error
An Unwanted Part of the XML Input File is Included in the XSL Transformation Result
Trying to add xmlns attribute to a <result> tag in my xml response
need to add namespace to <result> tag from a .jca file
More...