D
dada rara
I am trying to figure out a *smart* way of generating XML documents from
custom data objects. Of course, to be able to apply different XSLTs in the
presentation layer.
The custom data objects will be JavaBeans with attributes and/or collections
of other JavaBeans.
One way would be to create specific converter classes with hard coded XML
tags for each JavaBean that needs to be converted but that isn't very
maintainable. Changes in data objects require changes in the converter
classes.
I see two possibilities:
1. Having a more general converter that is able to convert data objects
according to some DTDs. DTDs could be used for mapping between the data
objects and wanted XML document.
2. Using some open source framework, Quick seems to be suitable.
http://qare.sourceforge.net/web/2001-12/products/quick/
Have any of you solved this problem previously?
David
custom data objects. Of course, to be able to apply different XSLTs in the
presentation layer.
The custom data objects will be JavaBeans with attributes and/or collections
of other JavaBeans.
One way would be to create specific converter classes with hard coded XML
tags for each JavaBean that needs to be converted but that isn't very
maintainable. Changes in data objects require changes in the converter
classes.
I see two possibilities:
1. Having a more general converter that is able to convert data objects
according to some DTDs. DTDs could be used for mapping between the data
objects and wanted XML document.
2. Using some open source framework, Quick seems to be suitable.
http://qare.sourceforge.net/web/2001-12/products/quick/
Have any of you solved this problem previously?
David