Click here to Skip to main content
15,917,176 members
Home / Discussions / C#
   

C#

 
Questionwebbrowser and autoviewer Pin
daveice3-Apr-10 0:45
daveice3-Apr-10 0:45 
AnswerRe: webbrowser and autoviewer Pin
Abhinav S3-Apr-10 1:36
Abhinav S3-Apr-10 1:36 
QuestionRandom numbers Pin
Janded3-Apr-10 0:12
Janded3-Apr-10 0:12 
QuestionRe: Random numbers Pin
sanforjackass3-Apr-10 0:14
sanforjackass3-Apr-10 0:14 
AnswerMessage Removed Pin
3-Apr-10 0:22
Janded3-Apr-10 0:22 
GeneralRe: Random numbers Pin
sanforjackass3-Apr-10 0:28
sanforjackass3-Apr-10 0:28 
GeneralRe: Random numbers Pin
Dave Kreskowiak3-Apr-10 3:03
mveDave Kreskowiak3-Apr-10 3:03 
GeneralRe: Random numbers Pin
OriginalGriff3-Apr-10 4:30
mveOriginalGriff3-Apr-10 4:30 
GeneralRe: Random numbers Pin
Dave Kreskowiak3-Apr-10 5:43
mveDave Kreskowiak3-Apr-10 5:43 
GeneralRe: Random numbers Pin
OriginalGriff3-Apr-10 5:47
mveOriginalGriff3-Apr-10 5:47 
AnswerRe: Random numbers Pin
Abhinav S3-Apr-10 0:26
Abhinav S3-Apr-10 0:26 
GeneralRe: Random numbers Pin
Som Shekhar3-Apr-10 1:13
Som Shekhar3-Apr-10 1:13 
GeneralRe: Random numbers Pin
Abhinav S3-Apr-10 1:24
Abhinav S3-Apr-10 1:24 
GeneralRe: Random numbers Pin
harold aptroot3-Apr-10 1:47
harold aptroot3-Apr-10 1:47 
GeneralRe: Random numbers Pin
Abhinav S3-Apr-10 1:52
Abhinav S3-Apr-10 1:52 
GeneralRe: Random numbers Pin
Som Shekhar3-Apr-10 1:58
Som Shekhar3-Apr-10 1:58 
GeneralRe: Random numbers Pin
Abhinav S3-Apr-10 2:01
Abhinav S3-Apr-10 2:01 
QuestionConnexion with my database .sdf with c# smart device project Pin
Tunisien862-Apr-10 23:32
Tunisien862-Apr-10 23:32 
Question(Xml) Reading a Selected Node Attributes [modified] Pin
xEvOx2-Apr-10 22:58
xEvOx2-Apr-10 22:58 
right usually when i read Xml I do it like this :
XmlDocument XmlDoc = new XmloDocument();
XmlDoc.Load("C:\\Example.xml");
XmlNodeList XmlnodeyList = XmlDoc.SelectNodes("Xml/Node");
foreach(XmlNode Nodey in XmlNodeyList)
{
  listView1.Items.Add((string.format("{0}", Nodey.Attributes["ExampleNode"].Value.ToString())));
}


Now that then populates a listview with the nodes in the xml file, I now have been pulling my hair out trying get it to red the second area of the nodes for example in the xml file :
<Node ExampleNode='Meh' SecondNode='Example' />  Sorry CodeProject Wouldent display it properally :)

i want it to read the SecondNode but since i have say 4 of them all diffrent i want it to then read it and make a label have the secondnode text from the listview selected item , Here is the code i wrote for it :
string Name = listView1.SelectedItems[0].ToString();
            XmlDocument XmlDoc = new XmlDocument();
            XmlDoc.Load(XmlPath);
            XmlNode Nodey = XmlDoc.SelectSingleNode(string.Format("Xml/Node/{0}", Name));
            label1.Text = (string.Format("{0}", Nodey.Attributes["SecondNode"].Value.ToString()));

so on click from the listview it gets the second node etc ,
any help wouyld be grand guys !

Jed
modified on Saturday, April 3, 2010 5:11 AM

Questionloged in user Pin
netJP12L2-Apr-10 16:46
netJP12L2-Apr-10 16:46 
AnswerRe: loged in user Pin
Eddy Vluggen3-Apr-10 14:32
professionalEddy Vluggen3-Apr-10 14:32 
QuestionDownload Video from YouTube Pin
harsimranb2-Apr-10 14:32
harsimranb2-Apr-10 14:32 
AnswerRe: Download Video from YouTube Pin
AspDotNetDev2-Apr-10 14:57
protectorAspDotNetDev2-Apr-10 14:57 
GeneralRe: Download Video from YouTube Pin
harsimranb2-Apr-10 15:13
harsimranb2-Apr-10 15:13 
GeneralRe: Captuing JSON Pin
harsimranb2-Apr-10 18:00
harsimranb2-Apr-10 18:00 

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.