Dear Team,
I have got 2 web api and I am getting their output in xml string.


Dear Team,
I have got 2 web api and I am getting their output in xml string.


Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Dear Ashutosh sir,
I have implemented your code - Class method.

Dear Ashutosh sir,
Your Solution -

Dear Team,
In my xml output string -
Dear sir,
From the web api, I am getting the response as xml string.

Ashutosh GuptaPosted Jan 2, 2020, 7:53 AM
Riddhi ValechaPosted Jan 24, 2020, 7:16 PM
Dear sir,
I again need help in converting XML to .NET Object.. But, this api is of PUT Method - It is for updating record based on ID.
Jignesh KumarPosted Jan 4, 2020, 2:27 AM
Jaish MathewsPosted Jan 3, 2020, 8:27 AM
Ashutosh GuptaPosted Jan 3, 2020, 8:19 AM
Riddhi ValechaPosted Jan 3, 2020, 7:43 AM
Dear Ashutosh sir,
Yes, Your Answer has helped me out... One last help required from your end - i need to bind the result to datatable and display it in a gridview.
{
try
{
DataTable dt = new DataTable();
dt.Columns.Add("Computer.ComputerType", typeof(string));
dt.Columns.Add("Model.Brand.Name", typeof(string));
dt.Columns.Add("Model.Name", typeof(string));
dt.Columns.Add("Computer.TcpIpHostName", typeof(string));
dt.Columns.Add("Asset.SerialNo", typeof(string));
dt.Columns.Add("User.UserName", typeof(string));
dt.Columns.Add("RIL_Inventoried_User.UserName", typeof(string));
dt.Columns.Add("Asset.Field1", typeof(string));
string result = CreateSOAPWebRequest_PendingAssets();
{
QueryRoot root = (QueryRoot)serializer.Deserialize(reader);
{
foreach (var coloumItem in rowItem.ColoumnList)
{
DataRow row = dt.NewRow();
row["Computer.ComputerType"] = coloumItem.Value.ToString();
dt.Rows.Add(row);
}
}
}
catch (Exception err) { err.Message.ToString(); }
}
Ashutosh GuptaPosted Jan 3, 2020, 3:22 AM