Resource: stocks.xml (loadDOM Example)


The loadDOM C/C++ example uses the stocks.xml file as a resource.

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.


    You can also copy the file into the project's main directory using Windows Explorer (or a command prompt).

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

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