Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 22nd, 2011, 07:24 PM
Authorized User
 
Join Date: Nov 2007
Posts: 33
Thanks: 2
Thanked 0 Times in 0 Posts
Question Transform java object into xml with xslt

Hi,

I wonder if it's possible to transform java object into an xml with xslt.

I have this class
Code:
public class Customer
{
    private String name;
    private String address;
    
    ... getter and setters here
}
Is there anyway if I have a Customer object and pass it into xslt to create an xml?

Can someone please point me to the right way or give me an example.

Thanks
 
Old February 22nd, 2011, 07:52 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You're probably best off writing the Java object to XML using JAXB, and then using XSLT to convert this XML to the format you actually want.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to actually transform an XML with XSLT? ovlique BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 2 June 27th, 2010 03:06 PM
Using XSLT to transform one XML format to other sivakumar_g01 XSLT 3 June 14th, 2010 09:45 AM
XML/XSLT Transform Error in ASP kwilliams Classic ASP XML 2 October 9th, 2007 02:26 AM
Transform XML with XSLT in JavaScript Mozilla Spankmaster79 Javascript 3 January 18th, 2006 07:31 AM
XSLT read through XML to transform another XML dendenx2 XSLT 8 July 7th, 2005 08:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.