Click here to Skip to main content
15,885,546 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Replace Word in file with other. File Handling. Pin
Bhavesh Bagadiya20-Sep-07 21:17
Bhavesh Bagadiya20-Sep-07 21:17 
GeneralRe: Replace Word in file with other. File Handling. Pin
Giorgi Dalakishvili20-Sep-07 21:19
mentorGiorgi Dalakishvili20-Sep-07 21:19 
QuestionC#,How to retrieve the image in sql to image control Pin
Ursrathi20-Sep-07 20:41
Ursrathi20-Sep-07 20:41 
AnswerRe: C#,How to retrieve the image in sql to image control Pin
Giorgi Dalakishvili20-Sep-07 20:51
mentorGiorgi Dalakishvili20-Sep-07 20:51 
QuestionPlease help me how to create a simple RadioButton Column in DataGridView. Pin
pcphuc20-Sep-07 20:28
pcphuc20-Sep-07 20:28 
AnswerRe: Please help me how to create a simple RadioButton Column in DataGridView. Pin
Sathesh Sakthivel20-Sep-07 21:14
Sathesh Sakthivel20-Sep-07 21:14 
GeneralRe: Please help me how to create a simple RadioButton Column in DataGridView. Pin
pcphuc20-Sep-07 21:19
pcphuc20-Sep-07 21:19 
GeneralRe: Please help me how to create a simple RadioButton Column in DataGridView. Pin
Dave Kreskowiak21-Sep-07 5:46
mveDave Kreskowiak21-Sep-07 5:46 
GeneralRe: Please help me how to create a simple RadioButton Column in DataGridView. Pin
rashidpervaiz0821-Sep-07 19:59
rashidpervaiz0821-Sep-07 19:59 
GeneralRe: Please help me how to create a simple RadioButton Column in DataGridView. Pin
pcphuc21-Sep-07 22:17
pcphuc21-Sep-07 22:17 
QuestionCalling Base Class From GrandChild class Pin
N a v a n e e t h20-Sep-07 19:36
N a v a n e e t h20-Sep-07 19:36 
AnswerRe: Calling Base Class From GrandChild class Pin
Christian Graus20-Sep-07 20:40
protectorChristian Graus20-Sep-07 20:40 
GeneralRe: Calling Base Class From GrandChild class Pin
N a v a n e e t h20-Sep-07 21:20
N a v a n e e t h20-Sep-07 21: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.