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 261695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:27:12+00:00 2026-05-11T22:27:12+00:00

I have spent about half a day searching for an answer to this question

  • 0

I have spent about half a day searching for an answer to this question and am slowly becoming frustrated. I am working with a Web service that returns an XmlNode as its response. I would like to be able to take the XML data reference by the node and view it with a data grid view. Does any one know if this is possible?

I am using the following code:

         // submit command to webserver
         XmlNode response = SubmitToWebserv((XmlElement)IssueNode, state.Get);

        // create XML reader to read response
        XmlReader reader = new XmlNodeReader(response);

        // create a data table to hold response
        DataTable dt = new DataTable();
        dt.ReadXmlSchema(reader);

        // read data into data table
        dt.ReadXml(reader);

It throws exception: DataTable does not support schema inference from Xml. The thing is, the schema is included in the XML referenced by response… So I am at a loss.

  • 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-05-11T22:27:12+00:00Added an answer on May 11, 2026 at 10:27 pm

    I suggest you try that using DataSet instead of DataTable. I don’t know that it will work, but it makes sense that it would. The schema might have included more than one table.

    OTOH, did the XmlNode include a schema at all?


    I recommend you look at this in the debugger. In particular, watch to see which node the XmlReader is positioned on. I’m not 100% convinced it will advance as you want, from the wrapping element, to the schema, then to the data.

    Also, is there an element wrapping the schema and data:

    <node>
        <xs:schema/>
        <data/>
    </node>
    

    Or are the schema and data elements top-level nodes. This would be a fragment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have spent hours on this and read everybit on the web about memory
I have asked this question before - but I have spent some time thinking
I have spent hours with this issue. I'm about ready to tear my project
Hello guys , I have spent about twenty minutes searching in vain for my
I have spent all Friday and Saturday on this and I am running out
I have spent most of my web-development career in the Microsoft camp, but for
I have spent the last several years fighting tooth and nail to avoid working
I have spent the whole day trying to make a script which on submit
After developing software for about 5 years now, I have spent probably atleast 20%
I've spent about a week trying to troubleshoot this - tried just about every

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.