Click here to Skip to main content
15,888,610 members
Home / Discussions / C#
   

C#

 
GeneralRe: Convert byte array to bits Pin
Asad Hussain17-May-05 8:46
Asad Hussain17-May-05 8:46 
GeneralRe: Convert byte array to bits Pin
Marc Clifton18-May-05 2:09
mvaMarc Clifton18-May-05 2:09 
GeneralRe: Convert byte array to bits Pin
Robert Rohde17-May-05 11:26
Robert Rohde17-May-05 11:26 
Generalfeedback Pin
niansah17-May-05 4:54
niansah17-May-05 4:54 
GeneralRe: feedback Pin
Robert Rohde17-May-05 4:59
Robert Rohde17-May-05 4:59 
GeneralRe: feedback Pin
niansah17-May-05 5:03
niansah17-May-05 5:03 
GeneralRe: feedback Pin
Colin Angus Mackay17-May-05 5:48
Colin Angus Mackay17-May-05 5:48 
GeneralReading all particular nodes with loop Pin
ksanju100017-May-05 3:23
ksanju100017-May-05 3:23 
Hi,
I am trying to get all the farm name attrbute from Xml files thorugh loop
I have to verify conditoion that when farm name is equal to dev1
It should exit from the loop
my code retrieves only one value from farm name dev2 my code does not search for farm name dev2
any body can help me giving me code

XmlDocument doc = new XmlDocument();
doc.Load("c:/farm-config.xml");
XmlNode farm=doc.SelectSingleNode("/root/farm-config/farm/@name");
MessageBox.Show(farm.InnerText);

xml file strucutyue is as given below

Hi,
I am trying to get all the farm name from Xml files.
This is my xml file structure

<?xml version="1.0" encoding="UTF-8"?>
<root>

<farm-config>
<farm name="dev2">
<connection address="localhost1" user="root1" selectedConnection="1" password="daask6">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
</farm>

<farm name="dev1">
<connection address="localhost1" user="root1" selectedConnection="1" password="daask2">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
</farm>
</farm-config>
</root>
regards
sanjeev





GeneralRe: Reading all particular nodes with loop Pin
Marc Clifton17-May-05 3:34
mvaMarc Clifton17-May-05 3:34 
GeneralRe: Reading all particular nodes with loop Pin
mav.northwind17-May-05 3:52
mav.northwind17-May-05 3:52 
GeneralRe: Reading all particular nodes with loop Pin
niansah17-May-05 4:23
niansah17-May-05 4:23 
GeneralC#, LDAP, and Active Directory Pin
slvrscremr17-May-05 3:13
slvrscremr17-May-05 3:13 
GeneralRe: C#, LDAP, and Active Directory Pin
Scott Serl17-May-05 21:23
Scott Serl17-May-05 21:23 
GeneralNeed to Read XML File Pin
Jethro6317-May-05 2:37
Jethro6317-May-05 2:37 
GeneralRe: Need to Read XML File Pin
Robert Rohde17-May-05 3:17
Robert Rohde17-May-05 3:17 
GeneralRe: Need to Read XML File Pin
Jethro6317-May-05 3:21
Jethro6317-May-05 3:21 
GeneralRe: Need to Read XML File Pin
Marc Clifton17-May-05 3:22
mvaMarc Clifton17-May-05 3:22 
GeneralRe: Need to Read XML File Pin
niansah17-May-05 3:45
niansah17-May-05 3:45 
GeneralCsharp plugin for eclipse Pin
17-May-05 1:33
suss17-May-05 1:33 
GeneralRe: Csharp plugin for eclipse Pin
Marc Clifton17-May-05 3:31
mvaMarc Clifton17-May-05 3:31 
GeneralRe: Csharp plugin for eclipse Pin
Anonymous18-May-05 2:28
Anonymous18-May-05 2:28 
GeneralRe: Csharp plugin for eclipse Pin
Marc Clifton18-May-05 2:40
mvaMarc Clifton18-May-05 2:40 
QuestionHow can I start/stop another Network computer SQL Server? Pin
pubududilena17-May-05 1:27
pubududilena17-May-05 1:27 
GeneralComboboxes in DataGrid question Pin
royg7717-May-05 0:48
royg7717-May-05 0:48 
GeneralRe: Comboboxes in DataGrid question Pin
MoustafaS17-May-05 1:20
MoustafaS17-May-05 1:20 

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.