此示例中使用的 books.xml 文件(如下所示)是整个 MSXML SDK 中使用的 books.xml 文件的修改版。 注意,urn:books 声明为此文档的默认命名空间。
如果要运行本主题中的示例,请将以下代码复制到文本编辑器中,例如记事本,然后将文件保存为 books.xml。
<?xml version="1.0"?>
<x:catalog xmlns:x="urn:books">
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications with
XML.</description>
</book>
</x:catalog>