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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:21:38+00:00 2026-05-23T18:21:38+00:00

My work uses software to fill out records that are expressed as XML documents.

  • 0

My work uses software to fill out records that are expressed as XML documents. I have the task of trawling through these XML files to pull statistics out of them. The files themselves adhere to no schema and if a form field doesn’t get filled out then the XML corresponding to that field is not created.

What’s my best approach?

Example XML:

<Form>
    <Field>
        <id>Field ID</id>
        <value>Entered Value</value>
    </Field>
</Form>

I have been attempting to write software that I can use to query the files but have not been able to come up with anything even remotely useful.

Any thoughts appreciated.

EDIT: In terms of C#, what I would like (Though I’m sure it isn’t possible) is a Dictionary that has a string as the key and the corresponding value could EITHER be a string or another Dictionary.

  • 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-23T18:21:39+00:00Added an answer on May 23, 2026 at 6:21 pm

    Is like this ↓ ?

    XML:

    <?xml version="1.0" encoding="utf-8" ?>
    <Form>
     <Field>
      <id>People1</id>
      <value>C Sharp</value>
     </Field>
     <Field>
      <id>People2</id>
      <value>C Sharp</value>
     </Field>
     <Field>
       <id>People3</id>
       <value>C</value>
     </Field>
    

    Source:

    static void Main(string[] args)
        {
            var doc = XDocument.Load("test.xml");
            var result = from p in doc.Descendants("Form").Descendants("Field")
                         select new { ID = p.Element("id").Value, VALUE = p.Element("value").Value };
    
            foreach (var x in result)
                Console.WriteLine(x);
    
            var gr = from p in result
                     group p by p.VALUE into g
                     select new { Language=g.Key , Count=g.Count() };
    
    
            foreach (var x in gr)
                Console.WriteLine(string.Format("Language:{0} Count:{1}" , x.Language , x.Count));
    
            Console.Read();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is an application where I work that uses the Microsoft XML parser 3.0.
My software uses multiple threads to do its work. There is a pipeline that
I have to create a software that must work on several *nix platforms (Linux,
Part of the software I work on uses an Excel sheet to store the
The university I work at uses Oracle for the database system. We currently have
I work on an application that uses DCOM to communicate between what are essentially
I'm working on a C# app that uses SQL 2008 express. Sometimes I work
I have a software-hardware related issue that I'm trying to troubleshoot. My app was
We have a system that uses password authentication to access a database, the usernames
I work on a project that uses multiple open source Java libraries. When upgrades

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.