In the last post we had seen how to transform XML data into user presentable HTML format . What if you don't have data in XML format? What if the data is collected from a legacy system or from a collection of services? Here we are going to look at how to transform the Java object to XML and this XML can be presented in any format we want. Like JAXP, Java comes to rescue us here with JAXB (Java Architecture for XML Binding). All we need is an XSD which defines the structure of the Java Object and the XML. JAXB allows us to transform data in both the direction, means, you can convert Object to XML and XML to Object. Wow, what are we then waiting for? Let's program. Open Netbeans and create a Java Application File->New Project->Java Application Enter "XMLBinding" in the Project Name field Click Finish Create an XSD file Open Projects tab Right click xmlbinding package node Choose XML-> XML Schema Enter "student-marks...
All about Java Programming & Rich Client Application development using Netbeans