Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
How do we access attributes using XmlReader
How do we access attributes using XmlReader?
✍: Guest
Below snippets shows the way to access attributes. First in order to check whether there any attributes present in the current node you can use HasAttributes function and use the MoveToNextAttribute method to move forward in attribute. In case you want to move to the next element use MoveToElement().
if (reader.HasAttributes) { while(reader.MoveToNextAttribute()) { // your logic goes here string pdata = reader.Value } } reader.MoveToElement();
2007-10-31, 6521👍, 0💬
Popular Posts:
What is the difference between delegate and events? Actually events use delegates in bottom. But th...
How To Dump the Contents of a Directory into an Array? - PHP Script Tips - Working with Directoris a...
What are database triggers? How are the triggers fired? Read this collection of questions and answer...
How To Create Nested Tables? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells You can cr...
What are shared (VB.NET)/Static(C#) variables? Static/Shared classes are used when a class provides ...