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. Problem with displaying parent node and child node attribute in c#-- need urgent [modified]

Problem with displaying parent node and child node attribute in c#-- need urgent [modified]

Scheduled Pinned Locked Moved XML / XSL
questioncsharpadobegame-devxml
5 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.
  • V Offline
    V Offline
    Vishnu Narayan Mishra
    wrote on last edited by
    #1

    Hello every one ! How can I display attribute of parent node and corresponding child nodes.Suppose I have to display 'Label' attributes of all . There can be multiple inside parent node .In this case I have to display Label 'rediffHomePage' and 'rediffHomePage1' of both node. But I have to display corresponding Label of 'FieldsToSupport/FieldToSupport' of ..In this case I have to display Label 'HotJobs'and 'Game' for 'rediffHomePage' similarly display Label 'Images' and 'Air Tickets' for 'rediffHomePage1'. For example on click an Item like rediffHomePage from a repeater/dataList It should display Label like 'HotJobs' and 'Game'of FieldToSupport. How can I display Label of corresponding FieldsToSupport/FieldToSupport on click on corresponding Label of ..How can I do this ? following is the structure of XML file, which is not follows an hierarchical structure of XML.. -------------------------------------------------------------------- 199d1dfd-63ca-4271-b234-77da0f579e0e ... 1 ... HotJobs ... ... Game ... rediffHomePage e62abc49-efc7-4a5d-908f-33f2f4df070b ... 2 .. Images .. ... Air Tickets ... rediffHomePage1 -------------------------------------------------------------------- I am not very familiar with how displaying XML contents.. I tried this way

    G 3 Replies Last reply
    0
    • V Vishnu Narayan Mishra

      Hello every one ! How can I display attribute of parent node and corresponding child nodes.Suppose I have to display 'Label' attributes of all . There can be multiple inside parent node .In this case I have to display Label 'rediffHomePage' and 'rediffHomePage1' of both node. But I have to display corresponding Label of 'FieldsToSupport/FieldToSupport' of ..In this case I have to display Label 'HotJobs'and 'Game' for 'rediffHomePage' similarly display Label 'Images' and 'Air Tickets' for 'rediffHomePage1'. For example on click an Item like rediffHomePage from a repeater/dataList It should display Label like 'HotJobs' and 'Game'of FieldToSupport. How can I display Label of corresponding FieldsToSupport/FieldToSupport on click on corresponding Label of ..How can I do this ? following is the structure of XML file, which is not follows an hierarchical structure of XML.. -------------------------------------------------------------------- 199d1dfd-63ca-4271-b234-77da0f579e0e ... 1 ... HotJobs ... ... Game ... rediffHomePage e62abc49-efc7-4a5d-908f-33f2f4df070b ... 2 .. Images .. ... Air Tickets ... rediffHomePage1 -------------------------------------------------------------------- I am not very familiar with how displaying XML contents.. I tried this way

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

      I am having problems following what you want to do. However, if you have a node list of <Label/> nodes from your document, XmlNode has a property called ParentNode. From that, you have access to its immediate parent.

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

      V 1 Reply Last reply
      0
      • G George L Jackson

        I am having problems following what you want to do. However, if you have a node list of <Label/> nodes from your document, XmlNode has a property called ParentNode. From that, you have access to its immediate parent.

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

        V Offline
        V Offline
        Vishnu Narayan Mishra
        wrote on last edited by
        #3

        Not getting you sir, can you try to suggest solution

        1 Reply Last reply
        0
        • V Vishnu Narayan Mishra

          Hello every one ! How can I display attribute of parent node and corresponding child nodes.Suppose I have to display 'Label' attributes of all . There can be multiple inside parent node .In this case I have to display Label 'rediffHomePage' and 'rediffHomePage1' of both node. But I have to display corresponding Label of 'FieldsToSupport/FieldToSupport' of ..In this case I have to display Label 'HotJobs'and 'Game' for 'rediffHomePage' similarly display Label 'Images' and 'Air Tickets' for 'rediffHomePage1'. For example on click an Item like rediffHomePage from a repeater/dataList It should display Label like 'HotJobs' and 'Game'of FieldToSupport. How can I display Label of corresponding FieldsToSupport/FieldToSupport on click on corresponding Label of ..How can I do this ? following is the structure of XML file, which is not follows an hierarchical structure of XML.. -------------------------------------------------------------------- 199d1dfd-63ca-4271-b234-77da0f579e0e ... 1 ... HotJobs ... ... Game ... rediffHomePage e62abc49-efc7-4a5d-908f-33f2f4df070b ... 2 .. Images .. ... Air Tickets ... rediffHomePage1 -------------------------------------------------------------------- I am not very familiar with how displaying XML contents.. I tried this way

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

          Vishnu Narayan Mishra wrote:

          How can I display attribute of parent node and corresponding child nodes.

          Your XML document, at least the one displayed, does not have any attributes!

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

          1 Reply Last reply
          0
          • V Vishnu Narayan Mishra

            Hello every one ! How can I display attribute of parent node and corresponding child nodes.Suppose I have to display 'Label' attributes of all . There can be multiple inside parent node .In this case I have to display Label 'rediffHomePage' and 'rediffHomePage1' of both node. But I have to display corresponding Label of 'FieldsToSupport/FieldToSupport' of ..In this case I have to display Label 'HotJobs'and 'Game' for 'rediffHomePage' similarly display Label 'Images' and 'Air Tickets' for 'rediffHomePage1'. For example on click an Item like rediffHomePage from a repeater/dataList It should display Label like 'HotJobs' and 'Game'of FieldToSupport. How can I display Label of corresponding FieldsToSupport/FieldToSupport on click on corresponding Label of ..How can I do this ? following is the structure of XML file, which is not follows an hierarchical structure of XML.. -------------------------------------------------------------------- 199d1dfd-63ca-4271-b234-77da0f579e0e ... 1 ... HotJobs ... ... Game ... rediffHomePage e62abc49-efc7-4a5d-908f-33f2f4df070b ... 2 .. Images .. ... Air Tickets ... rediffHomePage1 -------------------------------------------------------------------- I am not very familiar with how displaying XML contents.. I tried this way

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

            Apparently, you are having a rough time understanding XML and expressing what you are trying to do. From this link, http://www.theserverside.net/tt/books/addisonwesley/EssentialXML/index.tss[^], you can download a free book called, "Essential XML". I hope it helps.

            "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