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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:23:59+00:00 2026-06-08T03:23:59+00:00

im looking for a way to load data from my xml to lists that

  • 0

im looking for a way to load data from my xml to lists that i can edit the items and then load the changes back to the xml file;

<game id="1" name="animals" instruction=" instruction here ">
<words>
  <word wordName="Weasel" categoryCode="1" categoryName="Mammals" />
  <word wordName="Dog" categoryCode="1" categoryName="Mammals" />
  <word wordName="Cat" categoryCode="1" categoryName="Mammals" />
  <word wordName="Snake" categoryCode="2" categoryName="Reptiles" />
  <word wordName="Chameleon" categoryCode="2" categoryName="Reptiles" />
  <word wordName="agama" categoryCode="2" categoryName="Reptiles" />
  <word wordName="Chicken" categoryCode="3" categoryName="Birds" />
  <word wordName="Peacock" categoryCode="3" categoryName="Birds" />
  <word wordName="Pigeon" categoryCode="3" categoryName="Birds" />
</words>`

for example: then i load my page, there will be 5 lists, (2 of them will be empty at the moment), and the other 3 will be “mammals” “reptiles” and “birds”. under each on of those will be a list of all the items other that list. under mammals: weasel, dog, cat and so on.

im looking for a way to let my user change everything, add 2 more nodes (there for the extra empty lists), change the wordName value, change the categoryName value, add more values etc…

anyone got any suggestions on how to make the list? which component can i use?

im programing in c# and on visual studio 2010.

thanks 🙂

  • 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-08T03:24:01+00:00Added an answer on June 8, 2026 at 3:24 am

    You can start with:

    XElement root = XElement.Load(file);
    

    With the root node, you can then find the word children with:

    IEnumerable<XElement> wordList = root.Decendants("word");
    

    Then loop over the wordList view each XElement word to get data (there are plenty of examples of that here and elsewhere, just search for it). And you can add more to any XElement with its .Add() method. If you want to add it to the "words" element, you can search for that with:

    XElement words = root.Element("words"); // if it is a first rank child or
    XElement words = root.XPathSelectElement("//words[word]"); // if it is burried deeper
    

    The //words[word] in XPathSelectElement means .Descendants("words") that has a child word. To use XPathSelectElement you need to add the following using to your csharp file:

    using System.Xml.XPath;
    

    There are obviously other tricks, ways and means depending on your needs. Good luck!

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

Sidebar

Related Questions

I have a program that load data from a file using std::ifstream and store
I'm looking at solutions to a problem that involves reading keyed data from more
I have a PHP script that works by calling items from a database based
I'm trying to create a windows form application that manipulates data from several tables
I've been looking for a way to download an image from a URL, preform
There is a requirement to load a list of items(ArrayList) from two different tables.
I am trying to load a large amount data in SQL server from a
Looking for some help and advice please from Super Guru MySQL/PHP pros who can
I have a SQL file with temporary tables creation, some load data infile, some
very easily we can detect when user scroll and then we can load next

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.