SOL9 Sample: XMLTreeWalker
|
1 Screenshot
2 Source code
/*
* XMLTreeWalker.cpp
* Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
// SOL9
// 2009/04/23
#include <sol/COMInitializer.h>
#include <sol/xml/XMLTreeWalker.h>
void _tmain(int argc, TCHAR** argv)
{
if (argc !=2) {
_tprintf(_T("Usage:\n%s sample.xml\n"), argv[0]);
return;
}
if (GetFileAttributes(argv[1]) == 0xffffffff) {
_tprintf(_T("File not found %s\n"), argv[1]);
return;
}
try {
COMInitializer comInitializer;
{
XMLTreeWalker walker;
walker.open(argv[1]);
walker.walk();
}
} catch (HRESULT hr) {
_tprintf(_T("Exception 0x%x\n"), hr);
} catch (Exception& ex) {
ex.printf();
} catch (...) {
_tprintf(_T("Exception %x\n"), GetLastError());
}
}
Last modified: 2 May 2016
Copyright (c) 2016 Antillia.com ALL RIGHTS RESERVED.