Home > DeveloperSection > Interviews > How do we access attributes using “XmlReader”?

Posted on    April-02-2013 3:10 AM

 1 Answer(s)
  1548  View(s)
Rate this:

Vijay Shukla

Total Post:81

Posted on    April-02-2013 12:00 AM

The XmlReader class provides various methods and properties for reading attributes. Attributes are most commonly found on elements. However, they are also allowed on XML declaration and document type nodes.

When positioned on an element node, the MoveToAttribute methods enable you to go through the attribute list of the element. After MoveToAttribute has been called, the node properties—such as Name, NamespaceURI, Prefix, and so on—reflect the properties of that attribute, and not the containing element it belongs to.

Don't want to miss updates? Please click the below button!

Follow MindStick