Skip to content

Commit 0999acf

Browse files
committed
Merge branch '3.0.x'
Closes gh-985
2 parents cae21cf + 12cf06d commit 0999acf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-restdocs-core/src/main/java/org/springframework/restdocs/payload/XmlContentHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ private String prettyPrint(Document document) {
174174
StringWriter stringWriter = new StringWriter();
175175
StreamResult xmlOutput = new StreamResult(stringWriter);
176176
TransformerFactory transformerFactory = TransformerFactory.newInstance();
177-
transformerFactory.setAttribute("indent-number", 4);
178177
Transformer transformer = transformerFactory.newTransformer();
179178
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
180179
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
180+
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
181181
transformer.transform(new DOMSource(document), xmlOutput);
182182
return xmlOutput.getWriter().toString();
183183
}

0 commit comments

Comments
 (0)