There are
many ways to get data from XML documents in to your program. One of
them is to use Java beans to get the XML documents.
_______________________________________________
_______________________________________________
To
do this there is a library called JOX. You can use this JOX to pass
data from an XML document to a Java Bean. With this you can match the
elements of the XML document to that of the fields in the bean.
From a
bean you can also create an XML document and this can also use the DTD
if any to be attached to the XML document. To use JOX, first you have
to create either a FileReader or a FileInputStream object that can read
the XML file.
After this
step you can make JOX read that object and map it to the class.Another
way to map the XML elements of an XML documents to that of a java bean
is to use the Koala Bean Markup Language.
To use
this method to map the XML document to a java bean the XML document
should follow the standards / format set by the Koala Markup Language.
If this approach of mapping XML to Java bean works for you, you can
go with it.
MDA Approach - Part 1 (Java World)
Submitted by lal on Wed, 07/16/2008 - 04:12. Tags: Model Driven Architecuture [MDA] is a model driven engineering approach provided by OMG. It provides a set of guidelines for structuring specifications [for eg. business functionality] expressed as models.
Java Tip: Simplify Spring Apps with @Autowired (Developer.com)
The Spring framework is a popular choice for Java developers due to its combination of power and simplicity. Spring is many things, but at its core, Spring is an IOC (Inversion of Control) container. It lets developers build applications that express object dependencies through configuration files.