dynamic xml to datatables

dynamic xml to datatables

ashok.kumarashok.kumar Posts: 2Questions: 1Answers: 0

I am generating the dataTable from two different xml data. I want to set those dynamic column names and values into the datatable.

XML 1:
<Rowsets>
<Rowset>
<Columns>
<Column Description="" MaxRange="1" MinRange="0" Name="PO" SQLDataType="1" SourceColumn="PO"/>
<Column Description="" MaxRange="1" MinRange="0" Name="ProductID" SQLDataType="1" SourceColumn="ProductID"/>
<Column Description="" MaxRange="1" MinRange="0" Name="Batch" SQLDataType="1" SourceColumn="Batch"/>

</Columns>
<Row>
    <PO>1234</PO>
    <ProductID>12345</ProductID>
    <Batch>0987</Batch>
</Row>

</Rowswet>
</Rowsets>

XML 2:
<Rowsets>
<Rowset>
<Columns>
<Column Description="" MaxRange="1" MinRange="0" Name="Plan" SQLDataType="1" SourceColumn="Plan"/>
<Column Description="" MaxRange="1" MinRange="0" Name="ID" SQLDataType="1" SourceColumn="ID"/>
<Column Description="" MaxRange="1" MinRange="0" Name="Catch" SQLDataType="1" SourceColumn="Catch"/>

</Columns>

<Row>
<Plan>ABC</Plan>
<ID>231</ID>
<Catch>432</Catch>
</Row>
</Rowswet>
</Rowsets>

HTML Code:

Answers

  • allanallan Posts: 51,926Questions: 1Answers: 7,874 Site admin

    I'm afraid you are going to have to elaborate rather a lot on this. Just dumping the XML you are working with doesn't tell us much. Are you trying to get that to describe a DataTable? Or should the data in it be shown in a DataTable? What have you tried? Please link to what you have done so far.

    Allan

  • ashok.kumarashok.kumar Posts: 2Questions: 1Answers: 0


    Hi Allan,
    am going to showing in a single table with two different xml inputs

  • colincolin Posts: 9,003Questions: 0Answers: 1,501

    The best bet would be to merge the data outside of DataTables's control. Just issue your two Ajax calls to get the JSON data, merge it, then page that into DataTables when you initialise.

Sign In or Register to comment.