Question: .. What does the following code do? private void btnXML_Click(object sender, EventArgs e) { XElement students = XElement. Load(@../../../pets.xml); String pets=; foreach (var node in

 .. What does the following code do? private void btnXML_Click(object sender,

.. What does the following code do? private void btnXML_Click(object sender, EventArgs e) { XElement students = XElement. Load(@"../../../pets.xml"); String pets=""; foreach (var node in students.Elements("pet"). Elements ("petType")) { I/MessageBox.Show(node.ToString()); pets += " " + node.ToString(); } MessageBox.Show(pets); } Select one: a reads the content of an XM1. file named pets.xml and shows all of the content of the petType tag b. reads the content of an XML file named pets.xml and shows it in a messageBox O creads the content of an XML file named pets.xml, and shows the number of petlype tag used Od reads the content of an XML file named pets.xml, and shows the first content of the pet Type tag Clear my choice

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!