BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


.NET and XML
How to skip child nodes with XmlNodeReader and Skip?
How to convert the return value from XML with XmlConvert and ToInt32?
What is the 'pull model'?
What is EXSLT.NET?
What is ADO.NET?
How to create a ""hello world"" XML WebService in Visual Studio .NET?
Accessing and Manipulating XML Data in Microsoft .NET Framework
Developing Multi-Threaded .NET Applications


 
 

<< XSLT 


By Sonu Kapoor
First Posted 02/20/2005
Times viewed 244

How to Get the Attribute Value with XmlNodeReader and GetAttribute?


Summary How to Get the Attribute Value with XmlNodeReader and GetAttribute?

Sometimes it is necessary to get the attribute value of a specific node. This can be achieved with the GetAttribute function. You can simply pass the name of the ID and it will return the value. However if the attribute is not found, then it will return a null reference. In the example I am using the following XML file:  

Output:

ID Value: 0

Additional information

Further additional information


Rate this article on a scale of 1 to 10 (1 votes, average 5)

Your vote :  

<< XSLT 





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML