Java Object to XML and vice versa

Discussion in 'Java' started by Sam Hwang, Apr 24, 2005.

  1. Sam Hwang

    Sam Hwang Guest

    Sam Hwang, Apr 24, 2005
    #1
    1. Advertising

  2. Sam Hwang

    Betty Guest

    "Sam Hwang" <> wrote in message
    news:...
    > 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-12/products/quick/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
    Betty, Apr 24, 2005
    #2
    1. Advertising

  3. Sam Hwang

    Ross Bamford Guest

    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-12/products/quick/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
    Ross Bamford, Apr 24, 2005
    #3
  4. Betty wrote:
    > "Sam Hwang" <> wrote in message
    > news:...
    >
    >>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-12/products/quick/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.
    Abrasive Sponge, Apr 24, 2005
    #4
  5. Sam Hwang

    Edmond wong Guest

    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-12/products/quick/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
    Edmond wong, Apr 25, 2005
    #5
  6. Sam Hwang

    iksrazal Guest

    "Sam Hwang" <> wrote in message news:<>...
    > 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-12/products/quick/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
    iksrazal, Apr 25, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Zunbeltz Izaola

    from data structure to xml an vice versa

    Zunbeltz Izaola, Dec 12, 2003, in forum: XML
    Replies:
    0
    Views:
    393
    Zunbeltz Izaola
    Dec 12, 2003
  2. Matt Garman
    Replies:
    1
    Views:
    662
    Matt Garman
    Apr 25, 2004
  3. JyotiC

    xml to object and vice versa

    JyotiC, Jul 23, 2008, in forum: Java
    Replies:
    10
    Views:
    626
    JyotiC
    Jul 30, 2008
  4. Tamer Higazi
    Replies:
    1
    Views:
    173
    Steven D'Aprano
    Jan 22, 2012
  5. System Administrator

    Function instanceof Object and vice-versa ?

    System Administrator, Mar 10, 2007, in forum: Javascript
    Replies:
    2
    Views:
    139
Loading...

Share This Page