Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8638123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:38:46+00:00 2026-06-12T10:38:46+00:00

I am using a thirdparty webservice. I got the response in XML format. Now,

  • 0

I am using a thirdparty webservice. I got the response in XML format.
Now, i have to show the XML node values in grid view.
The following code i tried so far.

  using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
    {
        // Get the response stream
        StreamReader reader = new StreamReader(response.GetResponseStream());
        //Label2.Text = reader.ReadToEnd();


        XmlDocument xml = new XmlDocument();
        xml.Load(reader);

        XmlNamespaceManager ns = new XmlNamespaceManager(xml.NameTable);
        ns.AddNamespace("ms", "http://webservices.amazon.com/AWSECommerceService/2005-10-05");

        XmlNode image = xml.SelectSingleNode("//ms:URL", ns);
        XmlNode FormattedPrice = xml.SelectSingleNode("//ms:FormattedPrice", ns);

Now, i want to show the values of XMLnode value in grid view.
Please inform me, if you need more information.
Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T10:38:47+00:00Added an answer on June 12, 2026 at 10:38 am

    Solution:

    Instead of Get the HttpResponse in xmldocument.
    I used XNamespace and XDocument.

    XNamespace ns = "http://webservices.amazon.com/AWSECommerceService/2005-10-05";    // Linq
    XDocument xd = XDocument.Load(response.GetResponseStream());
    

    Then Use Linq to Read all Vlaues. Example:

    var Image = xd.Descendants(ns + "Items").Elements(ns + "Item").Select(img => img.Elements(ns + "MediumImage").Select(img1 => (string)img1.Element(ns + "URL")).FirstOrDefault() ?? "Null").ToList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following problem. I am using Reporting Services 2005 to create some
I am using a third party web service that offers the following calls and
I am having difficulty using a thirdparty library registration function to register a callback.
I am using thirparty service to give me coordinates, below is the response I
Am using below third party API in my project development http://undesigned.org.za/2007/10/22/amazon-s3-php-class I have done
I have an ASP.net WebService which uses a Library, this has a dependency on
At the moment due to using some thirdparty components (which uses strongly reflection) our
Using Fiddler I want to trace a call to an external webservice made in
I have to call a third party webservice that expects and only accepts illegal
I have a webservice that is in much need of some optimization. It's on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.