Q: indent XML inner data with Transformer I'm writing an XML file with this tutorial. I applied 
transformer.setOutputProperty("{http://xml.apache.org/xalan}indent-amount", "4");
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");

code for xml formetting. 
But for long xml data it shows me xml like khis:
<kml>
<Placemark>
    <name>yong</name>
    <Polygon>
        <timezone>EASTERN</timezone>
        <outerBoundaryIs>
            <LinearRing>
                <coordinates>-77.05788457660967,38.87253259892824,100
-77.05465973756702,38.87291016281703,100
-77.05315536854791,38.87053267794386,100
-77.05552622493516,38.868757801256,100
-77.05844056290393,38.86996206506943,100
-77.05788457660967,38.87253259892824,100</coordinates>
            </LinearRing>
        </outerBoundaryIs>
    </Polygon>
</Placemark>
</kml>

But i want to format this in following way:
<kml>
<Placemark>
    <name>yong</name>
    <Polygon>
        <timezone>EASTERN</timezone>
        <outerBoundaryIs>
            <LinearRing>
                <coordinates>
                    -77.05788457660967,38.87253259892824,100
                    -77.05465973756702,38.87291016281703,100
                    -77.05315536854791,38.87053267794386,100
                    -77.05552622493516,38.868757801256,100
                    -77.05844056290393,38.86996206506943,100
                    -77.05788457660967,38.87253259892824,100
                </coordinates>
            </LinearRing>
        </outerBoundaryIs>
    </Polygon>
</Placemark>
</kml>

How to do this? Is there any way or another property in transformer from this formatting can be achieved?
Thanks in advance..

A: I do not know if this is possible.
I suppose that your field coordinate is a String. The Transformer does modify the content of a String to prevent for instance from changes in you String is a text where spaces, tabs and newlines have a meaning.
If you need to have this field aligned, you can either:


*

*do it manually (assuming that the coordinates fields is always the at the fifth level and add you own \n\t\t\t\t\t.

*change the type of the coordinate field if you are allowed to...

