I save a spreadsheets from Excel to XML in this view:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<companies>
<company>
<employee>
<code>1</code>
<name/>
<street>14th street</street>
<houseno>1</houseno>
<areacode>1050 DD</areacode>
<place>NoWhere</place>
<phone>0100 987654</phone>
</employee>
</company>
</companies>
But I need this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<companies>
<company>
<employee code="1" name="" street="14th street" houseno="1" areacode="1050 DD" place="NoWhere" phone="0100 987654">
</employee>
</company>
</companies>
Tell me please how to solve the problem?
This XSLT 1.0 stylesheet would do it (try it here with your sample XML).
Now it depends onyour environment how you can use it. There are several tools and libraries available that provide XSLT support.