-
-
Notifications
You must be signed in to change notification settings - Fork 234
Closed
Milestone
Description
I want to prettyprint XML with a \n
character, disregarding the system dependent line feed/carriage return settings.
I thought that the following code would be sufficient:
XmlMapper xmlMapper = new XmlMapper();
DefaultXmlPrettyPrinter pp = new DefaultXmlPrettyPrinter();
pp.indentObjectsWith(new Newline2SpacesIndenter());
ObjectWriter xmlWriter = xmlMapper.writer(pp);
Where Newline2SpacesIndenter()
is my custom indenter.
However, attempting to use the resulting ObjectWriter doesn't result in the expected behaviour - the customized indenter is lost, as DefaultXmlPrettyPrinter.createInstance()
doesn't preserve configuration.
Is this a bug, or am I attempting to configure things in the wrong place?
Metadata
Metadata
Assignees
Labels
No labels