Link to home
Start Free TrialLog in
Avatar of yymae
yymae

asked on

Needed Help on Converting from XmlNode to Dataset

Dear All,

I have a problem here, I'm using C# Webform calling a webservices. The webservices return me a XMLnode, using this XMLnode I want to convert it to dataset so I can bind to the datagrid, by extracting the <CustomerData></CustomerData> block from the xmlnode.

Below is the sample of xmlnode return from webservices.

<?xml version="1.0" encoding="utf-8"?>
<OutputParams>
  <CustomerData>
    <CustomerID>1</CustomerID>
    <CustomerName>TEST1</CustomerName>
    <Gender>M  </Gender>
    <DateOfBirth>19800101</DateOfBirth>
  </CustomerData>
  <CustomerData>
    <CustomerID>1</CustomerID>
    <CustomerName>TEST2</CustomerName>
    <Gender />
    <DateOfBirth>19000101</DateOfBirth>
  </CustomerData>
  <CustomerData>
    <CustomerID>3</CustomerID>
    <CustomerName>TEST3</CustomerName>
    <Gender />
    <DateOfBirth>19000101</DateOfBirth>
  </CustomerData>
  <ReturnCode>0</ReturnCode>
  <ErrorCode>0</ErrorCode>
  <ErrorDescription />
</OutputParams>

How can it be done? Please provide some examples on this.
Thanks in advance.


Cheers,
yymae
Avatar of rama_krishna580
rama_krishna580
Flag of United States of America image

ASKER CERTIFIED SOLUTION
Avatar of tomasX2
tomasX2

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial