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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:53:25+00:00 2026-05-16T23:53:25+00:00

I am trying to come up with a windows form application (or WPF) developed

  • 0

I am trying to come up with a windows form application (or WPF) developed in C#.The requirement for my app is to get user search related xml node data from a website containing xml. The application would connect to a website containing xml and grab relevant xml nodes from the website. I would then display the xml node data on my windows app. What’s the best way to do this, also an extension would be to grab all the xml and store in a data tier.
An sample website I will be similar to this page
http://www.amk.ca/quotations/sherlock-holmes.xml

  • 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-16T23:53:26+00:00Added an answer on May 16, 2026 at 11:53 pm

    Not entirely sure what your questions is – are you asking how to achieve this (downloading XML), or where to best put it, or what?

    To grab the XML, use something like this:

    using System.Net;
    
    WebClient client = new WebClient();
    string result = client.DownloadString("http://www.amk.ca/quotations/sherlock-holmes.xml");
    

    You get back a string of XML, which you can now parse using XmlDocument or XDocument (Linq-to-XML) – are you asking how to do this??

    Or if you know what sites and what format XML you’re hitting ahead of time, you could also download the XML and generate a XML schema from it, and in a second step generate C# classes from the XML schema that would be suitable for deserializing the XML string into an enumeration of e.g. Quotation classes (based on the <quotation> tag in the sample XML provided).

    Update: if you have a sample XML as a file, you can use the xsd.exe command line utility to generate a XML schema from the XML, and based on that XML schema, you can create a C# class to be used for deserialization. See the MSDN docs for xsd.exe for more details.

    Basically, calling xsd.exe (yourfile.xml) will generate a yourfile.xsd XML schema based on your XML input file, and running xsd.exe /c (yourfile.xsd) will generate a C# class from that XML schema.

    Using that, you could deserialize your XML into a C# class in one step and then “explore” the contents of the XML by just navigating around the C# class, its properties, and its lists of subelements.

    That deserialization would look something like this:

    XmlSerializer deserializer = new XmlSerializer(typeof(ThatDataTypeGenerated));
    
    object result = deserializer.Deserialize(<either a file name, or a stream or something>);
    

    This works as long as you know ahead of time what XML type you’ll be getting (so that you can generate the XML schema and C# class from it, ahead of time).

    Also, you can do the first step (turn XML data file into schema) inside Visual Studio, too (menu “XML” -> “Generate XML schema”), and for the second step (turning the XSD XML schema into a C# class), you could have a look at something like Xsd2Code.

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

Sidebar

Related Questions

We are builing a windows desktop application (not web based) and trying to come
I am trying to come up with a method to differentiate between form being
Specifically, I'm trying to port some C# code to windows phone platform. I've come
I am trying to develop C# app where I want to have login form
we are trying to write a service for windows and need to come up
I'm trying to run down a memory leak in a windows forms application. I'm
Trying to get pycrypto installed in Windows. At the command prompt, I type python
I'm trying to get a fancybox window to come up on click after an
I'm trying to create a Windows Service to launch Celery. I have come across
I come from a Windows .NET background, but am trying to expand my expertise,

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.