0

Is it possible to automatically generate xsl from dynamically generated xml in java if I don't know the structure of the xml in advance?

I know what tags can be there, but I can't know for sure which ones will be there.

Is such a thing even possible? :>

lajb
  • 51
  • 3
  • You can use a stylesheet containing an *identity transformation*, which will copy the source to the result tree. And you can write templates for the tags you know that are there, containing `apply-templates`, since if they aren't, the templates will simply not get called, but the processing will continue down to the other nodes. – helderdarocha May 27 '14 at 15:28

1 Answers1

0

You might be able to use Saxon for java:

I need a simple command line program to transform XML using an XSL Stylesheet

From windows you could use xsd: http://msdn.microsoft.com/en-us/library/x6c1kb0s.aspx

Community
  • 1
  • 1
JCorchero
  • 81
  • 1
  • 1