I have XML file like this
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<linearlayout layout_height="match_parent" layout_width="match_parent" orientation="vertical">
<textview layout_height="wrap_content" layout_width="match_parent" text="Hello XML!"/>
<button layout_height="wrap_content" layout_width="wrap_content" text="Click Me"/>
</linearlayout>
and i want each attribute of element be on it's own line like this
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<linearlayout
layout_height="match_parent"
layout_width="match_parent"
orientation="vertical">
<textview
layout_height="wrap_content"
layout_width="match_parent"
text="Hello XML!"/>
<button
layout_height="wrap_content"
layout_width="wrap_content"
text="Click Me"/>
</linearlayout>
how can i do this using java ?