
Explanation/Reference:
Explanation:
* Target 1: The element name is rate not Ratesheet.
The Xmlreader readToFollowing reads until the named element is found.
* Target 2:
The following example gets the value of the first attribute.
reader.ReadToFollowing("book");
reader.MoveToFirstAttribute();
string genre = reader.Value;
Console.WriteLine("The genre value: " + genre);
* Target 3, Target 4:
The following example displays all attributes on the current node.
C#VB
if (reader.HasAttributes) {
Console.WriteLine("Attributes of <" + reader.Name + ">");
while (reader.MoveToNextAttribute()) {
Console.WriteLine(" {0}={1}", reader.Name, reader.Value);
}
/ / Move the reader back to the element node.
reader.MoveToElement();
}
The XmlReader.MoveToElement method moves to the element that contains the current attribute node.
Reference: XmlReader Methods
https://msdn.microsoft.com/en-us/library/System.Xml.XmlReader_methods(v=vs.110).aspx