Click here to Skip to main content
15,891,669 members
Home / Discussions / C#
   

C#

 
AnswerRe: Help autonumber... Pin
Anthony Mushrow21-Sep-07 1:43
professionalAnthony Mushrow21-Sep-07 1:43 
GeneralRe: Help autonumber... Pin
Colin Angus Mackay21-Sep-07 1:47
Colin Angus Mackay21-Sep-07 1:47 
Questiondirectshow filters [modified] Pin
Kuldeep Antil20-Sep-07 23:06
Kuldeep Antil20-Sep-07 23:06 
AnswerRe: directshow filters Pin
Sam Xavier21-Sep-07 1:27
Sam Xavier21-Sep-07 1:27 
QuestionEnumerate NT Group membership on remote computer Pin
Harkamal Singh20-Sep-07 22:47
Harkamal Singh20-Sep-07 22:47 
AnswerRe: Enumerate NT Group membership on remote computer Pin
elibriscoe21-Sep-07 12:43
elibriscoe21-Sep-07 12:43 
GeneralRe: Enumerate NT Group membership on remote computer Pin
Harkamal Singh21-Sep-07 20:10
Harkamal Singh21-Sep-07 20:10 
QuestionThick Client Appplication Pin
SakthiSurya20-Sep-07 22:19
SakthiSurya20-Sep-07 22:19 
AnswerRe: Thick Client Appplication Pin
Pete O'Hanlon20-Sep-07 22:25
mvePete O'Hanlon20-Sep-07 22:25 
AnswerRe: Thick Client Appplication Pin
Sathesh Sakthivel20-Sep-07 22:26
Sathesh Sakthivel20-Sep-07 22:26 
GeneralRe: Thick Client Appplication Pin
SakthiSurya20-Sep-07 23:55
SakthiSurya20-Sep-07 23:55 
GeneralRe: Thick Client Appplication Pin
Pete O'Hanlon21-Sep-07 0:00
mvePete O'Hanlon21-Sep-07 0:00 
Questiondelegates Pin
www.suniltvl.in20-Sep-07 22:06
www.suniltvl.in20-Sep-07 22:06 
AnswerRe: delegates Pin
www.suniltvl.in20-Sep-07 22:07
www.suniltvl.in20-Sep-07 22:07 
AnswerRe: delegates Pin
ray_f20-Sep-07 23:24
ray_f20-Sep-07 23:24 
AnswerRe: delegates Pin
Pete O'Hanlon21-Sep-07 0:02
mvePete O'Hanlon21-Sep-07 0:02 
QuestionEnterPrise Library 3.0 April 2007 Pin
Praveen02920-Sep-07 21:55
Praveen02920-Sep-07 21:55 
Questiondata binding for listbox to display table Pin
cyn820-Sep-07 21:44
cyn820-Sep-07 21:44 
QuestionReading xml Pin
praveenkumar palla20-Sep-07 20:53
praveenkumar palla20-Sep-07 20:53 
AnswerRe: Reading xml Pin
Scott Dorman20-Sep-07 20:55
professionalScott Dorman20-Sep-07 20:55 
GeneralRe: Reading xml Pin
praveenkumar palla21-Sep-07 3:50
praveenkumar palla21-Sep-07 3:50 
my xml is like this


<laser lasername="newlaser" modelname="Nufern v1.0" serialno="1" manufacturername="Nufern v1.0.0.0" maximumpower="200" ip="192.168.1.173">
<tabular>
<property id="1" name="System Id" prgbar="false" selected="false" min="0" max="30" pwd="true" units="Sec" gauge="false">
<property id="10" name="Startup delay" prgbar="false" selected="false" min="0" max="30" units="Sec" gauge="false">




In the above xml there two child nodes for node "tabular" . In that one node has "pwd" attribute and another one don't have, it is optional one.

So I want to know that for the specific node the attribute is there or not at runtime----I tried like this

XmlDocument xmldoc2 = new XmlDocument();
xmldoc2.LoadXml(objXmlTasks.decrypt());
XmlNodeList xmlchildnodelst = xmldoc2.SelectNodes("/lasers/laser [@LaserName='" + laseridval + "']/properties/tabular/property[@name='" + childLaserSelectedName + "']");

Password= xmlchildnodelst[0].Attributes.GetNamedItem("pwd").Value;

But there is now pwd attribute for second one so exception

"object reference null"


PraveenKumar Palla
GeneralRe: Reading xml Pin
praveenkumar palla21-Sep-07 3:52
praveenkumar palla21-Sep-07 3:52 
GeneralRe: Reading xml Pin
Scott Dorman21-Sep-07 4:25
professionalScott Dorman21-Sep-07 4:25 
QuestionReplace Word in file with other. File Handling. Pin
Bhavesh Bagadiya20-Sep-07 20:47
Bhavesh Bagadiya20-Sep-07 20:47 
AnswerRe: Replace Word in file with other. File Handling. Pin
JoeSharp20-Sep-07 21:11
JoeSharp20-Sep-07 21:11 

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.