次の方法で共有


Resource: books.xml (SaxJumpStart Example)

 

The SaxJumpStart uses books.xml as a resource file. In Visual Studio, create the XML file, as listed below. Save the file in the debug directory that contains the newly built executable.

For example, if you created the project at Z:\Samples\SaxJumpStart, then the debug directory will be Z:\Samples\SaxJumpStart\debug.

XML Data File (books.xml)

<?xml version="1.0"?>
<x:books xmlns:x="urn:books">
   <book id="bk001">
      <author>Writer</author>
      <title>The First Book</title>
      <genre>Fiction</genre>
      <price>44.95</price>
      <pub_date>2000-10-01</pub_date>
      <review>An amazing story of nothing.</review>
   </book>

   <book id="bk002">
      <author>Poet</author>
      <title>The Poet's First Poem</title>
      <genre>Poem</genre>
      <price>24.95</price>
      <review>Least poetic poems.</review>
   </book>
</x:books>