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 @@ -174,10 +174,10 @@ private String prettyPrint(Document document) {
174
174
StringWriter stringWriter = new StringWriter ();
175
175
StreamResult xmlOutput = new StreamResult (stringWriter );
176
176
TransformerFactory transformerFactory = TransformerFactory .newInstance ();
177
- transformerFactory .setAttribute ("indent-number" , 4 );
178
177
Transformer transformer = transformerFactory .newTransformer ();
179
178
transformer .setOutputProperty (OutputKeys .INDENT , "yes" );
180
179
transformer .setOutputProperty (OutputKeys .OMIT_XML_DECLARATION , "yes" );
180
+ transformer .setOutputProperty ("{http://xml.apache.org/xslt}indent-amount" , "4" );
181
181
transformer .transform (new DOMSource (document ), xmlOutput );
182
182
return xmlOutput .getWriter ().toString ();
183
183
}
You can’t perform that action at this time.
0 commit comments