I have the following webservice which i downloaded and saved as xml file , i bind it with my gridview . how do i display all Data as column in my gridview? Following is my databinding code:
- XmlReader myxmlFile = XmlReader.Create("C:/test.xml", new XmlReaderSettings());
-
- DataSet dss = new DataSet();
- DataTable dt = new DataTable();
-
- dss.ReadXml(myxmlFile);
-
- GridView1.DataSource = dss.Tables["Attribute"];
-
- GridView1.DataBind();
- xml version="1.0" encoding="utf-8"?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <SingletonCD xmlns="mywebservice">
- <SingletonCR>
- <TS>OKTS>
- <ErrorCode>0ErrorCode>
- <ErrorDescription />
- <WebserviceContent>
- <data xmlns="">
- <AS xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <Singleton>
- <N1>000000000000N1>
- <MI>40000000000000MI>
- <TS>OKTS>
- <Gr>NeullGr>
- <Ad>
- <Attribute Name="N" Group="AB">NATIVEAttribute>
- <Attribute Name="C" Group="AB">JUIINAttribute>
- <Attribute Name="T " Group="AB">9.00Attribute>
- <Attribute Name="P 1" Group="AB">GHD67Attribute>
- <Attribute Name="P 2" Group="AB">GH678Attribute>
- <Attribute Name="C" Group="AB">EXXAAttribute>
- <Attribute Name="T" Group="AB">MaHAttribute>
- <Attribute Name="P" Group="AB">0.00Attribute>
- <Attribute Name="D" Group="AB">Dest nameAttribute>
- <Attribute Name="A" Group="AB">Agent nameAttribute>
- Ad>
- Singleton>
- <Singleton>
- <N1>000000000300N1>
- <MI>40000055000000MI>
- <TS>OKTS>
- <Gr>NULLGr>
- <Ad>
- <Attribute Name="N" Group="AB">BANAttribute>
- <Attribute Name="C" Group="AB">SZEYDOUAttribute>
- <Attribute Name="T " Group="AB">9U00Attribute>
- <Attribute Name="P1" Group="AB">GD67Attribute>
- <Attribute Name="P2" Group="AB">G678Attribute>
- <Attribute Name="C" Group="AB">EXUAAttribute>
- <Attribute Name="T" Group="AB">MaHAttribute>
- <Attribute Name="P" Group="AB">0.00Attribute>
- <Attribute Name="D" Group="AB">Dest COAttribute>
- <Attribute Name="A" Group="AB">Agent COAttribute>
- Ad>
- Singleton>
- AS>
- data>
- WebserviceContent>
- SingletonCR>
- SingletonCD>
- soap:Body>
- soap:Envelope>
Niska DelavegaPosted Dec 6, 2019, 2:50 AM
Laxmidhar SahooPosted Dec 5, 2019, 10:49 PM