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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:12:37+00:00 2026-05-28T06:12:37+00:00

below is the structure of my xml document. I just want to first take

  • 0

below is the structure of my xml document. I just want to first take the value of every node <attribute name="a"> then make a comparison of it with a given value. However I don’t how to locate <attribute name="a"> of each node using xml selectnodes in c#. Google searches don’t show any working solutions.

<nodes>     
 <node name = "node1">      
  <attribute name="a">This is node1 a</attribute>
  <attribute name="b">This is node1 b</attribute>
 </node>
 <node name = "node2">      
  <attribute name="a">This is node2 a</attribute>
  <attribute name="b">This is node2 b</attribute>
 </node>
 ...
</nodes>     
  • 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-28T06:12:38+00:00Added an answer on May 28, 2026 at 6:12 am

    Assuming the XML markup in your question represents your whole document, you can do:

    XmlNodeList attrElements
        = yourDocument.SelectNodes("/nodes/node/attribute[@name='a']");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a xml structure similar to below one: <test> <test1>test1 value</test1> </test> Now
I am having a xml document like below, <chapter xmlns:xi=http://www.w3.org/2001/XInclude xml:id=chapter1> <title>First chapter</title> <section
In the below XML, we want the value of the second occurence of element
I have two XML files. The structure of both XML files is as below:
I have to parse a 1Gb XML file with a structure such as below
My table structure is below: CREATE TABLE [ACC].[Document]( [DocumentID] [int] IDENTITY(1,1) NOT NULL, [Date]
I call an XML document three-layered if its structure is laid out as following:
Below comment is just a piece of xml comment in VS but my problem
I have an XML structure as follows. I need to extract Value and String
I'm having an issue reading the below XML document in Chrome - nothing seems

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.