You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the only way would be to explicitly contruct either underlying XMLStreamWriter, and write both xml declaration and style sheet PI (assuming it comes before root element); or, to construct ToXmlGenerator similarly, use writeRaw() to force output of declaration.
It would be good to add new mechanism(s), I think #150 is related to this. Not sure of the best way to model this; I don't think a feature flag will work well enough, but while configuring XmlMappers is possible via new Builder API, this may be something where per-write option would be preferable.
I hope to tackle something in this space for 2.13, tagging.
Describe the solution you'd like
Allow adding to the resulting XML.
Usage example
I want to serialize Java POJOs to XML in Spring REST endpoint, but include XSLT reference so that the browsers render it as HTML.
Additional context
The only similar feature I found is a flag WRITE_XML_DECLARATION.
The text was updated successfully, but these errors were encountered: