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. C#
  4. Parsing XML with XPath Navigator [modified]

Parsing XML with XPath Navigator [modified]

Scheduled Pinned Locked Moved C#
xmljsontutorial
3 Posts 2 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.
  • K Offline
    K Offline
    Kodanda Pani
    wrote on last edited by
    #1

    Hi All, While parsing an xml document using Xpath navigator how we can check whether a node has child nodes or not. Tried using both HasChildern and IsEmptyChild but no luck. I should be able to differentiate between No child child 1 child 2 How to diff between node1 (no children) and node2 (which has children) Thanks in advance. Regards Mahe -- modified at 1:57 Wednesday 11th April, 2007

    G 1 Reply Last reply
    0
    • K Kodanda Pani

      Hi All, While parsing an xml document using Xpath navigator how we can check whether a node has child nodes or not. Tried using both HasChildern and IsEmptyChild but no luck. I should be able to differentiate between No child child 1 child 2 How to diff between node1 (no children) and node2 (which has children) Thanks in advance. Regards Mahe -- modified at 1:57 Wednesday 11th April, 2007

      G Offline
      G Offline
      gauthee
      wrote on last edited by
      #2

      Has child nodes should work fine! Check your xpath correctly, for best examples with xpath refer w3schools!

      Gautham

      K 1 Reply Last reply
      0
      • G gauthee

        Has child nodes should work fine! Check your xpath correctly, for best examples with xpath refer w3schools!

        Gautham

        K Offline
        K Offline
        Kodanda Pani
        wrote on last edited by
        #3

        Hi, Thank you for your response. My XML file is Singapore

        IA 20

        My Xpath is selecting country element. So how can i differentiate between name element and Address element. Thanks, Pani

        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