我当前的 XML 如下所示:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Rowsets CachedTime="" DateCreated="2013-07-30T00:13:32" EndDate="2013-07-30T00:13:29" StartDate="2013-07-29T23:13:29" Version="12.2.4 Build(92)">
<Rowset>
<Columns>
<Column Description="Name" MaxRange="1" MinRange="0" Name="Name" SQLDataType="-9" SourceColumn="Name"/>
<Column Description="Value" MaxRange="1" MinRange="0" Name="Value" SQLDataType="-9" SourceColumn="Value"/>
<Column Description="Min" MaxRange="1" MinRange="0" Name="Min" SQLDataType="2" SourceColumn="Min"/>
<Column Description="Max" MaxRange="1" MinRange="0" Name="Max" SQLDataType="2" SourceColumn="Max"/>
<Column Description="ObjectDisplay" MaxRange="1" MinRange="0" Name="ObjectDisplay" SQLDataType="12" SourceColumn="ObjectDisplay"/>
<Column Description="Datatype" MaxRange="1" MinRange="0" Name="Datatype" SQLDataType="-9" SourceColumn="Datatype"/>
</Columns>
<Row>
<Name>Tank</Name>
<Value>T111</Value>
<Min>1</Min>
<Max>20</Max>
<ObjectDisplay>Enabled</ObjectDisplay>
<Datatype>String</Datatype>
</Row>
<Row>
<Name>Material</Name>
<Value>111-Bulk</Value>
<Min>7</Min>
<Max>20</Max>
<ObjectDisplay>Enabled</ObjectDisplay>
<Datatype>String</Datatype>
</Row>
<Row>
<Name>Batch</Name>
<Value>1111111</Value>
<Min>7</Min>
<Max>20</Max>
<ObjectDisplay>Enabled</ObjectDisplay>
<Datatype>String</Datatype>
</Row>
</Rowset>
<Rowset>
<Columns>
<Column Description="Name" MaxRange="1" MinRange="0" Name="Name" SQLDataType="-9" SourceColumn="Name"/>
<Column Description="Value" MaxRange="1" MinRange="0" Name="Value" SQLDataType="-9" SourceColumn="Value"/>
<Column Description="Min" MaxRange="1" MinRange="0" Name="Min" SQLDataType="2" SourceColumn="Min"/>
<Column Description="Max" MaxRange="1" MinRange="0" Name="Max" SQLDataType="2" SourceColumn="Max"/>
<Column Description="ObjectDisplay" MaxRange="1" MinRange="0" Name="ObjectDisplay" SQLDataType="12" SourceColumn="ObjectDisplay"/>
<Column Description="Datatype" MaxRange="1" MinRange="0" Name="Datatype" SQLDataType="-9" SourceColumn="Datatype"/>
</Columns>
<Row>
<Name>Tank</Name>
<Value>T222</Value>
<Min>1</Min>
<Max>20</Max>
<ObjectDisplay>Enabled</ObjectDisplay>
<Datatype>String</Datatype>
</Row>
<Row>
<Name>Material</Name>
<Value>222-Bulk</Value>
<Min>7</Min>
<Max>20</Max>
<ObjectDisplay>Enabled</ObjectDisplay>
<Datatype>String</Datatype>
</Row>
<Row>
<Name>Batch</Name>
<Value>2222222</Value>
<Min>7</Min>
<Max>20</Max>
<ObjectDisplay>Enabled</ObjectDisplay>
<Datatype>String</Datatype>
</Row>
</Rowset>
<Rowset>
<Columns>
<Column Description="Name" MaxRange="1" MinRange="0" Name="Name" SQLDataType="-9" SourceColumn="Name"/>
<Column Description="Value" MaxRange="1" MinRange="0" Name="Value" SQLDataType="-9" SourceColumn="Value"/>
<Column Description="Min" MaxRange="1" MinRange="0" Name="Min" SQLDataType="2" SourceColumn="Min"/>
<Column Description="Max" MaxRange="1" MinRange="0" Name="Max" SQLDataType="2" SourceColumn="Max"/>
<Column Description="ObjectDisplay" MaxRange="1" MinRange="0" Name="ObjectDisplay" SQLDataType="12" SourceColumn="ObjectDisplay"/>
<Column Description="Datatype" MaxRange="1" MinRange="0" Name="Datatype" SQLDataType="-9" SourceColumn="Datatype"/>
</Columns>
<Row>
<Name>Tank</Name>
<Value>T333</Value>
<Min>1</Min>
<Max>20</Max>
<ObjectDisplay>Enabled</ObjectDisplay>
<Datatype>String</Datatype>
</Row>
<Row>
<Name>Material</Name>
<Value>333-Bulk</Value>
<Min>7</Min>
<Max>20</Max>
<ObjectDisplay>Enabled</ObjectDisplay>
<Datatype>String</Datatype>
</Row>
<Row>
<Name>Batch</Name>
<Value>3333333</Value>
<Min>7</Min>
<Max>20</Max>
<ObjectDisplay>Enabled</ObjectDisplay>
<Datatype>String</Datatype>
</Row>
</Rowset>
</Rowsets>
现在我想要这样的结果 XML:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Rowsets DateCreated="2013-09-11T06:30:41" EndDate="2013-09-03T16:48:47" StartDate="2013-09-03T16:48:47" Version="12.2.4 Build(92)">
<Rowset>
<Columns>
<Column Description="" MaxRange="1" MinRange="0" Name="Tank" SQLDataType="1" SourceColumn="Tank"/>
<Column Description="" MaxRange="1" MinRange="0" Name="Material" SQLDataType="1" SourceColumn="Material"/>
<Column Description="" MaxRange="1" MinRange="0" Name="Batch" SQLDataType="1" SourceColumn="Batch"/>
</Columns>
<Row>
<Tank>T111</Tank>
<Material>111-Bulk</Material>
<Batch>1111111</Batch>
</Row>
<Row>
<Tank>T222</Tank>
<Material>222-Bulk</Material>
<Batch>2222222</Batch>
</Row>
<Row>
<Tank>T333</Tank>
<Material>333-Bulk</Material>
<Batch>3333333</Batch>
</Row>
</Rowset>
</Rowsets>
我尝试了各种排列和组合,但不知何故我无法获得正确的输出。谁能帮我解决这个问题。