Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. looping in Xml nodes in C#

looping in Xml nodes in C#

Scheduled Pinned Locked Moved XML / XSL
xmlcsharp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    saymajum
    wrote on last edited by
    #1

    I need a loop that will reach every XML nodes through XPath in C#

    C G 3 Replies Last reply
    0
    • S saymajum

      I need a loop that will reach every XML nodes through XPath in C#

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Then you'd be looking for a recursive loop.


      Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... * Reading: Developer Day 5 Ready to Give up - Your help will be much appreciated. My website

      1 Reply Last reply
      0
      • S saymajum

        I need a loop that will reach every XML nodes through XPath in C#

        G Offline
        G Offline
        George L Jackson
        wrote on last edited by
        #3

        I believe using the XPath expression "//*" will do the job if you mean "looping elements". -- modified at 19:32 Thursday 21st June, 2007

        "We make a living by what we get, we make a life by what we give." --Winston Churchill

        1 Reply Last reply
        0
        • S saymajum

          I need a loop that will reach every XML nodes through XPath in C#

          G Offline
          G Offline
          George L Jackson
          wrote on last edited by
          #4

          If you are searching for any type node (this includes elements, text nodes, comments, etc.) and attributes, this works:

          //node()|//@*
          

          "We make a living by what we get, we make a life by what we give." --Winston Churchill

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups