Skip to content

XML: Allow adding <?xml-stylesheet ...> #452

Open
@OndraZizka

Description

@OndraZizka

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.

ObjectMapper mapper = builder.createXmlMapper(true).build();
    ((XmlMapper) mapper).enable(ToXmlGenerator.Feature.WRITE_XML_DECLARATION);
    return new MappingJackson2XmlHttpMessageConverter(mapper);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    adding-declarationsIssues related to adding non-content declarations to XML output

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions