I am creating a WCF Web Service in which one method (exposed in Service) return data in XML format as given below:
public string QueryDirectoryEntry()
{
XmlDocument doc = new XmlDocument();
doc.Load(@"c:\" + FILE_NAME);
return doc.InnerXml;
}
If the client call this method ther service return data in XML format , I want to bind this Xml in the datagridview control.
The XML data is actually contains the List.
class MyStruct
{
Name..
ID...
}
XML:
<root>
<MyStruct>
<Name>abc</Name>
<ID>1</ID>
</MyStruct>
<MyStruct>
<Name>abc</Name>
<ID>2</ID>
</MyStruct>
</root>
I want that data should be in XML so that every application can use this data either in C# or Java.
Please Help!!