我正在尝试将属性转换为子元素,即打开以下内容:
<employees companyid="101">
<record>
<id>1</id>
<name>pradeep</name>
<designation>softeng</designation>
</record>
<record>
<id>2</id>
<name>som</name>
<designation>softeng</designation>
</record>
<record>
<id>3</id>
<name>Javed</name>
<designation>softeng</designation>
</record>
</employees>
我想这样改造
<employees>
<record>
<id>1</id>
<name>pradeep</name>
<designation>softeng</designation>
</record>
<record>
<id>2</id>
<name>som</name>
<designation>softeng</designation>
</record>
<record>
<id>3</id>
<name>Javed</name>
<designation>softeng</designation>
</record>
</employees>
它不工作。有什么建议么?