Problem with displaying parent node and child node attribute in c#-- need urgent [modified]
-
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
-
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
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 calledParentNode
. 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
-
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 calledParentNode
. 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
Not getting you sir, can you try to suggest solution
-
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
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
-
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
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