SOL9 Sample: HTMLTreeWalker
|
1 Screenshot
2 Source code
/*
* HTMLTreeWalker.cpp
* Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
// SOL9
// 2012/02/20
#include <sol/COMInitializer.h>
#include <sol/Locale.h>
#include <sol/html/HTMLTreeWalker.h>
void _tmain(int argc, _TCHAR* argv[])
{
if (argc != 2) {
_tprintf(_T("Usage:%s localHTMLFile\n"), argv[0]);
return;
}
_bstr_t url = argv[1];
COMInitializer initializer;
Locale locale;
try {
SOL::HTMLTreeWalker walker;
//Load a content of the local file of url into the document
walker.loadFromFile(url);
//Walk the DOM tree structure of the HTMLdocument
walker.walk();
} catch (Exception& ex) {
ex.printf();
} catch (HRESULT hr) {
printf("Exception hr=%x\n", hr);
}
}
Last modified: 2 May 2016
Copyright (c) 2016 Antillia.com ALL RIGHTS RESERVED.