XML Output format help
Posted: Thu Apr 29, 2010 3:12 pm
The XML output when opened in a notepad has new line charactes in between the open and close tags as below.
<?xml version="1.0" encoding="UTF-8"?>
<customers xmlns="http://www.cust.org/Customers" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<customer id="0">
<name>
Porsche
</name>
<order number="1">
<product_code>
1
</product_code>
<quantity>
10
</quantity>
<unit_price>
10000
</unit_price>
</order>
</customer>
</customers>
I like the output to be as below - data in the same line as open and close tags.
<?xml version="1.0" encoding="UTF-8"?>
<customers xmlns="http://www.cust.org/Customers" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<customer id="0">
<name> Porsche</name>
<order number="1">
<product_code>1</product_code>
<quantity>10</quantity>
<unit_price>1000</unit_price>
</order>
</customer>
</customers>
<?xml version="1.0" encoding="UTF-8"?>
<customers xmlns="http://www.cust.org/Customers" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<customer id="0">
<name>
Porsche
</name>
<order number="1">
<product_code>
1
</product_code>
<quantity>
10
</quantity>
<unit_price>
10000
</unit_price>
</order>
</customer>
</customers>
I like the output to be as below - data in the same line as open and close tags.
<?xml version="1.0" encoding="UTF-8"?>
<customers xmlns="http://www.cust.org/Customers" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<customer id="0">
<name> Porsche</name>
<order number="1">
<product_code>1</product_code>
<quantity>10</quantity>
<unit_price>1000</unit_price>
</order>
</customer>
</customers>