• 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

XML "object mapping"

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Do you know about any technology which does "object mapping", like the Persistence API with Entity EJB in J2EE?

Peter
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I am understanding what you want, there are many toolkits that provide for mapping between XML and Objects. For example, in the java.beans package we have XMLDecoder and XMLEncoder.
Also in the official Sun line we have the JAXB - Java Architecture for XML Binding toolkit. See this page for more.
Is that the sort of thing you are looking for?
Bill
 
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What will be your purpose for the mapping? Is it like, to turn the xml into an object that you can use in your program, like DOM?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If instead you're talking about storing objects in a relational database (with no XML involved whatsoever), have a look at the Hibernate project on SourceForge. It's the most popular object-relational mapping tool.
 
Peter Braun
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for answers.

I just want to the same thing with XML files as Persistence API does with entities in relational databases. To build up objects from XML content, use getters and setters to access or modify its content, and persist the changes to the file. I thought it would be better than write a parser, for the same reasons as Entity Beans in EJB. So I don't know if such thing exist. What do you think? Does it make sense?

Peter
[ November 24, 2005: Message edited by: Peter Braun ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic