{ |
if(reader.Name == “employee”) { |
employeeID = reader.GetAttribute(“id”); |
} if(reader.Name==”name”) { |
lblResult.Text += “<li>” + “Employee - “ + employeeID; lblResult.Text += “<ul>”; lblResult.Text += “<li>ID - “ + employeeID + “</li>”; |
} if (reader.Name == “firstName”) { |
lblResult.Text += “<li>First Name - “ + reader.ReadString() |
+ “</li>”; |
} if (reader.Name == “lastName”) { |
lblResult.Text += “<li>Last Name - “ + reader.ReadString() |
+ “</li>”; |
} if(reader.Name==”city”) { |
lblResult.Text += “<li>City - “ + reader.ReadString() + “</li>”; |
} if(reader.Name==”state”) { |
lblResult.Text += “<li>State - “ + reader.ReadString() + “</li>”; |
} if(reader.Name==”zipCode”) { |
lblResult.Text += “<li>Zipcode - “ + |
reader.ReadElementContentAsInt().ToString() + “</li>”; |
} |
} else if(reader.NodeType == XmlNodeType.EndElement) { |
if(reader.Name == “employee” ) { |
//Close the open tags lblResult.Text += “</ul>”; lblResult.Text += “</li>”; |
} |
} |
} lblResult.Text += “</ul>”; |
} |
} catch(Exception ex) { |
lblResult.Text = “An Exception occurred: “ + ex.Message; |
} |
} |
</script> <html xmlns=”http://www.w3.org/1999/xhtml” > <head runat=”server”> |
learn guitarphysics learnteliphonyxmlphysicsenjoylife