File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
spring-restdocs-core/src/main/java/org/springframework/restdocs/payload Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -173,10 +173,10 @@ private String prettyPrint(Document document) {
173
173
StringWriter stringWriter = new StringWriter ();
174
174
StreamResult xmlOutput = new StreamResult (stringWriter );
175
175
TransformerFactory transformerFactory = TransformerFactory .newInstance ();
176
- transformerFactory .setAttribute ("indent-number" , 4 );
177
176
Transformer transformer = transformerFactory .newTransformer ();
178
177
transformer .setOutputProperty (OutputKeys .INDENT , "yes" );
179
178
transformer .setOutputProperty (OutputKeys .OMIT_XML_DECLARATION , "yes" );
179
+ transformer .setOutputProperty ("{http://xml.apache.org/xslt}indent-amount" , "4" );
180
180
transformer .transform (new DOMSource (document ), xmlOutput );
181
181
return xmlOutput .getWriter ().toString ();
182
182
}
You can’t perform that action at this time.
0 commit comments