This week's book / license giveaways are in the JDBC and Relational Databases and Java in General forums.
We're giving away four copies each of PostGIS in Action and Java Advanced Topics Training and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes how to pass a String which contain xml data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "how to pass a String which contain xml data" Watch "how to pass a String which contain xml data" New topic
Author

how to pass a String which contain xml data

sam liya
Ranch Hand

Joined: Nov 25, 2008
Posts: 1239
I need to pass a String which contain xml data.below is the String .Can i use Sax parser for this ?

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14706
    
  25

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.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
sam liya
Ranch Hand

Joined: Nov 25, 2008
Posts: 1239
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

Joined: Mar 22, 2005
Posts: 42955
    
  73
Yes, Android has a SAX parser built in. You should not normally use XML without an XML declaration that specifies the encoding, though.
sam liya
Ranch Hand

Joined: Nov 25, 2008
Posts: 1239
thanks ULF.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to pass a String which contain xml data