S
suzy
Hello, please can someone help me with the following:
If I have the following XML.
<Tables>
<Table>
<TABLE_NAME>User</TABLE_NAME>
<COLUMN_NAME>UserId</COLUMN_NAME>
<DATA_TYPE>bigint</DATA_TYPE>
</Table>
<Table>
<TABLE_NAME>User</TABLE_NAME>
<COLUMN_NAME>PersonId</COLUMN_NAME>
<DATA_TYPE>bigint</DATA_TYPE>
</Table>
<Table>
<TABLE_NAME>User</TABLE_NAME>
<COLUMN_NAME>Notes</COLUMN_NAME>
<DATA_TYPE>varchar</DATA_TYPE>
</Table>
<Table>
<TABLE_NAME>Person</TABLE_NAME>
<COLUMN_NAME>PersonId</COLUMN_NAME>
<DATA_TYPE>bigint</DATA_TYPE>
</Table>
</Tables>
What is the best/easiest way to transform it into the following format in
C#/XSL:
<Tables>
<Table Name="User">
<COLUMN DataType="bigint">UserId</COLUMN>
<COLUMN DataType="bigint">PersonId</COLUMN>
<COLUMN DataType="varchar">Notes</COLUMN>
</Table>
<Table Name="Person">
<COLUMN DataType="bigint">PersonId</COLUMN>
</Table>
</Tables>
If I have the following XML.
<Tables>
<Table>
<TABLE_NAME>User</TABLE_NAME>
<COLUMN_NAME>UserId</COLUMN_NAME>
<DATA_TYPE>bigint</DATA_TYPE>
</Table>
<Table>
<TABLE_NAME>User</TABLE_NAME>
<COLUMN_NAME>PersonId</COLUMN_NAME>
<DATA_TYPE>bigint</DATA_TYPE>
</Table>
<Table>
<TABLE_NAME>User</TABLE_NAME>
<COLUMN_NAME>Notes</COLUMN_NAME>
<DATA_TYPE>varchar</DATA_TYPE>
</Table>
<Table>
<TABLE_NAME>Person</TABLE_NAME>
<COLUMN_NAME>PersonId</COLUMN_NAME>
<DATA_TYPE>bigint</DATA_TYPE>
</Table>
</Tables>
What is the best/easiest way to transform it into the following format in
C#/XSL:
<Tables>
<Table Name="User">
<COLUMN DataType="bigint">UserId</COLUMN>
<COLUMN DataType="bigint">PersonId</COLUMN>
<COLUMN DataType="varchar">Notes</COLUMN>
</Table>
<Table Name="Person">
<COLUMN DataType="bigint">PersonId</COLUMN>
</Table>
</Tables>