I try to set XSL property for my marshaller like this (which I copied from here) :
marshaller.setProperty("com.sun.xml.bind.xmlHeaders",
"<?xml-stylesheet type='text/xsl' href=\"" +
xslFileName +
"\" ?>");
But it causes javax.xml.bind.PropertyException
with this message :
name: com.sun.xml.bind.xmlHeaders value: <?xml-stylesheet type='text/xsl' href="decathlon.xsl" ?>
"very informative"
Sorry, but I cannot elaborate more, frankly I have no idea what causes this.
I managed to find this answer, which solved my problem. All i had to do to replace the com.sun.xml.bind.xmlHeaders
property with com.sun.xml.internal.bind.xmlHeaders
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With