#include "cconsolestream.h"
#include "ccontenthandler.h"
#include "cerrorhandler.h"
using namespace P6R;
using namespace P6EXAMPLES;
namespace {
{
}
}
}
}
return err;
}
{
if (
P6SUCCEEDED( err = cpInit->initialize( pConsole, pStr ))) {
}
}
return err;
}
{
if (
P6SUCCEEDED( err = cpInit->initialize( pConsole ))) {
}
}
return err;
}
{
"<?xml version='1.0' encoding='UTF-8' ?>\n" \
"<first xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>\n" \
"<mixed>\n" \
" <!-- should be ignored an never passed to the content handler -->\n" \
" Now is the time for all good men to spend <money><![CDATA[55 <dollars>]]></money>\n" \
" on \n" \
" <item>33</item> now that we are open.\n" \
" <short id='5' />\n" \
" <xsl:comment> using a namespace here </xsl:comment>\n" \
"</mixed></first>\n";
}
}
err = cpStr->
strlen( pXML, 100000, &bufSize );
cpStream = NULL;
pConsole->
writeStdout(
"ERROR: Example failed with [ %1$ ]\n", &args[0], 1, NULL );
}
return err;
}
}
int main(int argc,char *argv[])
{
err = runSAX2( cpConsole, cpDebugStream );
cpConsole->
writeStdout(
"runSAX2 result: [ %1$ ]\n",&args[0],1,NULL);
cpConsole = NULL;
}
else printf("ERROR: Failed to retrieve console interface [ %x ]\n", err );
}
else printf("ERROR: Failed to initialize the loader [ %x ]\n", err );
}
else printf( "ERROR: Failed to create CConsoleStream [ %x ]\n", err );
return err;
}