Sams Teach Yourself ASP.NET in 21 Days, Second Edition By Chris Payne
Table of Contents
Appendix A. Answers to Quiz Questions
Quiz
1:
When should you use an XmlTextReader versus an XmlDocument?
A1:
An XmlTextReader should be used when you only need to view data and don't need any higher-level functionality. The XmlDocument provides more functionality using the XML Document Object Model, but it introduces additional overhead.
2:
What does XML DOM stand for?
A1:
Extensible Markup Language Document Object Model.
3:
What's the difference between a node and an element?
A1:
An element is represented by a single tag in an XML file. A node is an entire branch of data, consisting of start and end tags, children elements, and any attributes.
4:
Will the following code snippet work?
dim xmldoc as new XMLDataDocument() xmldoc.DataSet.ReadXml("books.xml")
A1:
No, the ReadXml requires the full path to the XML data file. The last line should read as follows: