Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Struts (1)
Windows (1)
XHTML (173)
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, 8402👍, 0💬
Popular Posts:
How was XML handled during COM times? During COM it was done by using MSXML 4.0. So old languages li...
How To Change System Global Area (SGA)? - Oracle DBA FAQ - Introduction to Oracle Database 10g Expre...
How can you implement MVC pattern in ASP.NET? The main purpose using MVC pattern is to decouple the ...
Where are all .NET Collection classes located ? System.Collection namespace has all the collection c...
How was XML handled during COM times? During COM it was done by using MSXML 4.0. So old languages li...