Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (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, 8268👍, 0💬
Popular Posts:
If we have the following in a Java code: String s="abc"; String s2="abc"; Then what will be output o...
Why is there extra white space before or after tables? This is often caused by invalid HTML syntax. ...
What is PMP(project management plan)? The project management plan is a document that describes the p...
How To Enter Boolean Values in SQL Statements? - MySQL FAQs - Introduction to SQL Basics If you want...
What will be printed as the result of the operation below: main() { int x=5; printf("%d,%d,%d\n",x,x. ..