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

  • Home
  • SEARCH
  • 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 996739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:55:39+00:00 2026-05-16T06:55:39+00:00

I am developing asp.net mobile application. I am using LINQ to XML to query

  • 0

I am developing asp.net mobile application. I am using LINQ to XML to query XML file. I am using the following query to retrieve the name & value of the query dynamically as follows

var TotalManifolds = from MF in FieldRoot.Element("FIELD-DEFINITION").Element("MANIFOLDS").Elements("MANIFOLD")
                     join SLT in FieldRoot.Element("FIELD-DEFINITION").Element("SLOTS").Elements("SLOT")
                     on (string)MF.Attribute("MID") equals (string)SLT.Attribute("PARENT")
                     select new
                     {
                         SlotName = (string)SLT.Attribute("NAME").Value,
                         SlotValue = (string)SLT.Attribute("NAME").Value
                     };

In the following statement of above query I want to retrieve the name of the attribute dynamically without explicitly specifying the name of the attribute

 SlotName = (string)SLT.Attribute("NAME").Value

Here I am explicitly specifying the name. I want to code which can dynamically retrieve the name of the attribute. I am new to Linq to xml. Can you please tell how this can be done programatically ? or can you provide me the link through which I can resolve the above issue ?

  • 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-16T06:55:39+00:00Added an answer on May 16, 2026 at 6:55 am

    It seems you are looking for something like:

    // ...
    select new
    {
        SlotName = SLT.Attributes().First().Name,
        SlotValue = SLT.Attributes().First().Value
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 531k
  • Answers 531k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In tableView:numberOfRowsInSection: return some huge number, and act accordingly in… May 16, 2026 at 11:48 pm
  • Editorial Team
    Editorial Team added an answer At its root, this is part of the mismatch between… May 16, 2026 at 11:48 pm
  • Editorial Team
    Editorial Team added an answer Remove padding-top and padding:bottom from .text_input and use height:45px; instead May 16, 2026 at 11:48 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am developing asp.net mobile application. I am using the XML as a database.
I am creating a mobile web application using asp.net. The application must support iPhone,
I am developing a web application using asp.net mvc... I am listing out the
I am developing the asp.net mobile application. I am generating the controls dynamically at
I am developing an asp.net application with Windows authentication. User.Identity.Name seems to return the
I'm developing an asp.net application which has Windows Authentication enabled(anonymous access disabled). I've created
I'm developing a web site in ASP.NET/C# that is targeted at mobile users. What
While developing ASP.NET applications I often need to parse a boolean value given in
I'm developing an ASP.NET MVC 2 app using Windows Authentication. When I run it
I am trying to create a mobile version of a web application using VS2010

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.