Click here to Skip to main content
15,895,538 members
Home / Discussions / XML / XSL
   

XML / XSL

 
QuestionCreate a new nested branch efficiently with DOM Pin
Nick Alexeev20-Nov-07 8:57
professionalNick Alexeev20-Nov-07 8:57 
AnswerRe: Create a new nested branch efficiently with DOM Pin
Prateek G20-Nov-07 20:13
Prateek G20-Nov-07 20:13 
QuestionHow to sort all data use xslt? Pin
guiqul16319-Nov-07 22:08
guiqul16319-Nov-07 22:08 
AnswerRe: How to sort all data use xslt? Pin
Prateek G19-Nov-07 22:58
Prateek G19-Nov-07 22:58 
GeneralRe: How to sort all data use xslt? Pin
guiqul16320-Nov-07 13:20
guiqul16320-Nov-07 13:20 
GeneralRe: How to sort all data use xslt? Pin
Prateek G20-Nov-07 20:10
Prateek G20-Nov-07 20:10 
GeneralRe: How to sort all data use xslt? Pin
guiqul16320-Nov-07 20:14
guiqul16320-Nov-07 20:14 
QuestionProblem with binding XMl data into nested repeater control?? Pin
Vishnu Narayan Mishra18-Nov-07 20:43
Vishnu Narayan Mishra18-Nov-07 20:43 
Hello every one !
How can I display data into repeater control..
for eg. I have to display data in the following format from XML
rediffHomePage(First Repeater)
--HotJobs(Second Repeater)
--Label
rediffHomePage1(Second Repeater)
--Images (Second Repeater)
--Air Tickets

I have to display <Label> of <ScreenToSupport> and below this label I have to display <Label> of

FieldsToSupport/FieldToSupport for each <ScreenToSupport>.
How can I bind repeater..

Following is structure my XML file
--------------------------------------------------------------------------
<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>
--------------------------------------------------------------------------
and the code written in c# to extract data from XML given below
--------------------------------------------------------------------------
XmlDocument objXmlDocument = new XmlDocument();
objXmlDocument.Load(strAlbumPath + "\\" + strAlbumName + ".linkinfo.xml");
int count = 0;
int intChildCount = 0;
XmlNodeList objList =

objXmlDocument.SelectNodes("/LinkInformation/ScreensToSupport/ScreenToSupport");
string lsString = "";
String strParentLabel = "";
string strChildLabel = "";
foreach (XmlNode objChild in objList)
{
foreach (XmlElement elementParentLabel in objChild)
{
if (elementParentLabel.Name == "Label")
{
strParentLabel = strParentLabel + elementParentLabel.InnerText + ";";
Response.Write("Parent Label :" + strParentLabel + " ");
break;
//This Line gives all Label of <ScreenToSupport> here I have to bind repeater control to display

Label rediffHomePage and rediffHomePage1
}
}
foreach (XmlNode objChild2 in objChild.ChildNodes)
{
if (objChild2.Name == "FieldsToSupport")
{
intChildCount = objChild2.ChildNodes.Count;
XmlNodeList childF2S = objChild2.ChildNodes;
foreach (XmlNode nodeF2SLable in childF2S)
{
foreach (XmlElement elementLabel in nodeF2SLable)
{
if (elementLabel.Name == "Label")
{
strChildLabel = strChildLabel + elementLabel.InnerText + ";";
count++;
if (count == intChildCount)
{
Response.Write("ChildLabel : " + strChildLabel + " ");
break;
//This Line gives all Label of FieldsToSupport/FieldToSupport for respective <ScreenToSupport> Label

here I have to bind repeater control to display Label HotJobs, Game (FieldsToSupport/FieldToSupport)

for rediffHomePage (<ScreenToSupport>) and Images, Air Tickets for rediffHomePage1.
}
}
}
}
}
}
count = 0;
strChildLabel = "";
}
--------------------------------------------------------------------------
How can I bind both repeater to dispaly data in the required format.
--------------------------------------------------------------------------
QuestionProblem with displaying parent node and child node attribute in c#-- need urgent [modified] Pin
Vishnu Narayan Mishra15-Nov-07 17:35
Vishnu Narayan Mishra15-Nov-07 17:35 
AnswerRe: Problem with displaying parent node and child node attribute in c#-- need urgent Pin
George L. Jackson15-Nov-07 18:00
George L. Jackson15-Nov-07 18:00 
GeneralRe: Problem with displaying parent node and child node attribute in c#-- need urgent Pin
Vishnu Narayan Mishra15-Nov-07 19:13
Vishnu Narayan Mishra15-Nov-07 19:13 
AnswerRe: Problem with displaying parent node and child node attribute in c#-- need urgent Pin
George L. Jackson16-Nov-07 1:28
George L. Jackson16-Nov-07 1:28 
AnswerRe: Problem with displaying parent node and child node attribute in c#-- need urgent Pin
George L. Jackson16-Nov-07 1:58
George L. Jackson16-Nov-07 1:58 
QuestionHow to dispaly attributes of xml nested repeater..(if XML not followed hierarchical structure) Pin
Vishnu Narayan Mishra15-Nov-07 0:36
Vishnu Narayan Mishra15-Nov-07 0:36 
AnswerRe: How to dispaly attributes of xml nested repeater..(if XML not followed hierarchical structure) Pin
pmarfleet15-Nov-07 10:33
pmarfleet15-Nov-07 10:33 
GeneralRe: How to dispaly attributes of xml nested repeater..(if XML not followed hierarchical structure) Pin
Vishnu Narayan Mishra15-Nov-07 19:16
Vishnu Narayan Mishra15-Nov-07 19:16 
GeneralRe: How to dispaly attributes of xml nested repeater..(if XML not followed hierarchical structure) Pin
pmarfleet15-Nov-07 19:41
pmarfleet15-Nov-07 19:41 
QuestionHow to give a unique id like that 15b85c2b-83ca-44ec-8741-22a4dc64f64d in using c# Pin
Vishnu Narayan Mishra14-Nov-07 20:19
Vishnu Narayan Mishra14-Nov-07 20:19 
AnswerRe: How to give a unique id like that 15b85c2b-83ca-44ec-8741-22a4dc64f64d in using c# Pin
Vishnu Narayan Mishra14-Nov-07 22:23
Vishnu Narayan Mishra14-Nov-07 22:23 
Questionhow to fetch child nodes of parent node in XML .. using c#... Pin
Vishnu Narayan Mishra14-Nov-07 2:03
Vishnu Narayan Mishra14-Nov-07 2:03 
AnswerRe: how to fetch child nodes of parent node in XML .. using c#... Pin
led mike14-Nov-07 5:02
led mike14-Nov-07 5:02 
GeneralRe: how to fetch child nodes of parent node in XML .. using c#... Pin
Vishnu Narayan Mishra19-Nov-07 20:03
Vishnu Narayan Mishra19-Nov-07 20:03 
GeneralRe: how to fetch child nodes of parent node in XML .. using c#... Pin
led mike20-Nov-07 5:39
led mike20-Nov-07 5:39 
Questionhow can we go through such kinds of tag in xml like <PopupHTML /> Pin
Vishnu Narayan Mishra13-Nov-07 23:17
Vishnu Narayan Mishra13-Nov-07 23:17 
AnswerRe: how can we go through such kinds of tag in xml like Pin
George L. Jackson14-Nov-07 1:53
George L. Jackson14-Nov-07 1:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.