Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 15th, 2007, 11:41 PM
Authorized User
 
Join Date: Nov 2007
Location: Allahabad, UP, India.
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with displaying parent /child node in C#

Hello every one ! How can I display attribute of parent node and corresponding child nodes.Suppose I have to display 'Label' attributes of all <ScreenToSupport>. There can be multiple <ScreenToSupport>
inside parent node <ScreensToSupport>.In this case I have to display Label 'rediffHomePage' and 'rediffHomePage1' of both <ScreenToSupport> node.But I have to display corresponding Label of FieldsToSupport/FieldToSupport' of <ScreenToSupport>..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 <ScreenToSupport>..How can I do this ?
following is the structure of XML file, which is not follows an hierarchical structure of XML..
--------------------------------------------------------------------
  <ScreensToSupport>
    <ScreenToSupport>
      <ScreenUniqueId>199d1dfd-63ca-4271-b234-77da0f579e0e</ScreenUniqueId>
      <SupportItems>
        <ScreenSupportItem>
          ...
    <RefId>1</RefId>
        </ScreenSupportItem>
      </SupportItems>
      <FieldsToSupport>
        <FieldToSupport>
          ...
          <Label>HotJobs</Label>
          ...
          <FieldSupportItems />
        </FieldToSupport>
        <FieldToSupport>
          ...
          <Label>Game</Label>
          ...
          <FieldSupportItems />
        </FieldToSupport>
      </FieldsToSupport>
      <Label>rediffHomePage</Label>

</ScreenToSupport>
    <ScreenToSupport>
      <ScreenUniqueId>e62abc49-efc7-4a5d-908f-33f2f4df070b</ScreenUniqueId>
      <SupportItems>
        <ScreenSupportItem>
          ...
    <RefId>2</RefId>
        </ScreenSupportItem>
      </SupportItems>
      <FieldsToSupport>
        <FieldToSupport>
          ..
          <Label>Images</Label>
          ..
          <FieldSupportItems />
        </FieldToSupport>
        <FieldToSupport>
          ...
          <Label>Air Tickets</Label>
          ...
          <FieldSupportItems />
        </FieldToSupport>
      </FieldsToSupport>
      <Label>rediffHomePage1</Label>
    </ScreenToSupport>
  </ScreensToSupport>
--------------------------------------------------------------------
I am not very familiar with how displaying XML contents.. I tried this way..
But stuck on that point please help me ..
I will very thankful for that..
Reply With Quote
  #2 (permalink)  
Old November 16th, 2007, 04:37 PM
samjudson's Avatar
Friend of Wrox
Points: 8,439, Level: 39
Points: 8,439, Level: 39 Points: 8,439, Level: 39 Points: 8,439, Level: 39
Activity: 9%
Activity: 9% Activity: 9% Activity: 9%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,085
Thanks: 1
Thanked 180 Times in 179 Posts
Default

Firstly, Label is not an attribute. An attribute looks like this: <ScreenToSupport Label="the label">

Secondly, if this is a ASP.Net question relating to the Repeater control you'd get a better response asking this on the ASP.Net forum.

/- Sam Judson : Wrox Technical Editor -/
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying MDI Child Form Menus with MDI Parent ashu_from_india Pro VB 6 3 June 10th, 2008 11:01 PM
The reference node is not a child of this node.XSL XMLUser XSLT 2 February 25th, 2008 04:22 AM
strange problem while displaying child form in mdi avats General .NET 1 June 20th, 2005 08:06 PM
Select parent node when any one child has key pparadesia XSLT 2 January 7th, 2005 10:29 AM
problem in posting info frm child form to parent aravwind General .NET 2 July 28th, 2004 06:04 AM



All times are GMT -4. The time now is 10:32 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.