Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this topic, you will build and run SAXErrorHandling C/C++ example.
Build the example
From the Build menu, select Build Solution. This will build the application. When you build the application, Visual Studio will create the debug directory that contains the newly built executable. You need to build the example before creating the XML file because you need to create the XML file in the debug directory, see Resource: books.xml for SAXErrorHandling example.
Run the example
Start a command prompt and change directories to the debug directory that contains the SAXErrorHandling executable and the books.xml file.
Run the example by entering the following at the command prompt:
SAXErrorHandling.exe books.xml
Output
You should get the following output in a console window.
Parsing document: books.xml
<?xml version="1.0" ?><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
Error Message:
The name in the end tag of the element must match the element type in the start tag.
Error C00CEE3B