Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - DOM Developer's Guide

Resource: stocks.xml

XML Data File (stocks.xml)

<?xml version="1.0"?>
<?xml:stylesheet type="text/xsl" href="stock.xsl"?>
<portfolio xmlns:dt="urn:schemas-microsoft-com:datatypes">
  <stock exchange="nasdaq">
    <name>new</name>
    <symbol>zzzz</symbol>
    <price dt:dt="number">20.313</price>
  </stock>
  <stock exchange="nyse">
    <name>zacx corp</name>
    <symbol>ZCXM</symbol>
    <price dt:dt="number">28.875</price>
  </stock>
  <stock exchange="nasdaq">
    <name>zaffymat inc</name>
    <symbol>ZFFX</symbol>
    <price dt:dt="number">92.250</price>
  </stock>
  <stock exchange="nasdaq">
    <name>zysmergy inc</name>
    <symbol>ZYSZ</symbol>
    <price dt:dt="number">20.313</price>
  </stock>

</portfolio>

To add stocks.xml to the project

  1. Create a new C++ source file. For detailed instructions on how to do this, see Set Up My Visual C++ Project. Name the new file stocks.xml
  2. Copy the resource listing above and paste it into the source file you just created.
    Note   You can also copy the file into the project's main directory using Windows Explorer (or a command prompt).

Next, build and run the loadDOM project. The result should be the output shown in the following topic.