Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java Object to XML and vice versa

Reply
Thread Tools

Java Object to XML and vice versa

 
 
Sam Hwang
Guest
Posts: n/a
 
      04-24-2005
Hello,
I need to convert Java objects and XML files interchangely. I examined
some existed frameworks, thay are XStream[http://xstream.codehaus.com],
Quick[http://qare.sourceforge.net/web/2001...ck/index.html],
Castor[http://www.castor.org/], JiBX[http://jibx.sourceforge.net/].
Which one is more competitive and ease of use? Thanks!

Regards,
Sam Hwang

 
Reply With Quote
 
 
 
 
Betty
Guest
Posts: n/a
 
      04-24-2005

"Sam Hwang" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Hello,
> I need to convert Java objects and XML files interchangely. I examined
> some existed frameworks, thay are XStream[http://xstream.codehaus.com],
> Quick[http://qare.sourceforge.net/web/2001...ck/index.html],
> Castor[http://www.castor.org/], JiBX[http://jibx.sourceforge.net/].
> Which one is more competitive and ease of use? Thanks!
>
> Regards,
> Sam Hwang


comˇpetˇiˇtive
comˇpetˇiˇtive (kem-pčtšî-tîv) adjective
1. Of, involving, or determined by competition: competitive games.
2. Liking competition or inclined to compete: a highly competitive sales
representative.
3. Biochemistry. Relating to the inhibition of enzyme activity that results
from the reversible combination of an enzyme with an alternate compound and
prevents normal substrate binding.
- comˇpetšiˇtiveˇly adverb
- comˇpetšiˇtiveˇness noun


 
Reply With Quote
 
 
 
 
Ross Bamford
Guest
Posts: n/a
 
      04-24-2005
On Sat, 2005-04-23 at 19:49 -0700, Sam Hwang wrote:
> Hello,
> I need to convert Java objects and XML files interchangely. I examined
> some existed frameworks, thay are XStream[http://xstream.codehaus.com],
> Quick[http://qare.sourceforge.net/web/2001...ck/index.html],
> Castor[http://www.castor.org/], JiBX[http://jibx.sourceforge.net/].
> Which one is more competitive and ease of use? Thanks!
>
> Regards,
> Sam Hwang
>

Hi,

Depends on your usage. Do you want a SAX-style event stream of DOM-style
tree of objects?

If the latter I highly recommend Apache Commons Digester at
http://jakarta.apache.org/commons/digester

Cheers,
Ross

 
Reply With Quote
 
Abrasive Sponge
Guest
Posts: n/a
 
      04-24-2005
Betty wrote:
> "Sam Hwang" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) ups.com...
>
>>Hello,
>>I need to convert Java objects and XML files interchangely. I examined
>>some existed frameworks, thay are XStream[http://xstream.codehaus.com],
>>Quick[http://qare.sourceforge.net/web/2001...ck/index.html],
>>Castor[http://www.castor.org/], JiBX[http://jibx.sourceforge.net/].
>>Which one is more competitive and ease of use? Thanks!
>>
>>Regards,
>>Sam Hwang

>
>
> comˇpetˇiˇtive
> comˇpetˇiˇtive (kem-pčtšî-tîv) adjective
> 1. Of, involving, or determined by competition: competitive games.
> 2. Liking competition or inclined to compete: a highly competitive sales
> representative.
> 3. Biochemistry. Relating to the inhibition of enzyme activity that results
> from the reversible combination of an enzyme with an alternate compound and
> prevents normal substrate binding.
> - comˇpetšiˇtiveˇly adverb
> - comˇpetšiˇtiveˇness noun
>
>

2. Liking competition or inclined to compete: a highly competitive sale
representative.


Yep, that's what the original poster was getting at. If you don't think
there is competition in the open-source market or the software market in
general you might need to get out from under a rock.

 
Reply With Quote
 
Edmond wong
Guest
Posts: n/a
 
      04-25-2005
Sam Hwang wrote:
> Hello,
> I need to convert Java objects and XML files interchangely. I examined
> some existed frameworks, thay are XStream[http://xstream.codehaus.com],
> Quick[http://qare.sourceforge.net/web/2001...ck/index.html],
> Castor[http://www.castor.org/], JiBX[http://jibx.sourceforge.net/].
> Which one is more competitive and ease of use? Thanks!
>
> Regards,
> Sam Hwang
>


Hi Sam,

You probably need to get the requirements of your project first. If you
are to interface with a 3rd party XML interface, there are specific
requirements you will need. Requirements, for example, are if the 3rd
party XML document format have element-attribute(s), and if the null
value will be handled by </empty> or the whole element will be removed
from the document. So, if it is the case, xStream would not be a good
candidate unless you go extra efforts to build your own code on top of
xStream.
If you are not restricted by the 3rd party XML interface, you can have a
wider selection of tool to use.
Also, please look into Sun's JDK1.2 XML decoder/encoder for
serialization/deserialization first if it fits your need.

Thanks,

Edmond
 
Reply With Quote
 
iksrazal
Guest
Posts: n/a
 
      04-25-2005
"Sam Hwang" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed) oups.com>...
> Hello,
> I need to convert Java objects and XML files interchangely. I examined
> some existed frameworks, thay are XStream[http://xstream.codehaus.com],
> Quick[http://qare.sourceforge.net/web/2001...ck/index.html],
> Castor[http://www.castor.org/], JiBX[http://jibx.sourceforge.net/].
> Which one is more competitive and ease of use? Thanks!
>
> Regards,
> Sam Hwang


There is also JAXB from Sun of several JSR implementations. There are
a couple articles about it on onjava.com . It converts an XML schema
to java source, and objects to XML.

iksrazal
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
access address from object and vice versa Tamer Higazi Python 1 01-22-2012 05:33 AM
xml to object and vice versa JyotiC Java 10 07-30-2008 11:55 AM
Function instanceof Object and vice-versa ? System Administrator Javascript 2 03-10-2007 11:51 PM
map XML union to C union (and vice-versa) Matt Garman XML 1 04-25-2004 12:40 AM
from data structure to xml an vice versa Zunbeltz Izaola XML 0 12-12-2003 02:48 PM



Advertisments