Alok Uniyal

Alok Uniyal

  • 1k
  • 394
  • 22.6k

XML format problem

Mar 14 2013 1:43 AM
Hello all,
I have a field 'Tax' of data type 'xml' in my table. On button click data saved successfully in 'Tax' field. I want to retrieve that data and bind it to a gridview.
 I use this to bind :

DataSet ds = new DataSet();
 ds.ReadXml(s);
 GridView1.DataSource = ds.Tables[0].DefaultView;

But it is giving a runtime error "Illegal characters in path".
I am using following xml format:
<Tax>
<TaxData>
<Name>VAT</Name>
<Rate>5.00</Rate>
</TaxData>

<TaxData>
<Name>Other Tax</Name>
<Rate>6.00</Rate>
</TaxData>

<TaxData>
<Name>Custom Tax</Name>
<Rate>6.00</Rate>
</TaxData>
</Tax>

Answers (1)