[forge-dev] Bug on XML indentation?
Alex Soto Bueno
asotobue at redhat.com
Wed Jan 25 11:06:06 EST 2017
Hi I am generating an XML file in an addon using:
XMLParser.toXMLString(xml);
The node I am creating is done:
xml.getOrCreate("extension at qualifier=" + qualifier)
.getOrCreate("property at name=" + key)
.text(value);
were value is a yaml-like expression.
The problem is that the resulting XML is not well indented:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://jboss.org/schema/arquillian
http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<extension qualifier="algeron-consumer">
<configuration>
<property name="publishConfiguration">
provider: folder
outputFolder: /tmp/contracts
contractsFolder: target/pacts
</property>
</configuration>
</extension>
</arquillian>
I can understand that YAML thing is not correctly formatted but notice that
the closing </property> tag is not correctly indented.
Any idea?
Alex.
More information about the forge-dev
mailing list