mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-15 10:42:58 +08:00
2715 lines
251 KiB
HTML
2715 lines
251 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<!-- saved from url=(0082)http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1308222xx -->
|
||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
<title>HTML Reader C++ Class Library - CodeProject</title>
|
||
<link type="text/css" rel="stylesheet" href="./HTML Reader C++ Class Library - CodeProject_files/CodeProject.min.css">
|
||
|
||
|
||
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
<meta name="Description" content="A lightweight, fast, simple, and low-overhead C++ class library based on push model parsing.; Author: <font color="maroon">gUrM33T</font>; Section: Libraries; Chapter: Platforms, Frameworks & Libraries">
|
||
<meta name="Keywords" content="VC6, Windows, Visual-Studio, MFC, Dev, Intermediate,Libraries,Platforms, Frameworks & Libraries,Free source code, tutorials">
|
||
<meta name="Author" content="<font color="maroon">gUrM33T</font>">
|
||
<meta name="Rating" content="General">
|
||
<meta name="Robots" content="index, follow">
|
||
<meta name="Revisit-After" content="1 days">
|
||
<meta name="application-name" content="The Code Project">
|
||
<meta name="google-site-verification" content="RP2bNCUeOmNkkJesEnU8X3UyTbqIcCKP0CmdwU8in5k">
|
||
<meta name="msapplication-navbutton-color" content="#FF9900">
|
||
<meta name="msapplication-tooltip" content="Your Development Resource.">
|
||
<meta name="msapplication-starturl" content="http://www.codeproject.com/?pinned=true">
|
||
<meta name="msapplication-task" content="name=Homepage;action-uri=http://www.codeproject.com/;icon-uri=http://www.codeproject.com/favico.ico">
|
||
<meta name="msapplication-task" content="name=Latest Articles;action-uri=http://www.codeproject.com/script/articles/Latest.aspx;icon-uri=http://www.codeproject.com/favico.ico">
|
||
<meta name="msapplication-task" content="name=Questions and Answers;action-uri=http://www.codeproject.com/script/Answers/;icon-uri=http://www.codeproject.com/favico.ico">
|
||
<meta name="msapplication-task" content="name=The Lounge;action-uri=http://www.codeproject.com/Lounge.aspx;icon-uri=http://www.codeproject.com/favico.ico">
|
||
<link rel="dns-prefetch" href="http://ajax.googleapis.com/">
|
||
|
||
<link rel="canonical" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222">
|
||
|
||
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - All topics" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=1">
|
||
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - MFC / C++" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=2">
|
||
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - C#" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=3">
|
||
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - ASP.NET" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=4">
|
||
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - .NET" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=5">
|
||
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - VB.NET" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=6">
|
||
<link rel="alternate" type="application/rss+xml" title="CodeProject Lounge Postings" href="http://www.codeproject.com/webservices/LoungeRSS.aspx">
|
||
<link rel="search" type="application/opensearchdescription+xml" title="CodeProject" href="http://www.codeproject.com/info/OpenSearch.xml">
|
||
|
||
<!--<base target="_top">--><base href="." target="_top">
|
||
<link rel="icon" href="http://www.codeproject.com/favicon.ico" type="image/ico">
|
||
<link rel="shortcut icon" href="http://www.codeproject.com/favicon.ico" type="image/ico">
|
||
<link rel="apple-touch-icon" href="http://www.codeproject.com/images/FavIcon-Apple.png" type="image/png">
|
||
<script type="text/javascript" language="Javascript">//<![CDATA[
|
||
if(top!=self)top.location.href=location.href; if(typeof(DemoUrl)!="undefined")document.write(unescape('%3Cme')+'ta http'+'-equiv="re' +'fresh" con'+'tent="1;url='+DemoUrl+unescape('"%3CE'));
|
||
function SelfCheck(){ return window.confirm("You are about to reply to your own message. Is this really what you want?");}
|
||
function MarkAns(MemberID,MsgID,gp,bp,mt,QID){
|
||
document.write(unescape("%3Ca href=\"#xx" + MsgID.toString() + "xx\" onclick=\"RateMsg("+MemberID.toString()+","+MsgID.toString()+",6,"+QID.toString()+");\"%3E"));
|
||
document.write(unescape("%3Cimg height=\"20\" width=\"20\" src=\"/script/Forums/Images/good.png\" alt=\"good\" border=\"0\" align=\"absmiddle\" /%3E "+gp+" "+mt+"%3C/a%3E "));
|
||
document.write(" "); document.write(unescape("%3Ca href=\"#xx" + MsgID.toString() + "xx\" onclick=\"RateMsg("+MemberID.toString()+","+MsgID.toString()+",7,"+QID.toString()+");\"%3E"));
|
||
document.write(unescape("%3Cimg height=\"20\" width=\"20\" src=\"/script/Forums/Images/bad.png\" alt=\"bad\" border=\"0\" align=\"absmiddle\" /%3E "+bp+" "+mt+"%3C/a%3E"));
|
||
}
|
||
|
||
function MsgVFrm(MemberID,MsgID,GB,gp,bp,mt){
|
||
if(!GB)document.write("Rate this message: ");
|
||
document.write(unescape("%3Ca href=\"#xx" + MsgID.toString() + "xx\" onclick=\"RateMsg(" + MemberID.toString() + ", " + MsgID.toString() + ","));document.write((GB?"5":"1")+unescape(",0);\"%3E"));
|
||
if(GB) document.write(unescape("%3Cimg height=\"20\" width=\"20\" src=\"/script/Forums/Images/good.png\" alt=\"good\" border=\"0\" align=\"absmiddle\" /%3E "+gp+" "+mt+"%3C/a%3E "));
|
||
else document.write(unescape("%3Cimg height=\"14px\" width=\"14px\" src=\"http://s.codeproject.com/script/Forums/Images/thumbs_down.gif\" alt=\"vote 1\" border=\"0\" align=\"middle\" /%3E%3C/a%3E "));
|
||
if(GB)document.write(" "); else for(var i=1; i<=5;i++)
|
||
document.write(unescape("%3Ca class=\"toolbar\" href=\"#xx" + MsgID.toString() + "xx\" title=\"vote this message a " + i.toString() + "\" onclick=\"RateMsg(" + MemberID.toString() + ", " + MsgID.toString() + ", " + i.toString() + ",0)\"%3E%3Cb%3E" + i.toString() + "%3C/b%3E%3C/a%3E "));
|
||
document.write(unescape("%3Ca href=\"#xx" + MsgID.toString() + "xx\" onclick=\"RateMsg(" + MemberID.toString() + ", " + MsgID.toString() + ","));document.write((GB?"1":"5")+unescape(",0);\"%3E"));
|
||
if(GB)document.write(unescape("%3Cimg height=\"20\" width=\"20\" src=\"/script/Forums/Images/bad.png\" alt=\"bad\" border=\"0\" align=\"absmiddle\" /%3E "+bp+" "+mt+"%3C/a%3E"));
|
||
else document.write(unescape("%3Cimg height=\"14px\" width=\"14px\" src=\"http://s.codeproject.com/script/Forums/Images/thumbs_up.gif\" border=\"0\" alt=\"vote 5\" align=\"middle\" /%3E%3C/a%3E "));
|
||
}
|
||
|
||
function ReportMsg(userid, msgid, score) {
|
||
if (confirm("Are you sure you want this message removed?"))
|
||
return RateMsg(userid, msgid, score, 0);
|
||
else return false;
|
||
}
|
||
function RateMsg(memberid, msgid, score, questionId) {
|
||
var req = new XMLHttpRequest();
|
||
req.onreadystatechange = function() {
|
||
if (req.readyState == 4){
|
||
if (req.status == 200){
|
||
var respText = req.responseText;
|
||
var re = new RegExp(unescape("\%3Cdiv\%3E(.*)\%3C/div\%3E"), "g");
|
||
var match = re.exec(respText);
|
||
voteStatus.innerHTML = unescape("%3Cb%3E") + (match&&match.length>1&&match[1])?match[1]:"An error occured" + unescape("%3C/b%3E");
|
||
} else
|
||
voteStatus.innerHTML = unescape("%3Cb style='color:red'%3EFailed!") + req.statusText + unescape("%3C/b%3E");
|
||
}
|
||
}
|
||
var voteStatus = document.getElementById("MVF" + msgid);
|
||
if (!voteStatus) return;
|
||
voteStatus.innerHTML = unescape("%3Cb style='color:green'%3EVoting...%3C/b%3E");
|
||
var strAction = "/script/Forums/Vote.aspx?js=1&fmid="+memberid.toString()+"&select="+msgid.toString()+"&score="+score.toString()+"&qid="+questionId.toString();
|
||
req.open("GET", strAction, true);
|
||
req.send(null);
|
||
return false;
|
||
}
|
||
var smoothScroll = true;
|
||
var Selected = "1308222";
|
||
function Pin(elm){
|
||
CloseMsg(Selected);
|
||
Selected=''
|
||
var wrk=elm.parentNode; if(wrk)wrk=wrk.children[0];
|
||
var fc=elm?elm.firstChild:null;
|
||
if (wrk&&!wrk.pinned) {
|
||
OpenMsg(wrk.name, true);wrk.pinned=true;fc.src='http://s.codeproject.com/script/forums/images/pinned.gif';fc.title='Pinned. Click to unpin'
|
||
} else {
|
||
wrk.pinned=false;CloseMsg(wrk.name); fc.src='http://s.codeproject.com/script/forums/images/pin.gif';fc.title='Click to pin message'
|
||
}
|
||
return false;
|
||
}
|
||
function CloseMsg(msgId) {
|
||
if(!msgId||msgId==''||msgId<0)return;
|
||
var lnk=document.getElementsByName(msgId);
|
||
if(lnk&&lnk.length>0&&lnk[0].pinned)return;
|
||
var hed=document.getElementById('F' + msgId.toString() + '_h0');
|
||
if(hed) hed.className = hed.className.replace("Sel", "UnSel");
|
||
var bdy=document.getElementById('F' + msgId.toString() + '_h1');
|
||
if(bdy) bdy.style.display = 'none';
|
||
}
|
||
function OpenMsg(msgId, keep) {
|
||
if(!msgId||msgId==''||msgId<0)return;
|
||
var bdy=document.getElementById('F' + msgId.toString() + '_h1');
|
||
if(bdy){
|
||
var lnk=document.getElementsByName(msgId);
|
||
if(lnk&&lnk.length>0&&lnk[0].pinned)keep=true;
|
||
if(keep&&bdy.style.display!='none')return;
|
||
if(bdy.style.display=='none') bdy.style.display='';
|
||
else bdy.style.display = 'none';
|
||
}
|
||
var hed=document.getElementById('F' + msgId.toString() + '_h0');
|
||
if (hed) hed.className = hed.className.replace('UnSel', 'Sel');
|
||
if(bdy&&hed&&bdy.style.display!='none'){
|
||
var webkitWeird=document.documentElement.scrollTop < document.body.scrollTop;
|
||
if (!webkitWeird)document.body.scrollTop = getRealPos(hed, 'Top') - document.body.clientHeight/10;
|
||
EnsureMessageVisible(msgId, true);
|
||
}
|
||
}
|
||
function EnsureMessageVisible(msgID, bShowTop) {
|
||
var webkitWeird = document.documentElement.scrollTop < document.body.scrollTop;
|
||
var msgHeader = document.getElementById('F' + msgID + '_h0');
|
||
var msgBody = document.getElementById('F' + msgID + '_h1');
|
||
if (!msgBody || !msgHeader) return;
|
||
var scrollContainer = document.documentElement;
|
||
var top = getRealPos(msgHeader, 'Top');
|
||
var bottom = getRealPos(msgBody, 'Top') + msgBody.offsetHeight;
|
||
var scrollTop = webkitWeird? scrollTop = document.body.scrollTop:document.documentElement.scrollTop;
|
||
if (scrollTop > top && !bShowTop) scrollTop = top - scrollContainer.clientHeight / 10;
|
||
if (scrollTop + scrollContainer.clientHeight < bottom) scrollTop = bottom - scrollContainer.clientHeight;
|
||
if (scrollTop > top && bShowTop) scrollTop = top - scrollContainer.clientHeight / 10;
|
||
if (smoothScroll){
|
||
if (webkitWeird) $(document.body).stop().animate({'scrollTop' : scrollTop}, 'fast');
|
||
else $(scrollContainer).stop().animate({'scrollTop' : scrollTop}, 'fast');
|
||
} else {
|
||
if (webkitWeird) document.body.scrollTop = scrollTop;
|
||
else scrollContainer.scrollTop = scrollTop;
|
||
}
|
||
}
|
||
function getRealPos(i,which) {
|
||
iPos = 0;
|
||
while (i!=null) {
|
||
iPos += i['offset' + which];
|
||
i = i.offsetParent;
|
||
}
|
||
return iPos;
|
||
}
|
||
var switchCallback;
|
||
function SwitchMessage(e, msgId) {
|
||
if (msgId) msgId=msgId.toString();
|
||
else {
|
||
if(!e)e=window.event;
|
||
var target=e.target?e.target:e.srcElement;
|
||
while(target&&target.className!='message-link')target=target.parentNode;
|
||
if(!target||target.className!='message-link')return;
|
||
if(target.pinned){/*Selected='';*/return false;}
|
||
msgId=target.name;
|
||
}
|
||
CloseMsg(Selected)
|
||
if(Selected==msgId) Selected='';
|
||
else { OpenMsg(msgId, false); Selected=msgId;}
|
||
if (e){if(e.preventDefault)e.preventDefault;else e.returnValue=false;}
|
||
if(switchCallback)switchCallback(null, msgId)
|
||
return false;
|
||
}
|
||
|
||
|
||
//]]>
|
||
</script>
|
||
|
||
<script type="text/javascript" async="" src="./HTML Reader C++ Class Library - CodeProject_files/ga.js"></script></head>
|
||
|
||
<body class="CHROME13"><div class="seoquake-seobar-panel seoquake-seobar-horizontal-inpage" id="seoquake-seobar-panel"><div class="seoquake-seobar-cell"><button class="seoquake-button" title="SeoQuake"><img src="chrome-extension://akdgnmcogleenhbclghghlkkdndkjdjc/static/menulogo-enabled.png"></button></div><div class="seoquake-params-panel seoquake-seobar-cell"><table><tr class="seoquake-params-row"><td class="seoquake-params-cell" title="Google pagerank"><img src="./HTML Reader C++ Class Library - CodeProject_files/favicon.ico">PR: <a class="seoquake-params-link" href="http://toolbarqueries.google.com/search?client=navclient-auto&hl=en&ch=61500305601&ie=UTF-8&oe=UTF-8&features=Rank&q=info:http%3A%2F%2Fwww.codeproject.com%2FKB%2Flibrary%2FGomzyHTMLReader.aspx%3Fmsg%3D1308222%23xx1308222xx" rel="9054fa0d d5658dd1_0" target="_blank" style="color: blue; ">n/a</a></td><td class="seoquake-params-cell" title="Google index"><img src="./HTML Reader C++ Class Library - CodeProject_files/favicon.ico">I: <a class="seoquake-params-link" href="http://www.google.com/search?hl=en&safe=off&q=site%3Awww.codeproject.com&btnG=Search" rel="9054fa0d 74a5f979_1" target="_blank" style="color: blue; ">2,660,000</a></td><td class="seoquake-params-cell" title="Yahoo links"><img src="./HTML Reader C++ Class Library - CodeProject_files/favicon(1).ico">L: <a class="seoquake-params-link" href="http://siteexplorer.search.yahoo.com/advsearch?p=http%3A%2F%2Fwww.codeproject.com%2FKB%2Flibrary%2FGomzyHTMLReader.aspx%3Fmsg%3D1308222%23xx1308222xx&bwm=i&bwmo=d&bwmf=u" rel="9054fa0d 8a07ef59_11" target="_blank" style="color: blue; ">n/a</a></td><td class="seoquake-params-cell" title="Yahoo linkdomain"><img src="./HTML Reader C++ Class Library - CodeProject_files/favicon(1).ico">LD: <a class="seoquake-params-link" href="http://siteexplorer.search.yahoo.com/advsearch?p=http%3A%2F%2Fwww.codeproject.com&bwm=i&bwmo=d&bwmf=s" rel="9054fa0d 1e06b135_12" target="_blank" style="color: blue; ">627,228</a></td><td class="seoquake-params-cell" title="Bing index"><img src="./HTML Reader C++ Class Library - CodeProject_files/favicon(2).ico">I: <a class="seoquake-params-link" href="http://www.bing.com/search?q=site%3Awww.codeproject.com&FORM=QBRE" rel="9054fa0d ecb57463_20" target="_blank" style="color: red; ">error</a></td><td class="seoquake-params-cell" title="Alexa rank"><img src="./HTML Reader C++ Class Library - CodeProject_files/favicon(3).ico">Rank: <a class="seoquake-params-link" href="http://www.alexa.com/siteinfo/www.codeproject.com" rel="9054fa0d fbcf7bc1_31" target="_blank" style="color: blue; ">1380</a></td><td class="seoquake-params-cell" title="Webarchive age"><img src="./HTML Reader C++ Class Library - CodeProject_files/favicon(4).ico">Age: <a class="seoquake-params-link" href="http://web.archive.org/web/*/http://www.codeproject.com" rel="9054fa0d 2407767c_32" target="_blank" style="color: blue; ">Февраль 29, 2000</a></td><td class="seoquake-params-cell" title="Delicious index"><img src="./HTML Reader C++ Class Library - CodeProject_files/favicon(5).ico">I: <a class="seoquake-params-link" href="http://delicious.com/url/9054fa0dc888179a82edc6062f79db3e" rel="9054fa0d c4a04b6b_33" target="_blank" style="color: blue; ">n/a</a></td><td class="seoquake-params-cell" title="Whois"><img src="./HTML Reader C++ Class Library - CodeProject_files/favicon(6).ico"><a class="seoquake-params-link" href="http://www.whorush.com/search/?q=www.codeproject.com#whorushwhois" rel="9054fa0d 7602f7d5_37" target="_blank">whois</a></td><td class="seoquake-params-cell" title="Page source"><img src="./HTML Reader C++ Class Library - CodeProject_files/chrome-16.png"><a class="seoquake-params-link" href="view-source:http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1308222xx" rel="9054fa0d e8d85595_38" target="_blank">source</a></td><td class="seoquake-params-cell" title="SEMRush Rank"><img src="./HTML Reader C++ Class Library - CodeProject_files/favicon(7).ico">Rank: <a class="seoquake-params-link" href="http://www.semrush.com/info/www.codeproject.com?ref=174537735" rel="9054fa0d b19c5b07_41" target="_blank" style="color: blue; ">2725</a></td><td class="seoquake-params-cell" title="Keywords density"><img src="chrome-extension://akdgnmcogleenhbclghghlkkdndkjdjc/static/menulogo-enabled.png"><a class="seoquake-params-link" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" target="_blank">Density</a></td><td class="seoquake-params-cell" title="Internal/External links"><img src="chrome-extension://akdgnmcogleenhbclghghlkkdndkjdjc/static/menulogo-enabled.png">Links: <a class="seoquake-params-link" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" target="_blank">280(3)</a> | <a class="seoquake-params-link" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" target="_blank">6(1)</a></td></tr></table></div><div class="seoquake-seobar-cell"><button class="seoquake-button" title="Close"><img src="chrome-extension://akdgnmcogleenhbclghghlkkdndkjdjc/static/close.png"></button></div><div style="clear: both;"></div></div>
|
||
|
||
|
||
|
||
|
||
<a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#Main"><img alt="Click here to Skip to main content" class="access-link" src="./HTML Reader C++ Class Library - CodeProject_files/t.gif"></a>
|
||
|
||
|
||
<div class="page-background">
|
||
<div id="A" class="container-content">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="container nav-memberbar clearfix">
|
||
<div class="member-stats float-left">8,088,747 members and growing! (45,576 online)</div>
|
||
<div class="float-left"></div>
|
||
<div class="float-right">
|
||
<span id="ctl00_MemberMenu_CurRat" class="tooltip">
|
||
<a id="ctl00_MemberMenu_MyProfile" href="http://www.codeproject.com/Members/iekmuf">iekmuf</a><img src="./HTML Reader C++ Class Library - CodeProject_files/arrow-down-16.png" style="width:16px;height:16px;vertical-align:bottom">
|
||
<div class="tooltip-flyout" style="width:110px !important">
|
||
<div><a id="ctl00_MemberMenu_MySettingsNonSSL" href="http://www.codeproject.com/script/Membership/Modify.aspx">My Settings</a></div>
|
||
<div><a id="ctl00_MemberMenu_MySettings" href="https://www.codeproject.com/script/Membership/Modify.aspx"><img src="./HTML Reader C++ Class Library - CodeProject_files/secure.png" width="13px" height="14px" style="vertical-align:middle;border:0">My Settings (SSL)</a></div>
|
||
<div><a id="ctl00_MemberMenu_MyContacts" href="http://www.codeproject.com/script/Membership/ListContacts.aspx">My Contact info</a></div>
|
||
<div><a id="ctl00_MemberMenu_MyBookmarks" href="http://www.codeproject.com/script/Bookmarks/List.aspx?obtid=2">My Bookmarks</a></div>
|
||
|
||
<div><a id="ctl00_MemberMenu_MyCodeProject" href="http://www.codeproject.com/script/Membership/MyCodeProject.aspx">My Watched Items</a></div>
|
||
<div><a id="ctl00_MemberMenu_MyArticles" href="http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=4359138">My Articles</a></div>
|
||
<div><a id="ctl00_MemberMenu_MyMessages" href="http://www.codeproject.com/script/Forums/Messages.aspx?fmid=4359138">My Messages</a></div>
|
||
<div><a id="ctl00_MemberMenu_MyQuestions" href="http://www.codeproject.com/script/Answers/MemberPosts.aspx?tab=questions&mid=4359138&showall=True">My Questions</a></div>
|
||
<div><a id="ctl00_MemberMenu_MyAnswers" href="http://www.codeproject.com/script/Answers/MemberPosts.aspx?tab=answers&mid=4359138&showall=True">My Answers</a></div>
|
||
|
||
</div>
|
||
</span><span id="ctl00_MemberMenu_TotalPoints" title="Total reputation points 408" class="member-rep-box bronze" style="margin-left:0"><a href="http://www.codeproject.com/script/Reputation/List.aspx?mid=4359138">408</a></span>
|
||
|
||
<a id="ctl00_MemberMenu_Signout" href="http://www.codeproject.com/script/Membership/LogOff.aspx?rp=%2fKB%2flibrary%2fGomzyHTMLReader.aspx%3fmsg%3d1308222">Sign out</a>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||
<tbody><tr>
|
||
<td class="header"><a href="http://www.codeproject.com/"><img id="ctl00_Logo" title="The Code Project" src="./HTML Reader C++ Class Library - CodeProject_files/logo225x90.gif" alt="Home" style="border-width:0px;"></a></td>
|
||
<td class="header" align="right">
|
||
<div class="lqm_ad" lqm_publisher="lqm.codeproject.site" lqm_zone="77" lqm_format="728x90" lqm_country="RU" lqm_tags="VC6,Windows,Visual-Studio,MFC,Dev,Intermediate"><iframe id="lqmad1" width="728" height="90" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe></div>
|
||
</td>
|
||
</tr></tbody></table>
|
||
|
||
<table cellpadding="0" cellspacing="0" class="contrast1-background extended"><tbody><tr><td nowrap="nowrap">
|
||
|
||
|
||
<div class="navbar clearfix">
|
||
<ul id="nav">
|
||
|
||
<li><a id="ctl00_TopNavBar_Home" class="down" href="http://www.codeproject.com/">Home</a>
|
||
|
||
|
||
</li><li><a id="ctl00_TopNavBar_Art" class="down selected" href="http://www.codeproject.com/script/Articles/Latest.aspx">Articles</a>
|
||
|
||
<ul>
|
||
<li><a id="ctl00_TopNavBar_ArtTopicList" class="fly last" onmouseover="ShowMap(this, 'siteMap');" href="http://www.codeproject.com/script/Content/SiteMap.aspx">Chapters and Sections</a><ul id="ctl00_TopNavBar_MapFlyout"><li>
|
||
<div id="siteMap" class="tooltip-flyout">
|
||
<img src="./HTML Reader C++ Class Library - CodeProject_files/animated.gif" style="margin:150px;width:100px;height:100px;">
|
||
</div>
|
||
</li></ul>
|
||
</li>
|
||
<li><a id="ctl00_TopNavBar_ArtSearch" class="fly break" href="http://www.codeproject.com/search.aspx">Search</a></li>
|
||
<li><a id="ctl00_TopNavBar_ArtLatestArts" class="fly" href="http://www.codeproject.com/script/Articles/Latest.aspx?at=1,3,7">Latest Articles</a></li>
|
||
<li><a id="ctl00_TopNavBar_ArtLatestTips" class="fly" href="http://www.codeproject.com/script/Articles/Latest.aspx?at=6,8">Latest Tips/Tricks</a></li>
|
||
<li><a id="ctl00_TopNavBar_ArtTop" class="fly" href="http://www.codeproject.com/script/Articles/TopArticles.aspx?ta_so=4">Top Articles</a></li>
|
||
<li><a id="ctl00_TopNavBar_ArtBeginner" class="fly" href="http://www.codeproject.com/search.aspx?aidlst=152&sa_us=True">Beginner Articles</a></li>
|
||
<li id="ctl00_TopNavBar_VideosLink">
|
||
<a id="ctl00_TopNavBar_ArtVideoArticles" class="fly" href="http://www.codeproject.com/script/Articles/VideoArticleList.aspx">Video Articles</a>
|
||
</li>
|
||
<li><a id="ctl00_TopNavBar_ArtBlogArticles" class="fly break" href="http://www.codeproject.com/script/Articles/BlogArticleList.aspx">Technical Blogs</a></li>
|
||
<li><a id="ctl00_TopNavBar_ArtPostArticle" class="fly" href="http://www.codeproject.com/script/Articles/Submit.aspx">Post an Article</a></li>
|
||
<li><a id="ctl00_TopNavBar_ArtPostTipTrick" class="fly" href="http://www.codeproject.com/Tips/post.aspx">Post Tip & Trick</a></li>
|
||
<li><a id="ctl00_TopNavBar_ArtPostBlog" class="fly break" href="http://www.codeproject.com/script/Articles/BlogFeed.aspx">Post your Blog</a></li>
|
||
<li><a id="ctl00_TopNavBar_ArtGuide" class="fly" href="http://www.codeproject.com/info/Submit.aspx">Posting/Update Guidelines</a></li>
|
||
<li><a id="ctl00_TopNavBar_ArtCompetition" class="fly last" href="http://www.codeproject.com/script/Awards/CurrentCompetitions.aspx?cmpTpId=1">Article Competition</a></li>
|
||
</ul>
|
||
|
||
</li>
|
||
|
||
|
||
|
||
<li><a id="ctl00_TopNavBar_Answers" href="http://www.codeproject.com/script/Answers/List.aspx?tab=active">Quick Answers</a>
|
||
<ul>
|
||
<li id="ctl00_TopNavBar_AQL"><a id="ctl00_TopNavBar_ArticleQuestion" class="fly highlight" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#_comments">Ask a Question about this article</a></li>
|
||
|
||
<li><a id="ctl00_TopNavBar_QAAsk" class="fly" href="http://www.codeproject.com/Questions/ask.aspx">Ask a Question</a></li>
|
||
|
||
|
||
<li><a id="ctl00_TopNavBar_QAUnanswered" class="fly" href="http://www.codeproject.com/script/Answers/List.aspx?tab=unanswered">View Unanswered Questions</a></li>
|
||
<li><a id="ctl00_TopNavBar_QALatest" class="fly" href="http://www.codeproject.com/script/Answers/List.aspx?tab=active">View All Questions...</a></li>
|
||
|
||
<li><a id="ctl00_TopNavBar_QATR_ctl00_Tag" class="fly" href="http://www.codeproject.com/script/Answers/List.aspx?tab=active&alltags=true&tags=81" style="padding-left:30px">C# questions</a></li>
|
||
|
||
<li><a id="ctl00_TopNavBar_QATR_ctl01_Tag" class="fly" href="http://www.codeproject.com/script/Answers/List.aspx?tab=active&alltags=true&tags=85" style="padding-left:30px">ASP.NET questions</a></li>
|
||
|
||
<li><a id="ctl00_TopNavBar_QATR_ctl02_Tag" class="fly" href="http://www.codeproject.com/script/Answers/List.aspx?tab=active&alltags=true&tags=842" style="padding-left:30px">VB.NET questions</a></li>
|
||
|
||
<li><a id="ctl00_TopNavBar_QATR_ctl03_Tag" class="fly" href="http://www.codeproject.com/script/Answers/List.aspx?tab=active&alltags=true&tags=78" style="padding-left:30px">C++ questions</a></li>
|
||
|
||
<li><a id="ctl00_TopNavBar_QATR_ctl04_Tag" class="fly" href="http://www.codeproject.com/script/Answers/List.aspx?tab=active&alltags=true&tags=69" style="padding-left:30px">C#3.0 questions</a></li>
|
||
|
||
</ul>
|
||
|
||
</li>
|
||
|
||
|
||
|
||
<li><a id="ctl00_TopNavBar_Forums" href="http://www.codeproject.com/script/Forums/List.aspx">Discussions</a>
|
||
|
||
<ul>
|
||
<li><a id="ctl00_TopNavBar_MessageBoardsAll" class="fly" href="http://www.codeproject.com/script/Forums/List.aspx">All Message Boards...</a></li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/1580997/Application-Lifecycle.aspx">Application Lifecycle<span class="fly-menu">></span></a>
|
||
<ul><li><a class="fly" href="http://www.codeproject.com/Forums/369270/Design-and-Architecture.aspx">Design and Architecture</a></li>
|
||
<li><a class="fly" href="http://www.codeproject.com/Forums/1533717/Running-a-Business.aspx">Running a Business</a></li>
|
||
<li><a class="fly" href="http://www.codeproject.com/Forums/1533716/Sales-Marketing.aspx">Sales / Marketing</a></li>
|
||
<li><a class="fly" href="http://www.codeproject.com/Forums/1651/Collaboration-Beta-Testing.aspx">Collaboration / Beta Testing</a></li>
|
||
<li><a class="fly" href="http://www.codeproject.com/Forums/3304/Work-Training-Issues.aspx">Work & Training Issues</a></li>
|
||
</ul></li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/1627782/Free-Tools.aspx">Free Tools</a>
|
||
</li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/12076/ASP-NET.aspx">ASP.NET</a>
|
||
</li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/1580226/JavaScript.aspx">JavaScript</a>
|
||
</li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/1647/C-Cplusplus-MFC.aspx">C / C++ / MFC<span class="fly-menu">></span></a>
|
||
<ul><li><a class="fly" href="http://www.codeproject.com/Forums/4486/ATL-WTL-STL.aspx">ATL / WTL / STL</a></li>
|
||
<li><a class="fly" href="http://www.codeproject.com/Forums/3785/Managed-Cplusplus-CLI.aspx">Managed C++/CLI</a></li>
|
||
</ul></li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/1649/Csharp.aspx">C#</a>
|
||
</li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/1725/Database.aspx">Database</a>
|
||
</li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/186301/Hardware-Devices.aspx">Hardware & Devices<span class="fly-menu">></span></a>
|
||
<ul><li><a class="fly" href="http://www.codeproject.com/Forums/1644/System-Admin.aspx">System Admin</a></li>
|
||
</ul></li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/1606152/Hosting-and-Servers.aspx">Hosting and Servers</a>
|
||
</li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/1643/Java.aspx">Java</a>
|
||
</li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/1650/NET-Framework.aspx">.NET Framework</a>
|
||
</li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/13695/Mobile.aspx">Mobile</a>
|
||
</li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/1540733/Sharepoint.aspx">Sharepoint</a>
|
||
</li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/1004257/Silverlight-WPF.aspx">Silverlight / WPF</a>
|
||
</li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/1646/Visual-Basic.aspx">Visual Basic</a>
|
||
</li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/1640/Web-Development.aspx">Web Development<span class="fly-menu">></span></a>
|
||
<ul><li><a class="fly" href="http://www.codeproject.com/Forums/1580227/CSS.aspx">CSS</a></li>
|
||
<li><a class="fly" href="http://www.codeproject.com/Forums/1213656/PHP.aspx">PHP</a></li>
|
||
</ul></li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/1645/Site-Bugs-Suggestions.aspx">Site Bugs / Suggestions</a>
|
||
</li>
|
||
<li><a class="fly" style="padding-left:30px" href="http://www.codeproject.com/Forums/1652005/Spam-Watch.aspx">Spam Watch</a>
|
||
</li>
|
||
|
||
|
||
<li class="heading">Other Languages<span class="fly-menu">></span>
|
||
<ul>
|
||
<li><a class="fly" href="http://www.codeproject.com/Forums/1580229/Hindi.aspx">General Indian Topics</a></li>
|
||
<li><a class="fly" href="http://www.codeproject.com/Forums/1580230/Chinese.aspx">General Chinese Topics</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
</li>
|
||
|
||
<li><a id="ctl00_TopNavBar_Zones" href="http://www.codeproject.com/Zones/index.aspx">Learning Zones</a>
|
||
|
||
<ul>
|
||
<!--<li class="heading">Zones</li>-->
|
||
<li><a href="http://www.codeproject.com/Zones/Commerce/" class="fly">The Commerce Zone</a></li><li><a href="http://www.codeproject.com/Zones/Mobile/" class="fly">The Mobile Zone</a></li><li><a href="http://www.codeproject.com/Zones/Cloud/" class="fly">The Cloud Zone</a></li><li><a href="http://www.codeproject.com/Zones/Hardware/" class="fly">The Hardware Zone</a></li><li><a href="http://www.codeproject.com/Zones/Parallelism/" class="fly">The Parallelism Zone</a></li><li><a href="http://www.codeproject.com/Zones/WPF-Silverlight/" class="fly">The WPF / Silverlight Zone</a></li><li><a href="http://www.codeproject.com/Zones/Flex-Flash/" class="fly">The Flex / Flash Zone</a></li><li><a href="http://www.codeproject.com/Zones/HTML-CSS/" class="fly">The HTML / CSS Zone</a></li><li><a href="http://www.codeproject.com/Zones/SqlServer/" class="fly">The SQL Zone</a></li><li><a href="http://www.codeproject.com/Zones/WhitePapers/" class="fly break">WhitePapers / Webcasts</a></li>
|
||
<li><a id="ctl00_TopNavBar_Solutions" class="fly last" href="http://www.codeproject.com/kb/Solution-Center/">Solutions Center</a></li>
|
||
</ul>
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a id="ctl00_TopNavBar_Features" href="http://www.codeproject.com/Feature/">Features</a>
|
||
|
||
<ul>
|
||
<li><a id="ctl00_TopNavBar_WhosWho" class="fly" href="http://www.codeproject.com/script/Membership/Profiles.aspx">Who's Who</a></li>
|
||
<li><a id="ctl00_TopNavBar_MVPs" class="fly" href="http://www.codeproject.com/script/Awards/MVPWinners.aspx">CodeProject MVPs</a></li>
|
||
<li><a id="ctl00_TopNavBar_Companies" class="fly break" href="http://www.codeproject.com/script/Membership/Profiles.aspx?mgtid=1&mgm=True">Company Listings</a></li>
|
||
<li><a id="ctl00_TopNavBar_Catalog" class="fly" href="http://www.codeproject.com/script/Catalog/List.aspx">Component & Service Catalog</a></li>
|
||
<li><a id="ctl00_TopNavBar_Comps" class="fly" href="http://www.codeproject.com/script/Awards/CurrentCompetitions.aspx?cmpTpId=1&awsac=true">Competitions</a></li>
|
||
<li><a id="ctl00_TopNavBar_News" class="fly" href="http://www.codeproject.com/script/News/List.aspx">News</a></li>
|
||
<li><a id="ctl00_TopNavBar_TechSummit" class="fly" href="http://www.codeproject.com/TechSummit/">Tech Summits</a></li>
|
||
<li><a id="ctl00_TopNavBar_Insider" class="fly" href="http://www.codeproject.com/Feature/Insider/">Daily Insider</a></li>
|
||
<li></li>
|
||
<li><a id="ctl00_TopNavBar_PressRelease" class="fly" href="http://www.codeproject.com/script/PressReleases/Preview.aspx">Press Releases</a></li>
|
||
<li><a id="ctl00_TopNavBar_Surveys" class="fly" href="http://www.codeproject.com/script/Surveys/List.aspx">Surveys</a></li>
|
||
<li><a id="ctl00_TopNavBar_Stuff" class="fly" href="http://www.codeproject.com/Info/Stuff.aspx">CodeProject Stuff</a></li>
|
||
<li><a id="ctl00_TopNavBar_AddIn" class="fly last" href="http://www.codeproject.com/Services/Addins/">CodeProject VS Addin </a></li>
|
||
</ul>
|
||
|
||
</li>
|
||
|
||
|
||
<li><a id="ctl00_TopNavBar_Help" href="http://www.codeproject.com/KB/FAQs/">Help!</a>
|
||
|
||
<ul>
|
||
<li><a id="ctl00_TopNavBar_HelpWhatIs" class="fly" href="http://www.codeproject.com/info/guide.aspx">What is 'The Code Project'?</a></li>
|
||
<li><a id="ctl00_TopNavBar_HelpGeneral" class="fly" href="http://www.codeproject.com/KB/FAQs/">General FAQ</a></li>
|
||
<li><a id="ctl00_TopNavBar_HelpPostQuestion" class="fly" href="http://www.codeproject.com/Questions/ask.aspx">Post a Question</a></li>
|
||
<li><a id="ctl00_TopNavBar_HelpBugs" class="fly" href="http://www.codeproject.com/Forums/1645/Site-Bugs-Suggestions.aspx">Bugs and Suggestions</a></li>
|
||
<li><a id="ctl00_TopNavBar_HelpSiteMap" class="fly" href="http://www.codeproject.com/script/Content/SiteMap.aspx">Site Directory</a></li>
|
||
<li><a id="ctl00_TopNavBar_HelpAdvertise" class="fly" href="http://lakequincy.com/">Advertise with us</a></li>
|
||
<li><a id="ctl00_TopNavBar_HelpAboutUs" class="fly last" href="http://www.codeproject.com/info/about.aspx">About Us</a></li>
|
||
</ul>
|
||
|
||
</li>
|
||
|
||
|
||
<li style="margin-left:10px">
|
||
<a id="ctl00_TopNavBar_Lounge" class="simple" href="http://www.codeproject.com/Lounge.aspx">The Lounge</a>
|
||
|
||
<ul>
|
||
<li><a id="ctl00_TopNavBar_LoungeLnk" class="fly" href="http://www.codeproject.com/Lounge.aspx">The Lounge </a></li>
|
||
<li><a id="ctl00_TopNavBar_CleverLnk" class="fly" href="http://www.codeproject.com/feature/CleverCode.aspx">Clever Code</a></li>
|
||
<li><a id="ctl00_TopNavBar_ShameLnk" class="fly" href="http://www.codeproject.com/feature/HallOfSHame.aspx">Hall of Shame</a></li>
|
||
<li><a id="ctl00_TopNavBar_SoapBoxLnk" class="fly" href="http://www.codeproject.com/Forums/1536756/The-Soapbox-2-0.aspx">The Soapbox</a></li>
|
||
|
||
</ul>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
|
||
function ShowMap(prnt, elmId) {
|
||
var map = $('#' + elmId);
|
||
|
||
if (!prnt.populated && !prnt.populating) {
|
||
prnt.populating = true;
|
||
map.css( { 'height': '400px', 'width': '400px' });
|
||
map.load("/script/content/ajax/SiteMap.aspx", function() { prnt.populated = true; });
|
||
prnt.populated = true;
|
||
prnt.populating = false;
|
||
}
|
||
|
||
if (prnt.populated) {
|
||
var left = Math.max(map.parent().offset().left, 200);
|
||
var top = Math.max(map.parent().offset().top, 0);
|
||
var width = Math.min((($(window).width()-left) * 0.9), 1000);
|
||
var height = Math.min((($(window).height()-top) * 0.9), 700);
|
||
map.css('width', width + 'px');
|
||
map.css('height', height + 'px');
|
||
map.css('overflow', 'auto');
|
||
map.css('margin', '0');
|
||
}
|
||
}
|
||
|
||
</script>
|
||
</td><td align="right">
|
||
|
||
|
||
<div class="search-bar">
|
||
|
||
<form method="get" action="http://www.codeproject.com/search.aspx" name="Search" class="tight">
|
||
|
||
|
||
<table border="0" cellspacing="0" cellpadding="0" class="search"><tbody><tr><td><input tabindex="2" class="search subdue" id="sb_tb" value="" name="q"></td><td><input type="image" src="./HTML Reader C++ Class Library - CodeProject_files/search.gif"></td></tr></tbody></table>
|
||
|
||
<div class="hover-container">
|
||
<div id="SearchFilter" class="search-advanced small-text align-left" style="display: none; ">
|
||
<b>Search within:<br></b>
|
||
|
||
<input type="radio" id="sb_kw" name="sbo" value="kw" checked="true"><label for="sb_kw">Articles</label><br>
|
||
<input type="radio" id="sb_qa" name="sbo" value="qa"><label for="sb_qa">Quick Answers</label><br>
|
||
<input type="radio" id="sb_fm" name="sbo" value="fm"><label for="sb_fm">Messages</label><br>
|
||
<input type="radio" id="sb_ctlk" name="sbo" value="ctlk"><label for="sb_ctlk">Product Catalog</label><br>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
</div>
|
||
</td></tr></tbody></table>
|
||
|
||
|
||
|
||
<div class="container-article hreview-aggregate">
|
||
|
||
|
||
<div class="container-header">
|
||
<div id="ctl00_Header" class="header">
|
||
|
||
<a name="Main"></a>
|
||
|
||
|
||
<a name="_articleTop" id="_articleTop"></a>
|
||
|
||
|
||
<div class="clearfix hover-container">
|
||
|
||
<div class="container">
|
||
|
||
<div class="breadcrumb float-left"><a href="http://www.codeproject.com/script/Content/SiteMap.aspx"><span class="sitemap-anchor" onmouseover="ShowMap(this,'map');"><img width="16px" height="16px" src="./HTML Reader C++ Class Library - CodeProject_files/sitemap16.png" border="0" alt="Site map" style="vertical-align:middle"><div id="map" class="tooltip-flyout"><img src="./HTML Reader C++ Class Library - CodeProject_files/animated.gif" style="margin:150px;width:100px;height:100px;border:0;"></div></span></a> » <a href="http://www.codeproject.com/Chapters/8/Platforms-Frameworks-Libraries.aspx">Platforms, Frameworks & Libraries</a> » <a href="http://www.codeproject.com/KB/library/">Libraries</a> » <a href="http://www.codeproject.com/KB/library/#Code+Libraries">Code Libraries</a></div>
|
||
</div>
|
||
|
||
|
||
<div id="ctl00_TitleArea_InfoArea" class="float-right">
|
||
|
||
|
||
<div class="infobox">
|
||
<table class="tight small-text" cellpadding="0" cellspacing="1">
|
||
<tbody><tr><td>Licence </td><td></td></tr>
|
||
|
||
<tr><td>First Posted </td><td nowrap="nowrap"><b>30 Mar 2004</b></td></tr>
|
||
<tr><td>Views </td><td><b>164,534</b></td></tr>
|
||
|
||
<tr><td>Downloads </td><td><b>2,991</b></td></tr>
|
||
|
||
|
||
<tr><td>Bookmarked </td><td><b>143 times</b></td></tr>
|
||
|
||
|
||
|
||
|
||
</tbody></table>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="item">
|
||
<h1 id="ctl00_TitleArea_ArticleTitle" class="fn">HTML Reader C++ Class Library</h1>
|
||
</div>
|
||
|
||
|
||
<div class="author">
|
||
By <b><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=547523"><font color="maroon">gUrM33T</font></a></b> |
|
||
30 Mar 2004
|
||
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="tags">
|
||
<span id="ctl00_TitleArea_TagsList_TagWrp" class="tags">
|
||
|
||
|
||
|
||
<span id="ctl00_TitleArea_TagsList_VisibleTags"><span class="t"><a href="http://www.codeproject.com/search.aspx?aidlst=4">VC6</a></span><span class="t"><a href="http://www.codeproject.com/search.aspx?aidlst=94">Windows</a></span><span class="t"><a href="http://www.codeproject.com/search.aspx?aidlst=103">Visual-Studio</a></span><span class="t"><a href="http://www.codeproject.com/search.aspx?aidlst=107">MFC</a></span><span class="t"><a href="http://www.codeproject.com/search.aspx?aidlst=118">Dev</a></span><span class="t"><a href="http://www.codeproject.com/search.aspx?aidlst=153">Intermediate</a></span></span>
|
||
|
||
|
||
|
||
</span>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="abstract summary"><span id="ctl00_TitleArea_ArticleDescr">A lightweight, fast, simple, and low-overhead C++ class library based on push model parsing.</span></div>
|
||
</div>
|
||
|
||
|
||
<div class="prize-winner">
|
||
<div><img id="ctl00_TitleArea_ArticleAwards_AR_ctl01_AI" src="./HTML Reader C++ Class Library - CodeProject_files/prize-winner30.gif" align="absmiddle" style="border-width:0px;"> Prize winner in Competition
|
||
"MFC/C++ Feb 2004" <i></i></div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
<div id="ctl00_HeadSide" class="header-sidebar">
|
||
<div class="align-left" style="height:24px">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
<div class="bold pad-top">See Also</div>
|
||
<ul class="outdent small-text" style="margin-left:5px">
|
||
<li><a id="ctl00_SeeAlso_LikeThis" href="http://www.codeproject.com/search.aspx?q=HTML+Reader+C%2b%2b+Class+Library">More like this</a></li>
|
||
<li><a id="ctl00_SeeAlso_ByAuthor" href="http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=547523">More by this author</a></li>
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
<div id="ctl00_Nav" class="container-nav">
|
||
<div id="ctl00_TabContainer" class="tabs-container clearfix">
|
||
|
||
|
||
<div class="float-right action-links">
|
||
<a id="ctl00_ActionLinks_PrintLnk" class="tooltip" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?display=Print">
|
||
<img src="./HTML Reader C++ Class Library - CodeProject_files/print.gif" width="24px" height="24px" style="vertical-align:middle;border:0">
|
||
<div class="speech-bubble-container-up">
|
||
<div class="speech-bubble-up">Print Article</div>
|
||
<div class="speech-bubble-pointer-up">
|
||
<div class="speech-bubble-pointer-up-inner"></div>
|
||
</div>
|
||
</div>
|
||
</a>
|
||
|
||
<span id="SBI"><img src="./HTML Reader C++ Class Library - CodeProject_files/share_drop24.png" id="ctl00_ActionLinks_AddTo_Img" width="37" height="24" alt="add" style="vertical-align:middle">
|
||
</span>
|
||
<div id="ATD" class="list-socialbookmark" style="left: 646px; top: 204px; "><div><a class="AddTo" title="Add this page to Twitter" onclick="return socialLinks.addto(0);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#"><img align="absmiddle" src="./HTML Reader C++ Class Library - CodeProject_files/AddTo_Twitter.gif" width="16px" height="16px" border="0"> Twitter</a> </div><div><a class="AddTo" title="Add this page to Digg" onclick="return socialLinks.addto(1);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#"><img align="absmiddle" src="./HTML Reader C++ Class Library - CodeProject_files/AddTo_Digg.png" width="16px" height="16px" border="0"> Digg</a> </div><div><a class="AddTo" title="Add this page to Facebook" onclick="return socialLinks.addto(2);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#"><img align="absmiddle" src="./HTML Reader C++ Class Library - CodeProject_files/AddTo_Facebook.png" width="16px" height="16px" border="0"> Facebook</a> </div><div><a class="AddTo" title="Add this page to Del.icio.us" onclick="return socialLinks.addto(3);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#"><img align="absmiddle" src="./HTML Reader C++ Class Library - CodeProject_files/AddTo_Delicious.png" width="16px" height="16px" border="0"> Del.icio.us</a> </div><div><a class="AddTo" title="Add this page to Reddit" onclick="return socialLinks.addto(4);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#"><img align="absmiddle" src="./HTML Reader C++ Class Library - CodeProject_files/AddTo_Reddit.png" width="16px" height="16px" border="0"> Reddit</a> </div><div><a class="AddTo" title="Add this page to Stumbleupon" onclick="return socialLinks.addto(5);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#"><img align="absmiddle" src="./HTML Reader C++ Class Library - CodeProject_files/AddTo_stumbleupon.png" width="16px" height="16px" border="0"> Stumbleupon</a> </div><div><a class="AddTo" title="Add this page to Newsvine" onclick="return socialLinks.addto(6);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#"><img align="absmiddle" src="./HTML Reader C++ Class Library - CodeProject_files/AddTo_Newsvine.png" width="16px" height="16px" border="0"> Newsvine</a> </div><div><a class="AddTo" title="Add this page to Technorati" onclick="return socialLinks.addto(7);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#"><img align="absmiddle" src="./HTML Reader C++ Class Library - CodeProject_files/AddTo_Technorati.png" width="16px" height="16px" border="0"> Technorati</a> </div><div><a class="AddTo" title="Add this page to Mr. Wong" onclick="return socialLinks.addto(8);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#"><img align="absmiddle" src="./HTML Reader C++ Class Library - CodeProject_files/AddTo_MrWong.png" width="16px" height="16px" border="0"> Mr. Wong</a> </div><div><a class="AddTo" title="Add this page to Yahoo!" onclick="return socialLinks.addto(9);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#"><img align="absmiddle" src="./HTML Reader C++ Class Library - CodeProject_files/AddTo_Yahoo.png" width="16px" height="16px" border="0"> Yahoo!</a> </div><div><a class="AddTo" title="Add this page to Google" onclick="return socialLinks.addto(10);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#"><img align="absmiddle" src="./HTML Reader C++ Class Library - CodeProject_files/AddTo_Google.png" width="16px" height="16px" border="0"> Google</a> </div><div><a class="AddTo" title="Add this page to Windows Live" onclick="return socialLinks.addto(11);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#"><img align="absmiddle" src="./HTML Reader C++ Class Library - CodeProject_files/AddTo_Live.png" width="16px" height="16px" border="0"> Windows Live</a> </div><div><a class="AddTo" title="Send as Email" onclick="return socialLinks.addto(12);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#"><img align="absmiddle" src="./HTML Reader C++ Class Library - CodeProject_files/envelope.gif" width="16px" height="16px" border="0"> Send as Email</a> </div></div>
|
||
|
||
|
||
<span class="tooltip">
|
||
<a id="ctl00_ActionLinks_ArticleBmk_ImgBt" title="Bookmark" alternatetext="Bookmark" name="bm_6561_2" onclick="return bookmarkMe(6561,2,'/script/Bookmarks/Ajax/Add.aspx?obid=6561&obtid=2&action=AddBookmark&bio=true',true);" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=6561&obtid=2&action=AddBookmark&bio=true" style="display:inline-block;height:24px;width:24px;vertical-align:middle;border:0"><img title="Bookmark" src="./HTML Reader C++ Class Library - CodeProject_files/bookmark.png" alt="" style="border-width:0px;"></a>
|
||
|
||
|
||
<span id="ctl00_ActionLinks_ArticleBmk_StatusMsg" class="tiny-text" style="display:none" name="bm_6561_2"></span>
|
||
|
||
<div class="speech-bubble-container-up">
|
||
<div class="speech-bubble-up">Add to your CodeProject bookmarks</div>
|
||
<div class="speech-bubble-pointer-up">
|
||
<div class="speech-bubble-pointer-up-inner"></div>
|
||
</div>
|
||
</div>
|
||
</span>
|
||
|
||
<a id="discussAnch" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#_comments" class="tooltip anchorLink">
|
||
|
||
<img src="./HTML Reader C++ Class Library - CodeProject_files/discuss.gif" width="24px" height="24px" alt="Discuss" style="vertical-align:middle;border:0">
|
||
<div class="speech-bubble-container-up">
|
||
<div class="speech-bubble-up">Discuss this article</div>
|
||
<div class="speech-bubble-pointer-up">
|
||
<div class="speech-bubble-pointer-up-inner"></div>
|
||
</div>
|
||
</div>
|
||
</a>
|
||
<span id="ctl00_ActionLinks_cmtcnt" class="subdue small-text align-middle" style="margin-left:-4px">72</span>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="float-left">
|
||
|
||
|
||
|
||
<div class="tabs float-left"><table cellpadding="0" cellspacing="0"><tbody><tr>
|
||
<td class="tab-selected">Article</td><td class="tab-unselected"><a href="http://www.codeproject.com/script/Articles/ViewDownloads.aspx?aid=6561">Browse Code</a></td><td class="tab-unselected"><a href="http://www.codeproject.com/script/Articles/Statistics.aspx?aid=6561">Stats</a></td><td class="tab-unselected"><a href="http://www.codeproject.com/script/Articles/ListVersions.aspx?aid=6561">Revisions</a></td>
|
||
</tr></tbody></table></div>
|
||
|
||
|
||
|
||
<div class="float-left" style="margin-left:15px">
|
||
<div id="ctl00_CurRat" class="tooltip" name="CurRat_6561">
|
||
|
||
|
||
<table cellpadding="0" cellspacing="0" class="small-text">
|
||
<tbody><tr>
|
||
|
||
<td class="nowrap">
|
||
|
||
<span id="ctl00_ArticleRating_VI">
|
||
<div class="nowrap rating-stars" style="height:24px;width:120px;position:relative;">
|
||
<div class="clipped align-left float-left" style="height:24px;width:115px;">
|
||
<img src="./HTML Reader C++ Class Library - CodeProject_files/stars-fill.png" style="border-width:0px;">
|
||
</div><div class="clipped" style="height:24px;width:5px;position:relative;">
|
||
<img src="./HTML Reader C++ Class Library - CodeProject_files/stars-empty.png" style="border-width:0px;position:absolute;top:0;right:0;">
|
||
</div>
|
||
</div>
|
||
</span>
|
||
|
||
|
||
</td>
|
||
|
||
<td id="ctl00_ArticleRating_VR" class="nowrap">
|
||
<span id="ctl00_ArticleRating_VotesR"> <span class="rating">4.80</span> (<span class="count">82 votes</span>)</span>
|
||
|
||
</td>
|
||
|
||
</tr>
|
||
|
||
</tbody></table>
|
||
|
||
<div id="ctl00_RB" class="speech-bubble-container-up">
|
||
<div class="speech-bubble-up" style="width:150px !important">
|
||
|
||
<div>
|
||
<table class="feature" width="100%" height="50px" title="Voting Distribution. Recent data only" cellpadding="0" cellspacing="0"><tbody><tr><td class="chart-column rating-ignore-vote" title="Outside deviation limits - not included in score."><img src="./HTML Reader C++ Class Library - CodeProject_files/pollcol.gif" width="20pxpx" height="5px" border="0px" alt="7 votes, 8.5%" title="7 votes, 8.5%"><br><span title="7 votes">1</span></td>
|
||
<td class="chart-column rating-ignore-vote" title="Outside deviation limits - not included in score."><img src="./HTML Reader C++ Class Library - CodeProject_files/pollcol.gif" width="20pxpx" height="1px" border="0px" alt="1 vote, 1.2%" title="1 vote, 1.2%"><br><span title="1 vote">2</span></td>
|
||
<td class="chart-column"><img src="./HTML Reader C++ Class Library - CodeProject_files/pollcol.gif" width="20pxpx" height="2px" border="0px" alt="3 votes, 3.7%" title="3 votes, 3.7%"><br><span title="3 votes">3</span></td>
|
||
<td class="chart-column"><img src="./HTML Reader C++ Class Library - CodeProject_files/pollcol.gif" width="20pxpx" height="3px" border="0px" alt="5 votes, 6.1%" title="5 votes, 6.1%"><br><span title="5 votes">4</span></td>
|
||
<td class="chart-column"><img src="./HTML Reader C++ Class Library - CodeProject_files/pollcol.gif" width="20pxpx" height="50px" border="0px" alt="66 votes, 80.5%" title="66 votes, 80.5%"><br><span title="66 votes">5</span></td>
|
||
</tr></tbody></table><div class="small-text align-center">4.80/5 - 82 votes</div><div class="small-text align-center subdue">8 removed</div><div class="small-text align-center subdue">μ 4.58, σ<sub>a</sub> 2.10 [<a href="http://www.codeproject.com/KB/FAQs/RatingReputationFAQ.aspx#noisefilter">?</a>]</div>
|
||
</div>
|
||
</div>
|
||
<div class="speech-bubble-pointer-up">
|
||
<div class="speech-bubble-pointer-up-inner"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div id="ctl00_HeadSideFoot" class="tabs-sidebar">
|
||
<div>Sponsored Links</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="container-text">
|
||
|
||
<div id="AT" class="text">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<form name="aspnetForm" method="post" action="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222" id="aspnetForm" style="margin:0;padding:0">
|
||
<div>
|
||
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMjExOTQzNjk4Mw9kFgJmD2QWAgIGD2QWCAIRD2QWAgIBD2QWBmYPDxYCHgtOYXZpZ2F0ZVVybAUxL3NjcmlwdC9BcnRpY2xlcy9BZG1pbi9FZGl0b3JDaG9pY2UuYXNweD9haWQ9NjU2MWRkAgIPDxYCHwAFNy9zY3JpcHQvQXdhcmRzL0FkbWluL0F3YXJkT2JqZWN0LmFzcHg/b2JpZD02NTYxJm9idGlkPTJkZAIKDw8WAh8ABS4vc2NyaXB0L0FydGljbGVzL0FkbWluL1F1ZXVlRWRpdC5hc3B4P2FpZD02NTYxZGQCEw9kFgICAQ9kFgICAQ9kFgZmDw8WAh8ABS4vS0IvbGlicmFyeS9Hb216eUhUTUxSZWFkZXIuYXNweD9kaXNwbGF5PVByaW50ZGQCBA8WAh4JaW5uZXJodG1sBQI3MmQCBQ8PFgIfAAUlL3NjcmlwdC9BcnRpY2xlcy9SZXBvcnQuYXNweD9haWQ9NjU2MWRkAhUPZBYCAg0PZBYGAgIPFgIeBmFjdGlvbgUsL0tCL2xpYnJhcnkvR29tenlIVE1MUmVhZGVyLmFzcHg/bXNnPTEzMDgyMjIWCAIBD2QWAgIBDxYCHgdWaXNpYmxlaGQCAw9kFgICAg9kFgICAQ8QZGQWAGQCCw8WAh4LXyFJdGVtQ291bnQCAWQCDQ9kFgICAQ8WAh4EVGV4dAVTPGEgIGhyZWY9Ii9LQi9saWJyYXJ5L0dvbXp5SFRNTFJlYWRlci5hc3B4P21zZz0xMzA4MjIyI19hcnRpY2xlVG9wIj5BcnRpY2xlIFRvcDwvYT5kAgkPDxYEHwUFCVBlcm1hbGluax8ABSAvS0IvbGlicmFyeS9Hb216eUhUTUxSZWFkZXIuYXNweGRkAhcPFgIfBQU1Q29weXJpZ2h0IDIwMDQgYnkgPGZvbnQgY29sb3I9Im1hcm9vbiI+Z1VyTTMzVDwvZm9udD5kAhcPZBYCAgUPDxYCHwNoZGRkjnzJZNNBpIypx0b8uIGhIK9azJE=">
|
||
</div>
|
||
|
||
<div>
|
||
|
||
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWCAK2/fCZCwLAlMXDBwLBlMXDBwLClMXDBwLDlMXDBwLElMXDBwLP+++tCwK5upDkC0+tEq6Oi0AtgLCubCcWfCd6HZ1G">
|
||
</div>
|
||
|
||
<!-- Article Text Start -->
|
||
<div id="contentdiv">
|
||
|
||
|
||
|
||
|
||
<!-- Article Starts -->
|
||
|
||
<ul class="download">
|
||
<li>
|
||
<a href="http://www.codeproject.com/KB/library/GomzyHTMLReader/HTMLReader_src.zip">Download Library Source (Fully
|
||
Documented) - 24 Kb</a></li>
|
||
</ul>
|
||
|
||
<h2>Contents</h2>
|
||
<ul>
|
||
<li><a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#Intro">Introduction</a></li>
|
||
<li><a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#EventsBasedParser">Events-Based Parser</a></li>
|
||
<li><a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#Files">Files</a></li>
|
||
<li><a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#Description">Brief Description of Classes</a></li>
|
||
<li><a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#Usage">Usage</a></li>
|
||
<li><a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#ILiteHTMLReaderEvents">More About Event Handling</a></li>
|
||
<li><a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#ClassView">Class View</a></li>
|
||
<li><a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#License">License</a></li>
|
||
</ul>
|
||
|
||
<a name="Intro"><h2>Introduction</h2></a>
|
||
<p>
|
||
After failing to search for a class library that allows to read HTML text from either in-memory string buffers or physical disk files, I decided that there is a severe need to have a library like that. There are many parsers available for XML (eXtensible Markup Language), for instance, Simple API for XML (SAX), that allow you to parse XML simply by handling events that the reader generates as it parses specific symbols from the given XML document.
|
||
</p>
|
||
|
||
<p>
|
||
Inspired by the SAX parser for XML, I decided to develop an HTML Reader C++ Class Library myself from scratch that offers a simple, lightweight, fast, and the most important, a low-overhead solution to process an HTML document. Like SAX, I decided to develop an events-based parser, which raises events as it encounters various elements in the document. The advantage of an events-based parser is that the reader reads a section of an HTML document, generates an event, and then moves on to the next section. It uses less memory and is better for processing large documents.
|
||
</p>
|
||
|
||
|
||
<a name="EventsBasedParser"><h2>Events-Based Parser</h2></a>
|
||
<p>
|
||
An events-based parser uses the callback mechanism to report parsing events. These callbacks turn out to be protected virtual member functions that you will override. Events, such as the detection of an opening tag or the closing tag of an element, will trigger a call to the corresponding member function of your class. The application implements and registers an event handler with the reader. It is upto the application to put some code in the event handlers designed to achieve the objective of the application. Events-based parsers provide a simple, fast, and a lower-level access to the document being parsed.
|
||
</p>
|
||
|
||
<p>
|
||
Events-based parsers do not create an in-memory representation of the source document. They simply parse the document and notify client applications about various elements they find along the way. What happens next is the responsibility of the client application. Events-based parsers don't cache information and have an enviably small memory footprint.
|
||
</p>
|
||
|
||
|
||
<a name="Files"><h2>Files</h2></a>
|
||
<p>
|
||
To use the HTML Reader Class Library in your MFC application project, you will need to add a number of files in your project:
|
||
</p>
|
||
|
||
|
||
<table border="0" cellpadding="1" cellspacing="1" width="90%">
|
||
<tbody><tr>
|
||
<td><b>Header File</b></td>
|
||
<td><b>Source File</b></td>
|
||
<td><b>Class</b></td>
|
||
</tr>
|
||
<tr>
|
||
<td>LiteHTMLReader.h</td>
|
||
<td>LiteHTMLReader.cpp</td>
|
||
<td><code>CLiteHTMLReader</code></td>
|
||
</tr>
|
||
<tr>
|
||
<td>LiteHTMLTag.h</td>
|
||
<td>-</td>
|
||
<td><code>CLiteHTMLTag</code></td>
|
||
</tr>
|
||
<tr>
|
||
<td>LiteHTMLAttributes.h</td>
|
||
<td>-</td>
|
||
<td><code>CLiteHTMLAttributes</code></td>
|
||
</tr>
|
||
<tr>
|
||
<td>LiteHTMLAttributes.h</td>
|
||
<td>LiteHTMLAttributes.cpp</td>
|
||
<td><code>CLiteHTMLElemAttr</code></td>
|
||
</tr>
|
||
<tr>
|
||
<td>LiteHTMLEntityResolver.h</td>
|
||
<td>LiteHTMLEntityResolver.cpp</td>
|
||
<td><code>CLiteHTMLEntityResolver</code></td>
|
||
</tr>
|
||
</tbody></table>
|
||
|
||
<p>
|
||
NOTE: <code>LiteHTMLCommon.h</code> must also be included in your project.
|
||
</p>
|
||
|
||
|
||
<a name="Description"><h2>Brief Description of Classes</h2></a>
|
||
<p>
|
||
</p><ul>
|
||
<li><code>CLiteHTMLReader</code> is the main class of our library that works in conjunction with other <code>CLiteHTML*</code> classes to parse the given HTML document. It contains methods (<code>Read</code> and <code>ReadFile</code>) to initiate the parsing process that can operate on either in-memory string buffers or a physical disk file. <code>CLiteHTMLReader</code> allows you to trap events that the reader generates as it finds various elements in the document such as the starting of a tag, ending of a tag, an HTML comment, etc. But to handles these events, your application must define a class that implements an interface <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#ILiteHTMLReaderEvents"><code>ILiteHTMLReaderEvents</code></a> declared in the <code>LiteHTMLReader.h</code> file.<br><br></li>
|
||
<li><code>CLiteHTMLTag</code> class, as its name implies, is related to the HTML tags. It deals with the parsing and storage of tag information from the given string such as the name of the tag and the attributes/properties of a tag. It provides a method (actually, all the above-specified classes provide a method named <code>parseFromStr</code>) that is called by the <code>CLiteHTMLReader</code> class' <code>Read</code> and <code>ReadFile</code> method as the document is being parsed. Typically, <code>CLiteHTMLTag</code> is not used directly by your application. As specified above, it works in conjunction with the reader helping in the parsing of HTML tags.<br><br></li>
|
||
<li>The <code>CLiteHTMLElemAttr</code> and <code>CLiteHTMLAttributes</code> classes are inter-related as <code>CLiteHTMLAttributes</code> provides a collection-based mechanism to hold an array of <code>CLiteHTMLElemAttr</code> objects that are accessible either by the name of the attribute or a zero-based index value. As was the case with the <code>CLiteHTMLTag</code> class, these classes are also not typically used by your application directly.<br><br></li>
|
||
<li>The last is the <code>CLiteHTMLEntityResolver</code> class that helps in resolving the entity references. Entity references are numeric or symbolic names for characters that may be included in an HTML document. They are useful for referring to rarely used characters, or those that authoring tools make it difficult or impossible to enter. Entity references begin with a "&" sign and end with a semi-colon (;). Some common examples are<b>:</b> <code>&lt;</code> representing the < sign, <code>&gt;</code> representing the > sign, etc. <br><br></li>
|
||
</ul>
|
||
<p></p>
|
||
|
||
<p>
|
||
From the above discussion, one thing is clear that the <code>CLiteHTMLTag</code>, <code>CLiteHTMLAttributes</code>, and, <code>CLiteHTMLElemAttr</code> class provide a method named <code>parseFromStr</code> that is used by the <code>CLiteHTMLReader</code> to further delegate the parsing process while reading an HTML document.
|
||
</p>
|
||
|
||
|
||
<a name="Usage"><h2>Usage</h2></a>
|
||
<p>
|
||
OK, now let's come to the part of learning how to use this library in an MFC project:<br><br>
|
||
</p><ol>
|
||
<li>The <b>first</b> step is pretty simple. All you have to do is to add all of the files (given in the <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#Files">FILES</a> section above) in your project.<br><br></li>
|
||
<li>The <b>second</b> step, although optional, is to create a class that implements <code>ILiteHTMLReaderEvents</code> interface. <code>ILiteHTMLReaderEvents</code> is, in actual, an abstract class that acts as an interface which must be implemented by all those classes that need to handle events raised by the <code>CLiteHTMLReader</code> class. For example,
|
||
<div class="pre-action-link" id="premain0" width="100%" style="display:block"><img id="preimg0" src="./HTML Reader C++ Class Library - CodeProject_files/minus.gif" style="cursor: pointer; " height="9" width="9" preid="0"><span id="precollapse0" style="cursor: pointer; margin-bottom: 0px; " preid="0"> Collapse</span><span> | </span><a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" preid="0">Copy Code</a></div><pre lang="c++" id="pre0" style="margin-top: 0px; "><span class="code-preprocessor">#include</span><span class="code-preprocessor"> <span class="code-string">"</span><span class="code-string">stdafx.h"</span>
|
||
</span>
|
||
<span class="code-preprocessor">#include</span><span class="code-preprocessor"> <span class="code-string">"</span><span class="code-string">LiteHTMLReader.h"</span>
|
||
</span>
|
||
|
||
<span class="code-keyword">class</span> CEventHandler : <span class="code-keyword">public</span> ILiteHTMLReaderEvents
|
||
{
|
||
<span class="code-keyword">private</span>:
|
||
<span class="code-keyword">void</span> BeginParse(DWORD dwAppData, <span class="code-keyword">bool</span> &bAbort);
|
||
<span class="code-keyword">void</span> StartTag(CLiteHTMLTag *pTag, DWORD dwAppData, <span class="code-keyword">bool</span> &bAbort);
|
||
<span class="code-keyword">void</span> EndTag(CLiteHTMLTag *pTag, DWORD dwAppData, <span class="code-keyword">bool</span> &bAbort);
|
||
<span class="code-keyword">void</span> Characters(<span class="code-keyword">const</span> CString &rText, DWORD dwAppData, <span class="code-keyword">bool</span> &bAbort);
|
||
<span class="code-keyword">void</span> Comment(<span class="code-keyword">const</span> CString &rComment, DWORD dwAppData, <span class="code-keyword">bool</span> &bAbort);
|
||
<span class="code-keyword">void</span> EndParse(DWORD dwAppData, <span class="code-keyword">bool</span> bIsAborted);
|
||
};
|
||
</pre>
|
||
You must have noticed that "optional" word I used above. The reason behind this is that if you do not provide your own implementation of the event handler(s), the <code>ILiteHTMLReaderEvents</code> class provides a default implementation that does nothing. To learn more about the <code>ILiteHTMLReaderEvents</code> interface, jump to the <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#ILiteHTMLReaderEvents">ILiteHTMLReaderEvents Described</a> section of this article.
|
||
<br><br></li>
|
||
|
||
<li>The <b>third</b> step is to create an instance of the <code>CLiteHTMLReader</code> class like this:
|
||
<div class="pre-action-link" id="premain1" width="100%" style="display:block"><img id="preimg1" src="./HTML Reader C++ Class Library - CodeProject_files/minus.gif" style="cursor: pointer; " height="9" width="9" preid="1"><span id="precollapse1" style="cursor: pointer; margin-bottom: 0px; " preid="1"> Collapse</span><span> | </span><a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" preid="1">Copy Code</a></div><pre lang="c++" id="pre1" style="margin-top: 0px; "> CLiteHTMLReader theReader;
|
||
</pre>
|
||
<br></li>
|
||
|
||
<li>Now we should call either <code>Read</code> or <code>ReadFile</code> method of the <code>CLiteHTMLReader</code> class???<br><br> NO! Our event handler implementation will not start receiving notifications until we register it with the reader by calling the <code>setEventHandler</code> method of the <code>CLiteHTMLReader</code> class. So, supposing that the name of our class that is implementing the <code>ILiteHTMLReaderEvents</code> interface is <code>CEventHandler</code>, the <b>fourth</b> step is to create an instance of the <code>CEventHandler</code>, and call <code>setEventHandler</code> by passing it the address of this instance variable.
|
||
<div class="pre-action-link" id="premain2" width="100%" style="display:block"><img id="preimg2" src="./HTML Reader C++ Class Library - CodeProject_files/minus.gif" style="cursor: pointer; " height="9" width="9" preid="2"><span id="precollapse2" style="cursor: pointer; margin-bottom: 0px; " preid="2"> Collapse</span><span> | </span><a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" preid="2">Copy Code</a></div><pre lang="c++" id="pre2" style="margin-top: 0px; "> CEventHandler theEventHandler;
|
||
theReader.setEventHandler(&theEventHandler);
|
||
</pre>
|
||
Now, for all of you, who are thinking if it is possible to pass a <code lang="c++">NULL</code> pointer to the <code>setEventHandler</code> method, the answer is YES and that too at any time you want. And not to mention, you can also change the event handler at any time by calling <code>setEventHandler</code> and passing the address of some other instance.
|
||
<br><br></li>
|
||
|
||
<li>Now, the <b>fifth</b> and the final step is to call either <code>Read</code> or <code>ReadFile</code> method on the <code>CLiteHTMLReader</code> instance variable we created in step 3 by passing it the appropriate parameter i.e. if you decide to parse an in-memory string buffer, call the <code>Read</code> method and pass the address of the string you want to parse. In case, you need to parse an HTML document from a disk file, you can call another method <code>ReadFile</code> that is similar to <code>Read</code> but accepts a file handle (<code>HANDLE</code>) instead of a pointer to an array of characters. Take a look at the example:
|
||
<div class="pre-action-link" id="premain3" width="100%" style="display:block"><img id="preimg3" src="./HTML Reader C++ Class Library - CodeProject_files/minus.gif" style="cursor: pointer; " height="9" width="9" preid="3"><span id="precollapse3" style="cursor: pointer; margin-bottom: 0px; " preid="3"> Collapse</span><span> | </span><a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" preid="3">Copy Code</a></div><pre lang="c++" id="pre3" style="margin-top: 0px; ">TCHAR strToParse[] = _T(<span class="code-string">"</span><span class="code-string"><HTML>"</span>
|
||
<span class="code-string">"</span><span class="code-string"><HEAD>"</span>
|
||
<span class="code-string">"</span><span class="code-string"><TITLE>"</span>
|
||
<span class="code-string">"</span><span class="code-string"><!-- title goes here -->"</span>
|
||
<span class="code-string">"</span><span class="code-string"></TITLE>"</span>
|
||
<span class="code-string">"</span><span class="code-string"></HEAD>"</span>
|
||
<span class="code-string">"</span><span class="code-string"><BODY LEFTMARGIN="</span>15px<span class="code-string">"</span><span class="code-string">>This is a sample HTML document.</BODY>"</span>
|
||
<span class="code-string">"</span><span class="code-string"></HTML>"</span>);
|
||
theReader.Read(strToParse);
|
||
</pre>
|
||
OR
|
||
<div class="pre-action-link" id="premain4" width="100%" style="display:block"><img id="preimg4" src="./HTML Reader C++ Class Library - CodeProject_files/minus.gif" style="cursor: pointer; " height="9" width="9" preid="4"><span id="precollapse4" style="cursor: pointer; margin-bottom: 0px; " preid="4"> Collapse</span><span> | </span><a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" preid="4">Copy Code</a></div><pre lang="c++" id="pre4" style="margin-top: 0px; ">CFile fileToParse;
|
||
<span class="code-keyword">if</span> (fileToParse.Open(_T(<span class="code-string">"</span><span class="code-string">test.html"</span>), CFile::modeRead))
|
||
{
|
||
theReader.ReadFile(fileToParse.m_hFile);
|
||
fileToParse.Close();
|
||
}
|
||
</pre>
|
||
<br></li>
|
||
</ol>
|
||
<p></p>
|
||
|
||
|
||
<a name="ILiteHTMLReaderEvents"><h2>More About Event Handling</h2></a>
|
||
<p>
|
||
The <code>ILiteHTMLReaderEvents</code> class presents an interface that must be implemented by all those classes that want to handle the notifications sent by the <code>CLiteHTMLReader</code> while parsing an HTML document. The order of events handled by the <code>ILiteHTMLReaderEvents</code> handler is determined by the order of information within the document being parsed. It's important to note that the interface includes a series of methods that the <code>CLiteHTMLReader</code> invokes during the parsing operation. The reader passes the appropriate information to the method's parameters. To perform some type of processing for a method, you simply add code to the method in your own <code>ILiteHTMLReaderEvents</code> implementation.
|
||
</p>
|
||
|
||
|
||
<p>
|
||
The common parameters received by all of the methods defined in <code>ILiteHTMLReaderEvents</code> class, except <code>EndParse</code> include:<br>
|
||
</p><ul>
|
||
<li><code>dwAppData</code>: A 32-bit application-specific data.</li>
|
||
<li><code>bAbort</code>: You can set this parameter to either <code lang="c++"><span class="code-keyword">true</span></code> or <code lang="c++"><span class="code-keyword">false</span></code> according to your application's needs to specify whether the reader should continue parsing rest of the data in the buffer or aborts immediately after the current event handler completes processing.</li>
|
||
</ul>
|
||
<p></p>
|
||
|
||
|
||
<p>
|
||
The <code>EndParse</code> method receives <code>bIsAborted</code> parameter instead of the <code>bAbort</code> that signifies if <code>EndParse</code> has occured because of the normal parsing termination.
|
||
</p>
|
||
|
||
|
||
<p>
|
||
Along with the above-specified parameters, all of the methods except <code>BeginParse</code> and <code>EndParse</code>, receive some extra information (specific to the event) which is retrieved by the reader while parsing the HTML document. For instance, when an HTML tag (either opening or closing) is parsed, the <code>StartTag</code> or <code>EndTag</code> methods receive a pointer to a <code>CLiteHTMLTag</code> that contains the name of the tag and the attributes (if any) of the tag. Attribute information is retrieved only if the tag parsed is an opening tag as closing tags cannot contain any attribute/value pairs. If there is no attribute information associated with a <code>CLiteHTMLTag</code>, the pointer variable contains <code lang="c++">NULL</code>. So it is obvious that <code>EndTag</code> method always receives a <code lang="c++">NULL</code> pointer. It is the responsibility of an application (and a good programming practice) to check for <code lang="c++">NULL</code> pointer before using it.
|
||
</p>
|
||
|
||
|
||
<p>
|
||
Similarly, the <code>Comment</code> and <code>Characters</code> method of the class receives a reference to a <code>CString</code> containing the extracted text. The <code>Comment</code> method receives <code>rComment</code> parameter containing the comment text excluding the delimeters i.e. without <code><span class="code-keyword"><!--</span><span class="code-keyword"></span></code> and <code>--<span class="code-keyword">></span></code>. The <code>Characters</code> method receives a <code>rText</code> parameter that signifies either the contents of an element or some text that could not be parsed by the reader.
|
||
</p>
|
||
|
||
|
||
<a name="ClassView"><h2>Class View</h2></a>
|
||
<blockquote>
|
||
<p>
|
||
<b>CLiteHTMLReader Class Members</b><br><br>
|
||
|
||
</p><table width="90%" border="1" cellpadding="0" cellspacing="0">
|
||
|
||
<tbody><tr>
|
||
<th align="left" valign="top" width="50%">Member</th>
|
||
<th align="left" valign="top" width="50%">Description</th>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CLiteHTMLReader()</code></td>
|
||
<td align="left" valign="top" width="50%">Constructs a <code>CLiteHTMLReader</code> object.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">EventMaskEnum setEventMask(DWORD);</code></td>
|
||
<td align="left" valign="top" width="50%">Sets a new event mask.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">EventMaskEnum setEventMask(DWORD, DWORD);</code></td>
|
||
<td align="left" valign="top" width="50%">Changes the current event mask by adding and/or removing flags.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">EventMaskEnum getEventMask(<span class="code-keyword">void</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns the event mask previously set by a call to <code>setEventMask</code>.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">DWORD setAppData(DWORD);</code></td>
|
||
<td align="left" valign="top" width="50%">Sets application-specific data to be passed to event handlers.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">DWORD getAppData(<span class="code-keyword">void</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns app-specific data previously set by a call to <code>setAppData</code>.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code>ILiteHTMLReaderEvents* setEventHandler(ILiteHTMLReaderEvents*);</code></td>
|
||
<td align="left" valign="top" width="50%">Registers an event handler with the reader.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code>ILiteHTMLReaderEvents* getEventHandler(<span class="code-keyword">void</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns the currently associated event handler.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code>UINT Read(LPCTSTR);</code></td>
|
||
<td align="left" valign="top" width="50%">Parses an HTML document from the specified string.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code>UINT Read(HANDLE);</code></td>
|
||
<td align="left" valign="top" width="50%">Parses an HTML document from a file given its HANDLE.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
|
||
</tbody></table>
|
||
|
||
<p></p>
|
||
|
||
|
||
<p>
|
||
<b>CLiteHTMLTag Class Members</b><br><br>
|
||
|
||
</p><table width="90%" border="1" cellpadding="0" cellspacing="0">
|
||
|
||
<tbody><tr>
|
||
<th align="left" valign="top" width="50%">Member</th>
|
||
<th align="left" valign="top" width="50%">Description</th>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CLiteHTMLTag()</code></td>
|
||
<td align="left" valign="top" width="50%">Constructs a <code>CLiteHTMLTag</code> object.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CLiteHTMLTag(CLiteHTMLTag&, <span class="code-keyword">bool</span>)</code></td>
|
||
<td align="left" valign="top" width="50%">Constructs a <code>CLiteHTMLTag</code> object from an existing instance. The first parameter is the reference to a source <code>CLiteHTMLTag</code>, and the second parameter determines whether to make a copy or to take ownership of the encapsulated <code>CLiteHTMLAttributes</code> pointer.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">~CLiteHTMLTag()</code></td>
|
||
<td align="left" valign="top" width="50%">Destroys a <code>CLiteHTMLTag</code> object.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CString getTagName(<span class="code-keyword">void</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns the name of the tag.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">const</span> CLiteHTMLAttributes* getAttributes(<span class="code-keyword">void</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns a pointer to an attribute collection associated with this <code>CLiteHTMLTag</code>.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">UINT parseFromStr(LPCTSTR, bool&, bool&, <span class="code-keyword">bool</span>);</code></td>
|
||
<td align="left" valign="top" width="50%">Parses an HTML tag from the string specified by the first parameter. The second and third parameter receive a boolean true/false indicating that the tag parsed is an opening and/or closing tag, respectively. The fourth parameter specifies whether to parse tag's attributes also.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
|
||
</tbody></table>
|
||
|
||
<p></p>
|
||
|
||
|
||
<p>
|
||
<b>CLiteHTMLAttributes Class Members</b><br><br>
|
||
|
||
</p><table width="90%" border="1" cellpadding="0" cellspacing="0">
|
||
|
||
<tbody><tr>
|
||
<th align="left" valign="top" width="50%">Member</th>
|
||
<th align="left" valign="top" width="50%">Description</th>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CLiteHTMLAttributes()</code></td>
|
||
<td align="left" valign="top" width="50%">Constructs a <code>CLiteHTMLAttributes</code> object.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CLiteHTMLAttributes(CLiteHTMLAttributes&, <span class="code-keyword">bool</span>)</code></td>
|
||
<td align="left" valign="top" width="50%">Constructs a <code>CLiteHTMLAttributes</code> object from an existing instance. The first parameter is the reference to a source <code>CLiteHTMLAttributes</code>, and the second parameter determines whether to make a copy or to take ownership of the encapsulated pointer.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">~CLiteHTMLAttributes()</code></td>
|
||
<td align="left" valign="top" width="50%">Destroys a <code>CLiteHTMLAttributes</code> object.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">int</span> getCount() <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns the count of <code>CLiteHTMLElemAttr</code> items.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">int</span> getIndexFromName(LPCTSTR) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Looks up the index of an attribute given its name.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CLiteHTMLElemAttr <span class="code-keyword">operator</span>[](<span class="code-keyword">int</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns a <code>CLiteHTMLElemAttr</code> object given an attribute's index.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CLiteHTMLElemAttr getAttribute(<span class="code-keyword">int</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns a <code>CLiteHTMLElemAttr</code> object given an attribute's index.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CLiteHTMLElemAttr <span class="code-keyword">operator</span>[](LPCTSTR) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns a <code>CLiteHTMLElemAttr</code> object given an attribute name.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CLiteHTMLElemAttr getAttribute(LPCTSTR) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns a <code>CLiteHTMLElemAttr</code> object given an attribute name.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CString getName(<span class="code-keyword">int</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns the name of an attribute given its index.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CString getValue(<span class="code-keyword">int</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns the value of an attribute given its index.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CString getValueFromName(LPCTSTR) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns the value of an attribute given its name.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CLiteHTMLElemAttr* addAttribute(LPCTSTR, LPCTSTR);</code></td>
|
||
<td align="left" valign="top" width="50%">Adds a new <code>CLiteHTMLElemAttr</code> item to the collection.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">bool</span> removeAttribute(<span class="code-keyword">int</span>);</code></td>
|
||
<td align="left" valign="top" width="50%">Removes an <code>CLiteHTMLElemAttr</code> item from the collection.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">bool</span> removeAll(<span class="code-keyword">void</span>);</code></td>
|
||
<td align="left" valign="top" width="50%">Removes all <code>CLiteHTMLElemAttr</code> items from the collection.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">UINT parseFromStr(LPCTSTR);</code></td>
|
||
<td align="left" valign="top" width="50%">Parses attribute/value pairs from the given string.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
|
||
</tbody></table>
|
||
|
||
<p></p>
|
||
|
||
|
||
<p>
|
||
<b>CLiteHTMLElemAttr Class Members</b><br><br>
|
||
|
||
</p><table width="90%" border="1" cellpadding="0" cellspacing="0">
|
||
|
||
<tbody><tr>
|
||
<th align="left" valign="top" width="50%">Member</th>
|
||
<th align="left" valign="top" width="50%">Description</th>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CString getName(<span class="code-keyword">void</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns the name of an <code>CLiteHTMLElemAttr</code>.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CString getValue(<span class="code-keyword">void</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns the value of an <code>CLiteHTMLElemAttr</code>.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">bool</span> isColorValue(<span class="code-keyword">void</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Determines if the attribute value contains a color reference.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">bool</span> isNamedColorValue(<span class="code-keyword">void</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Determines if the attribute value is a named color value.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">bool</span> isSysColorValue(<span class="code-keyword">void</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Determines if the attribute value is a named system color value.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">bool</span> isHexColorValue(<span class="code-keyword">void</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Determines if the attribute value is a color value in hexadecimal format.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">bool</span> isPercentValue(<span class="code-keyword">void</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Checks to see if the attribute contains a percent value.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">COLORREF getColorValue(<span class="code-keyword">void</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns the color value of the attribute.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">CString getColorHexValue(<span class="code-keyword">void</span>) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns the RGB value of the attribute in hexadecimal format.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">unsigned</span> <span class="code-keyword">short</span> getPercentValue() <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns a percent value of the attribute.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">short</span> getLengthValue(LengthUnitsEnum&) <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns a length value of the attribute.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">operator</span> <span class="code-keyword">bool</span>() <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Converts attribute value to <code lang="c++"><span class="code-keyword">bool</span></code>.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">operator</span> <span class="code-SDKkeyword">BYTE</span>() <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Converts attribute value to <code><span class="code-SDKkeyword">BYTE</span></code> (<code lang="c++"><span class="code-keyword">unsigned</span> <span class="code-keyword">char</span></code>).</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">operator</span> <span class="code-keyword">double</span>() <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Converts attribute value to <code lang="c++"><span class="code-keyword">double</span></code>.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">operator</span> <span class="code-keyword">short</span>() <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Converts attribute value to <code lang="c++"><span class="code-keyword">signed</span> <span class="code-keyword">short</span> <span class="code-keyword">int</span></code>.</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++"><span class="code-keyword">operator</span> LPCTSTR() <span class="code-keyword">const</span>;</code></td>
|
||
<td align="left" valign="top" width="50%">Returns the value of the attribute.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"><code lang="c++">UINT parseFromStr(LPCTSTR);</code></td>
|
||
<td align="left" valign="top" width="50%">Parses an attribute/value pair from the given string.</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
<td align="left" valign="top" width="50%"> </td>
|
||
</tr>
|
||
|
||
</tbody></table>
|
||
<p></p>
|
||
|
||
|
||
</blockquote>
|
||
|
||
<a name="License"><h2>License</h2></a>
|
||
<blockquote>
|
||
<i>
|
||
<p>This code may be used in compiled form in any way you desire (including commercial use). The code may be redistributed unmodified by any means <b>providing</b> it is not sold for profit without the authors written consent, and providing that this notice and the authors name and all copyright notices remains intact. However, this file and the accompanying source code <b>may not</b> be hosted on a website or bulletin board without the authors written permission.</p>
|
||
|
||
<p><b>This software is provided "AS IS" without express or implied warranty. The author accepts no liability for any damage/loss of business that this product may cause. Use it at your own risk!</b></p>
|
||
|
||
</i>
|
||
</blockquote>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
<!-- Article Text End -->
|
||
|
||
|
||
|
||
<h2>License</h2>
|
||
<div id="LicenseTerms"><p>This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.</p><p>A list of licenses authors might use can be found <a href="http://www.codeproject.com/info/Licenses.aspx">here</a></p></div>
|
||
|
||
|
||
|
||
|
||
|
||
<h2 id="ctl00_AboutHeading">About the Author</h2>
|
||
|
||
<div class="float-right">
|
||
<div class="lqm_ad" lqm_publisher="lqm.codeproject.site" lqm_zone="77" lqm_format="300x250" lqm_country="RU" lqm_tags="VC6,Windows,Visual-Studio,MFC,Dev,Intermediate"><iframe id="lqmad2" width="300" height="250" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe></div>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<table cellpadding="0" cellspacing="5" border="0">
|
||
<tbody><tr valign="top">
|
||
<td id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberPhotoTable" valign="top" style="width:155px;">
|
||
<b><a id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberProfileLink" href="http://www.codeproject.com/Members/gUrM33T"><font color="maroon">gUrM33T</font></a></b><br><br>
|
||
<center><img id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberPhoto" src="./HTML Reader C++ Class Library - CodeProject_files/{DE88D139-2BDC-4852-AA40-7D613E9F19E7}.gif" style="border-width:0px;"></center>
|
||
|
||
<div class="small-text">
|
||
<span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberJobTitle">Software Developer</span><br>
|
||
<span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberCompany"></span><br>
|
||
<span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberLocation"><img src="./HTML Reader C++ Class Library - CodeProject_files/CA.gif" alt="Canada" width="16px" height="11px"> Canada</span><br>
|
||
<br>
|
||
<span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberType">Member</span><br>
|
||
|
||
|
||
|
||
</div>
|
||
</td>
|
||
|
||
<td>
|
||
<br>
|
||
</td>
|
||
</tr>
|
||
</tbody></table><br>
|
||
|
||
|
||
|
||
<div class="clearfix"></div>
|
||
|
||
|
||
<div id="ctl00_RateArticleRow" class="clearfix voting-bar">
|
||
<div class="float-left" style="padding-top:8px"><a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#_articleTop">Article Top</a></div>
|
||
<div class="float-right align-right">
|
||
<div id="ctl00_RateArticle_RateItemWrapper" class="small-text" name="RateItem_6561">
|
||
|
||
<table width="100%" cellpadding="0" cellspacing="0" class="small-text">
|
||
<tbody><tr>
|
||
<td id="ctl00_RateArticle_VoteResultDiv" nowrap="nowrap" align="right">
|
||
<span class="voteRes"></span>
|
||
<img class="loaderImg" width="16px" alt="loading..." height="16px" src="./HTML Reader C++ Class Library - CodeProject_files/ajax-loader.gif" style="display:none;">
|
||
</td>
|
||
|
||
|
||
<td class="voteTbl" style="white-space:nowrap" align="right">
|
||
<table class="small-text">
|
||
<tbody><tr class="">
|
||
|
||
<td id="ctl00_RateArticle_RateText" style="padding-right:5px;white-space:nowrap">
|
||
<i><b>Rate this article for us!</b></i>
|
||
</td>
|
||
|
||
<td id="ctl00_RateArticle_StartForm" align="right" nowrap="nowrap">
|
||
<i> Poor</i>
|
||
</td>
|
||
|
||
<td id="ctl00_RateArticle_VoteFormDiv" style="white-space:nowrap" align="left">
|
||
<span id="ctl00_RateArticle_VoteRBL" class="radio"><input id="ctl00_RateArticle_VoteRBL_0" type="radio" name="ctl00$RateArticle$VoteRBL" value="1" onclick="ChkRtctl00_RateArticle(1, 6561);
|
||
$('#ctl00_RateArticle_RCD').show();
|
||
;"><input id="ctl00_RateArticle_VoteRBL_1" type="radio" name="ctl00$RateArticle$VoteRBL" value="2" onclick="ChkRtctl00_RateArticle(2, 6561);
|
||
$('#ctl00_RateArticle_RCD').show();
|
||
;"><input id="ctl00_RateArticle_VoteRBL_2" type="radio" name="ctl00$RateArticle$VoteRBL" value="3" onclick="ChkRtctl00_RateArticle(3, 6561);
|
||
$('#ctl00_RateArticle_RCD').show();
|
||
;"><input id="ctl00_RateArticle_VoteRBL_3" type="radio" name="ctl00$RateArticle$VoteRBL" value="4" onclick="ChkRtctl00_RateArticle(4, 6561);
|
||
$('#ctl00_RateArticle_RCD').show();
|
||
;"><input id="ctl00_RateArticle_VoteRBL_4" type="radio" name="ctl00$RateArticle$VoteRBL" value="5" onclick="ChkRtctl00_RateArticle(5, 6561);
|
||
$('#ctl00_RateArticle_RCD').show();
|
||
;"></span>
|
||
</td>
|
||
|
||
<td id="ctl00_RateArticle_EndForm" align="left">
|
||
<i>Excellent</i>
|
||
</td>
|
||
|
||
<td id="ctl00_RateArticle_VoteBtn">
|
||
<input type="submit" name="ctl00$RateArticle$SubmitRateBtn" value="Vote" onclick="return rateItem(6561,2,1,true,true,3);" id="ctl00_RateArticle_SubmitRateBtn" class="button">
|
||
</td>
|
||
|
||
</tr>
|
||
</tbody></table>
|
||
<span id="ctl00_RateArticle_ErrorMessage" class="error"></span>
|
||
</td>
|
||
</tr>
|
||
</tbody></table>
|
||
<div class="hover-container">
|
||
<div id="ctl00_RateArticle_RCD" class="rating-comment align-left float-right">
|
||
Add a reason or comment to your vote: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" id="clear-rate_ctl00_RateArticle_RCD" title="close">x</a><br>
|
||
<textarea class="RateComment" rows="5" cols="60" style="width:98%;"></textarea>
|
||
<span id="ctl00_RateArticle_CommentReq" class="subdue">Votes of 3 or less require a comment</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</form>
|
||
|
||
|
||
<div style="margin:auto;padding:0px 10px;white-space:nowrap;overflow:hidden;width:468px;height:60px">
|
||
<div class="lqm_ad" lqm_publisher="lqm.codeproject.site" lqm_zone="77" lqm_format="468x60" lqm_country="RU" lqm_tags="VC6,Windows,Visual-Studio,MFC,Dev,Intermediate"><iframe id="lqmad3" width="468" height="60" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe></div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<h2>Comments and Discussions</h2>
|
||
<a name="_comments" id="_comments"> </a><div id="_MessageBoard" onclick="return SwitchMessage(event, null)">
|
||
<table id="ForumTable" class="box forum" cellpadding="0" cellspacing="0">
|
||
<tbody><tr>
|
||
<td><table width="100%" border="0" cellpadding="3px" cellspacing="0">
|
||
<tbody><tr class="forum-header1">
|
||
<td style="white-space:nowrap;"><img src="./HTML Reader C++ Class Library - CodeProject_files/info-16.gif" alt="FAQ" style="border-width:0;width:16px;height:16px;vertical-align:middle;"> <a href="http://www.codeproject.com/KB/FAQs/MessageBoardsFAQ.aspx"><b>FAQ</b></a> </td><td colspan="2" style="white-space:nowrap;text-align:right;"><form action="http://www.codeproject.com/Search.aspx?fid=0" method="get" style="margin:0;padding:0;">
|
||
<input type="hidden" name="fid" value="36732"><input type="text" class="Frm_Input" name="qf"> <input type="submit" value="Search" class="button">
|
||
</form></td>
|
||
</tr><tr class="forum-header2">
|
||
<td colspan="3" style="width:100%;"><div style="text-align:right;">
|
||
<form action="http://www.codeproject.com/script/Forums/SetOptions.aspx?floc=%2fKB%2flibrary%2fGomzyHTMLReader.aspx&fid=36732&df=90&mpp=25&noise=3&prof=True&sort=Position&view=Quick&select=1308222&fr=1" method="get" style="margin:0;padding:0;">
|
||
<input type="hidden" name="fid" value="36732"><input type="hidden" name="currentQS" value="?floc=%2fKB%2flibrary%2fGomzyHTMLReader.aspx&fid=36732&df=90&mpp=25&noise=3&prof=True&sort=Position&view=Quick&select=1308222&fr=1"><input type="hidden" name="floc" value="/KB/library/GomzyHTMLReader.aspx"><input type="checkbox" checked="checked" name="prof" id="prof" style="vertical-align:middle;"><label for="prof">Profile popups</label> Noise level<select size="1" class="Frm_DropDown" name="noise">
|
||
<option value="1">Very High</option><option value="2">High</option><option selected="" value="3">Medium</option><option value="4">Low</option><option value="5">Very Low</option>
|
||
</select> Layout<select size="1" class="Frm_DropDown" name="view">
|
||
<option selected="" value="Quick">Normal</option><option value="Topic">Expand Posts only</option><option value="Expanded">Expand Posts & Replies</option><option value="Thread">Thread View</option><option value="Normal">No Javascript</option><option value="Preview">No JS + Preview</option>
|
||
</select> Per page<select size="1" class="Frm_DropDown" name="mpp">
|
||
<option value="10">10</option><option selected="" value="25">25</option><option value="50">50</option>
|
||
</select> <input type="submit" value="Update" name="SetOpt" class="button">
|
||
</form>
|
||
</div></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr>
|
||
<td><a name="xx0xx"></a><table border="0" cellpadding="2px" cellspacing="0" width="100%">
|
||
<tbody><tr class="forum-navbar">
|
||
<td><img src="./HTML Reader C++ Class Library - CodeProject_files/forum_newmsg.gif" alt="new" width="16px" height="16px" border="0" align="top"><a href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&floc=/KB/library/GomzyHTMLReader.aspx" class="toolbar" name="Frm_HoverNL" title="Create a new message thread" target="_top"><b>New Message</b></a></td><td> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&noise=3&prof=True&sort=Position&view=Quick&select=1308222&fr=1">Refresh</a></td><td style="text-align:right;white-space:nowrap;"><span class="subdue">First</span> <span class="subdue">Prev</span><a class="toolbar" name="Frm_HoverNL" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&noise=3&prof=True&sort=Position&view=Quick&select=1308222&fr=26#xx0xx">Next</a></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%" class="fixed-layout blank-background">
|
||
<tbody><tr>
|
||
<td><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="5px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F3305484_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx3305484xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" alt="General"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="3305484" parent="0" thread="3305484" href="http://www.codeproject.com/Messages/3305484/Regarding-using-HTML-PARSER.aspx">Regarding using HTML PARSER</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=5823937">rohitsahni83</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">11:56 16 Dec '09 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F3305484_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">Hi Gurmeet<br>
|
||
<br>
|
||
Have a ques for you like i am getting following errors :<br>
|
||
<br>
|
||
---------<br>
|
||
Error 2 error LNK2001: unresolved external symbol "protected: virtual unsigned int __thiscall CLiteHTMLReader::parseDocument(void)" (?parseDocument@CLiteHTMLReader@@MAEIXZ) Test_Proj.obj <br>
|
||
Error 3 error LNK2019: unresolved external symbol "public: unsigned int __thiscall CLiteHTMLReader::Read(char const *)" (?Read@CLiteHTMLReader@@QAEIPBD@Z) referenced in function _main Test_Proj.obj <br>
|
||
Error 4 error LNK2019: unresolved external symbol "private: static class CLiteHTMLEntityResolver::CCharEntityRefs CLiteHTMLEntityResolver::m_CharEntityRefs" (?m_CharEntityRefs@CLiteHTMLEntityResolver@@0VCCharEntityRefs@1@A) referenced in function "public: static unsigned int __cdecl CLiteHTMLEntityResolver::resolveEntity(char const *,char &)" (?resolveEntity@CLiteHTMLEntityResolver@@SAIPBDAAD@Z) Test_Proj.obj <br>
|
||
Error 5 error LNK2019: unresolved external symbol "private: static class CMap<class ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > >,char const *,unsigned long,unsigned long> CLiteHTMLElemAttr::_namedColors" (?_namedColors@CLiteHTMLElemAttr@@0V?$CMap@V?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@PBDKK@@A) referenced in function "private: static void __cdecl CLiteHTMLElemAttr::Init(void)" (?Init@CLiteHTMLElemAttr@@CAXXZ) Test_Proj.obj <br>
|
||
Error 6 fatal error LNK1120: 4 unresolved externals C:\Documents and Settings\rohit_sahni\My Documents\Visual Studio 2005\Projects\HTML_Reader\Debug\TestProject.exe <br>
|
||
---------<br>
|
||
<br>
|
||
while i tried to build the code.<br>
|
||
<br>
|
||
Can you please help.<br>
|
||
<br>
|
||
Thanks<br>
|
||
Ro..<br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=3305484&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=3305484&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=3305484" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/3305484/Regarding-using-HTML-PARSER.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=3305484&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF3305484" style="white-space:nowrap;">1.33/5 (3 votes) <script type="text/javascript">
|
||
MsgVFrm(5823937,3305484,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3305484xx" onclick="RateMsg(5823937, 3305484,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3305484xx" title="vote this message a 1" onclick="RateMsg(5823937, 3305484, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3305484xx" title="vote this message a 2" onclick="RateMsg(5823937, 3305484, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3305484xx" title="vote this message a 3" onclick="RateMsg(5823937, 3305484, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3305484xx" title="vote this message a 4" onclick="RateMsg(5823937, 3305484, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3305484xx" title="vote this message a 5" onclick="RateMsg(5823937, 3305484, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3305484xx" onclick="RateMsg(5823937, 3305484,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="root msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F3086863_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx3086863xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" alt="General"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="3086863" parent="0" thread="3086863" href="http://www.codeproject.com/Messages/3086863/Example-Tutorial-step-by-step-Help.aspx">Example, Tutorial - step by step, Help!</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=400759">Dansveen</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">23:05 18 Jun '09 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F3086863_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">Hi, I try use Html Reader but there is no example , tutorial or test in source files; How to use and implement a single html parse to extract specific data? Can you help me?<br>
|
||
<br>
|
||
thank you<br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=3086863&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=3086863&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=3086863" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/3086863/Example-Tutorial-step-by-step-Help.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=3086863&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF3086863" style="white-space:nowrap;">1.56/5 (26 votes) <script type="text/javascript">
|
||
MsgVFrm(400759,3086863,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3086863xx" onclick="RateMsg(400759, 3086863,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3086863xx" title="vote this message a 1" onclick="RateMsg(400759, 3086863, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3086863xx" title="vote this message a 2" onclick="RateMsg(400759, 3086863, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3086863xx" title="vote this message a 3" onclick="RateMsg(400759, 3086863, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3086863xx" title="vote this message a 4" onclick="RateMsg(400759, 3086863, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3086863xx" title="vote this message a 5" onclick="RateMsg(400759, 3086863, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3086863xx" onclick="RateMsg(400759, 3086863,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="root msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F2754467_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx2754467xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" alt="General"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="2754467" parent="0" thread="2754467" href="http://www.codeproject.com/Messages/2754467/stdafx-h.aspx">stdafx.h</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=3982899">bangan</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">14:48 7 Oct '08 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F2754467_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">stdafx.h Error: No such file or directory.<br>
|
||
Help me!<br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2754467&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2754467&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=2754467" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/2754467/stdafx-h.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=2754467&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF2754467" style="white-space:nowrap;">1.78/5 (9 votes) <script type="text/javascript">
|
||
MsgVFrm(3982899,2754467,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2754467xx" onclick="RateMsg(3982899, 2754467,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2754467xx" title="vote this message a 1" onclick="RateMsg(3982899, 2754467, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2754467xx" title="vote this message a 2" onclick="RateMsg(3982899, 2754467, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2754467xx" title="vote this message a 3" onclick="RateMsg(3982899, 2754467, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2754467xx" title="vote this message a 4" onclick="RateMsg(3982899, 2754467, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2754467xx" title="vote this message a 5" onclick="RateMsg(3982899, 2754467, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2754467xx" onclick="RateMsg(3982899, 2754467,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="root msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd Rt HdUnSel " id="F2685885_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx2685885xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" alt="General"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="2685885" parent="0" thread="2685885" href="http://www.codeproject.com/Messages/2685885/errors-C2679-with-Visual-Studio-2005.aspx">errors C2679 with Visual Studio 2005</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=2096537">MemoC73</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">11:35 20 Aug '08 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F2685885_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">Hi,<br>
|
||
<br>
|
||
I have downloaded your lib and added it to my MFC project. I get over 306 errors with code C2679 when I am compiling the project in Visual Studio 2005. They are all in the file LiteHTMLAttributes.h. The compiler have some problems with lines beginning with<br>
|
||
<pre>_namedColors[<span class="code-string">"</span><span class="code-string">something"</span>] = </pre>
|
||
It says: "error C2679: binary operator '[' : no operator found which takes a right-hand operand of type 'const char [13]' (or there is no acceptable conversion) "<br>
|
||
<br>
|
||
I get also some warnings of type C4244 in the file LiteHTMLEntityResolver.<br>
|
||
warning C4244: 'return' conversion from '__w64 int' to 'UINT', possible loss of data litehtmlentityresolver.h 229<br>
|
||
warning C4244: 'Argument' conversion from '__w64 int' to 'UINT', possible loss of data litehtmlentityresolver.h 236<br>
|
||
warning C4244: 'return' conversion from '__w64 int' to 'UINT', possible loss of data litehtmlentityresolver.h 280<br>
|
||
<br>
|
||
Please give me a solution for this warnings/errors and correct your code in the libs.<br>
|
||
<br>
|
||
Best regards<br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2685885&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2685885&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=2685885" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/2685885/errors-C2679-with-Visual-Studio-2005.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=2685885&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF2685885" style="white-space:nowrap;">3.33/5 (3 votes) <script type="text/javascript">
|
||
MsgVFrm(2096537,2685885,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2685885xx" onclick="RateMsg(2096537, 2685885,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2685885xx" title="vote this message a 1" onclick="RateMsg(2096537, 2685885, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2685885xx" title="vote this message a 2" onclick="RateMsg(2096537, 2685885, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2685885xx" title="vote this message a 3" onclick="RateMsg(2096537, 2685885, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2685885xx" title="vote this message a 4" onclick="RateMsg(2096537, 2685885, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2685885xx" title="vote this message a 5" onclick="RateMsg(2096537, 2685885, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2685885xx" onclick="RateMsg(2096537, 2685885,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote HdUnSel " id="F2753984_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="34px" class="Frm_MsgIndent"><a name="xx2753984xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" alt="General"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="2753984" parent="2685885" thread="2685885" href="http://www.codeproject.com/Messages/2753984/Re-errors-C2679-with-Visual-Studio-2005.aspx">Re: errors C2679 with Visual Studio 2005</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=1849471">DoZerg</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">6:43 7 Oct '08 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F2753984_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:34px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="34px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">please use:<br>
|
||
_namedColors[_T("something")] <br>
|
||
<br>
|
||
<div class="ForumSig">I think therefore I am. <br>
|
||
<br>
|
||
——Rene Descartes</div><br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2753984&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2753984&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=2685885" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/2753984/Re-errors-C2679-with-Visual-Studio-2005.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=2753984&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF2753984" style="white-space:nowrap;">2.00/5 (2 votes) <script type="text/javascript">
|
||
MsgVFrm(1849471,2753984,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2753984xx" onclick="RateMsg(1849471, 2753984,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2753984xx" title="vote this message a 1" onclick="RateMsg(1849471, 2753984, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2753984xx" title="vote this message a 2" onclick="RateMsg(1849471, 2753984, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2753984xx" title="vote this message a 3" onclick="RateMsg(1849471, 2753984, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2753984xx" title="vote this message a 4" onclick="RateMsg(1849471, 2753984, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2753984xx" title="vote this message a 5" onclick="RateMsg(1849471, 2753984, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2753984xx" onclick="RateMsg(1849471, 2753984,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd HdUnSel " id="F3656636_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="34px" class="Frm_MsgIndent"><a name="xx3656636xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" alt="General"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="3656636" parent="2685885" thread="2685885" href="http://www.codeproject.com/Messages/3656636/Re-errors-C2679-with-Visual-Studio-2005.aspx">Re: errors C2679 with Visual Studio 2005</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=7553400">marcos_gdp</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">20:01 4 Nov '10 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F3656636_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:34px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="34px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">CAST it like this _namedColors[(CString)"activeborder"]<br>
|
||
good luck<img src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up(1).gif" align="top" alt="Thumbs Up | :thumbsup:"> <br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=3656636&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=3656636&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=2685885" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/3656636/Re-errors-C2679-with-Visual-Studio-2005.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=3656636&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF3656636" style="white-space:nowrap;"><script type="text/javascript">
|
||
MsgVFrm(7553400,3656636,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3656636xx" onclick="RateMsg(7553400, 3656636,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3656636xx" title="vote this message a 1" onclick="RateMsg(7553400, 3656636, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3656636xx" title="vote this message a 2" onclick="RateMsg(7553400, 3656636, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3656636xx" title="vote this message a 3" onclick="RateMsg(7553400, 3656636, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3656636xx" title="vote this message a 4" onclick="RateMsg(7553400, 3656636, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3656636xx" title="vote this message a 5" onclick="RateMsg(7553400, 3656636, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx3656636xx" onclick="RateMsg(7553400, 3656636,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="root msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F2564606_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx2564606xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" alt="General"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="2564606" parent="0" thread="2564606" href="http://www.codeproject.com/Messages/2564606/one-bug.aspx">one bug</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=4378054">daoxiangcun</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">7:58 22 May '08 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F2564606_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2"><a href="http://www.google.com/"></a><br>
|
||
will not get the right attribut of the tag a because of "//"<br>
|
||
this bug occurs in the file LiteHTMLAttributes.h function parseFromStr<br>
|
||
please check it. <br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2564606&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2564606&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=2564606" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/2564606/one-bug.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=2564606&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF2564606" style="white-space:nowrap;">2.00/5 (2 votes) <script type="text/javascript">
|
||
MsgVFrm(4378054,2564606,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2564606xx" onclick="RateMsg(4378054, 2564606,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2564606xx" title="vote this message a 1" onclick="RateMsg(4378054, 2564606, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2564606xx" title="vote this message a 2" onclick="RateMsg(4378054, 2564606, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2564606xx" title="vote this message a 3" onclick="RateMsg(4378054, 2564606, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2564606xx" title="vote this message a 4" onclick="RateMsg(4378054, 2564606, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2564606xx" title="vote this message a 5" onclick="RateMsg(4378054, 2564606, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2564606xx" onclick="RateMsg(4378054, 2564606,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="root msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F2524983_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx2524983xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_news.gif" alt="News"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="2524983" parent="0" thread="2524983" href="http://www.codeproject.com/Messages/2524983/See-here-How-to-retrive-the-html-of-a-certain-tag.aspx">See here: How to retrive the html of a certain tag</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=33978">dchris_med</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">2:25 27 Apr '08 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F2524983_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">First you must apply my previous fixes in order to have a class which will work correctly with this code.<br>
|
||
<br>
|
||
This is a nice feature to have using this class; after few hours of researches I've find out a solution:<br>
|
||
<br>
|
||
suppose we need the tag <div class=myclass>, which lies deep inside a html page.<br>
|
||
<br>
|
||
1. we have to implement CEventHandler : public ILiteHTMLReaderEvents<br>
|
||
2. we must handle StartTag, EndTag notifications;<br>
|
||
3. we must have some variables inside this class to store the desired m_tagname, m_attrib, m_attrib_value;<br>
|
||
4. inside StartTag we receive notifications for each tag the parser finds; we consult the pTag ponter for tagname, value, valuename; if we find that tag, we init a bool bCanStartSearch = 1;<br>
|
||
<br>
|
||
<code>BOOL m_bCanStartSearch<br>
|
||
CString m_szTagStack;<br>
|
||
<pre>StartTag{...}{
|
||
<span class="code-keyword">if</span>(m_tagname==pTag-<span class="code-keyword">></span>getTagname&&attrib==m_attrib&&attribval==m_attrib_value){
|
||
StoreTagData(pTag);<span class="code-comment">//</span><span class="code-comment">save tag start/end pointers
|
||
</span> bCanStartSearch = <span class="code-digit">1</span>;
|
||
}
|
||
<span class="code-keyword">if</span>(bCanStartSearch){
|
||
m_szTagStack=<span class="code-string">"</span><span class="code-string">/"</span>+pTag-<span class="code-keyword">></span>getTagname+m_szTagStack
|
||
}</pre>
|
||
<br>
|
||
5.on EndTag if we started tracing we can delete tags added inside StartTag; we delete the tag from the begining of the string, if the deleted tag matches the last added one.<br>
|
||
<code><br>
|
||
BOOL m_bTagFoud = 0;<br>
|
||
<pre>EndTag(...)
|
||
{
|
||
CString szDeletedTag = <span class="code-string">"</span><span class="code-string">/"</span>+pTag-<span class="code-keyword">></span>getName()
|
||
<span class="code-keyword">if</span>(bCanStartSearch){
|
||
<span class="code-keyword">if</span>(m_szTagStack==szDeletedTag){
|
||
m_bTagFoud = <span class="code-digit">1</span>;
|
||
StoreTagData(pTag);
|
||
}
|
||
<span class="code-keyword">if</span>(m_szTagStack.Find(szDeletedTag)==0)
|
||
m_szTagStack = szTagStack.Right(m_szTagStack.GetLength()-szDeletedTag.GetLength())
|
||
}
|
||
|
||
}</pre>
|
||
<br>
|
||
6. we must handle some special situations for tags like <b><br></b> and <b><img></b> which gets added and never deleted with EndTag, because they don't have all the time the ending character like this <br<b>/</b>> for this I have added a small function inside ><b>CLiteHTMLTag</b><br>
|
||
<pre>BOOL IsTagInline(){ <span class="code-keyword">return</span> m_bIsInline;};</pre>
|
||
where <br>
|
||
<pre>m_bIsInline = bClosingTag&bOpeningTag; </pre>
|
||
is filled during tag parsing inside <b>CLiteHTMLTag::parseFromStr</b><br>
|
||
<br>
|
||
so add inside StartTag<br>
|
||
<br>
|
||
<pre><span class="code-keyword">if</span>(bCanStartSearch){
|
||
<span class="code-keyword">if</span>(pTag-<span class="code-keyword">></span>getTagName()==<span class="code-string">"</span><span class="code-string">br"</span>||pTag-<span class="code-keyword">></span>getTagName()==<span class="code-string">"</span><span class="code-string">img"</span>){
|
||
<span class="code-keyword">if</span>(pTag-<span class="code-keyword">></span>IsTagInline())
|
||
m_szTagStack=<span class="code-string">"</span><span class="code-string">/"</span>+pTag-<span class="code-keyword">></span>getTagname+m_szTagStack;
|
||
}
|
||
<span class="code-keyword">else</span>
|
||
m_szTagStack=<span class="code-string">"</span><span class="code-string">/"</span>+pTag-<span class="code-keyword">></span>getTagname+m_szTagStack;
|
||
}</pre>
|
||
<br>
|
||
perhaps there are more tags to handle in this way, or perhaps somebody finds another method for handling this <img src="./HTML Reader C++ Class Library - CodeProject_files/smiley_smile.gif" align="top" alt="Smile | :)"> <br>
|
||
<br>
|
||
7. the last thing is to handle the start, and end position for each tag <tagname> and <tagname/>; for this we must add 2 LPCSTR pointers inside CLiteHTMLTag which we will fill at parsing time;<br>
|
||
LPCSTR m_pTagStartPos,m_pTagEndPos, where m_pTagStartPos points to "<" and m_pTagEndPos to ">";<br>
|
||
at the end og CLiteHTMLTag::parseFromStr fill these vars<br>
|
||
<pre>m_pTagEndPos = lpszEnd;
|
||
m_pTagStartPos = lpszString;</pre>
|
||
and add 2 functions for easy access to this members... like <br>
|
||
<pre>GetTagStart(){ <span class="code-keyword">return</span> m_pTagStartPos;};</pre>
|
||
<br>
|
||
now we store start/end tag pointers inside<br>
|
||
<pre>StoreTagData(pTag)
|
||
{
|
||
<span class="code-comment">//</span><span class="code-comment">store end tag
|
||
</span> <span class="code-keyword">if</span>(m_bTagFoud){
|
||
m_endTagStart = pTag-<span class="code-keyword">></span>GetTagStart;
|
||
m_endTagEnd = pTag<span class="code-keyword">></span>GetTagEnd;
|
||
}
|
||
<span class="code-keyword">else</span>{
|
||
m_startTagStart = pTag-<span class="code-keyword">></span>GetTagStart;
|
||
m_startTagEnd = pTag-<span class="code-keyword">></span>etTagEnd;
|
||
}
|
||
}</pre>
|
||
<br>
|
||
finally we can define some functions inside our CEventHandler to retrive inner/outer html<br>
|
||
<br>
|
||
<pre>CString CEventHandler::get_outerHTML(){
|
||
CString szRet;
|
||
<span class="code-keyword">if</span>(!m_bEndTagFound){
|
||
<span class="code-keyword">return</span> <span class="code-string">"</span><span class="code-string">"</span>;
|
||
}
|
||
|
||
szRet = CString(m_startTagStart, m_startTagEnd - m_startTagStart);
|
||
|
||
<span class="code-keyword">return</span> szRet;
|
||
}</pre>
|
||
<br>
|
||
add youself get_innerHTML();<br>
|
||
<br>
|
||
using this code we can retrive html code for a given tagname, and we don't need mshtml leek generator anymore <img src="./HTML Reader C++ Class Library - CodeProject_files/smiley_laugh.gif" align="top" alt="Laugh | :laugh:"> <br></code></code></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2524983&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2524983&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=2524983" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/2524983/See-here-How-to-retrive-the-html-of-a-certain-tag.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=2524983&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF2524983" style="white-space:nowrap;">2.83/5 (6 votes) <script type="text/javascript">
|
||
MsgVFrm(33978,2524983,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524983xx" onclick="RateMsg(33978, 2524983,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524983xx" title="vote this message a 1" onclick="RateMsg(33978, 2524983, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524983xx" title="vote this message a 2" onclick="RateMsg(33978, 2524983, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524983xx" title="vote this message a 3" onclick="RateMsg(33978, 2524983, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524983xx" title="vote this message a 4" onclick="RateMsg(33978, 2524983, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524983xx" title="vote this message a 5" onclick="RateMsg(33978, 2524983, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524983xx" onclick="RateMsg(33978, 2524983,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="root msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F2524891_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx2524891xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_news.gif" alt="News"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="2524891" parent="0" thread="2524891" href="http://www.codeproject.com/Messages/2524891/Some-problems-fixes-modified.aspx">Some problems fixes [modified]</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=33978">dchris_med</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">0:44 27 Apr '08 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F2524891_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">There is a problem with this class, it doesn't handle correctly the following situation: </tagname > or <tagname >, when more spaces are found after the tagname; to fix this, inside CLiteHTMLTag::parseFromStr, add:<br>
|
||
<br>
|
||
<code> //fix: rem white spaces till the end </tagname > or <tagname ><br>
|
||
<pre> while (::_istspace(*lpszEnd))
|
||
lpszEnd = ::_tcsinc(lpszEnd);
|
||
|
||
// is this a closing tag?
|
||
if (bClosingTag)</pre>also this class will fail to parse correctly html which has <script> inside, because of the fact that inside the scripts we can have following situation: document.write "<div>"); document.write("</" + "div>"); this will fool the tokenizer, which won't be able to find the end of the <div> tag; to fix this we need to skip processing for script elements. to fix this in CLiteHTMLReader::parseDocument add:<br>
|
||
<code>CLiteHTMLTag oTag; // tag information<br>
|
||
<pre>bool bInsideScript = 0;</pre>and few lines down<br>
|
||
<pre>if (!parseComment(strComment))
|
||
{
|
||
bIsOpeningTag = false;
|
||
bIsClosingTag = false;
|
||
if (!parseTag(oTag, bIsOpeningTag, bIsClosingTag, bInsideScript))
|
||
{
|
||
++dwCharDataLen;
|
||
// manually advance buffer position
|
||
// because the last call to UngetChar()
|
||
// moved it back one character
|
||
ch = ReadChar();
|
||
|
||
break;
|
||
}
|
||
else
|
||
{
|
||
//WE ENTER IN SCRIPT MODE
|
||
if(bIsOpeningTag&&!bInsideScript){
|
||
if(!oTag.getTagName().CompareNoCase("script"))
|
||
if(!oTag.IsTagInline())
|
||
bInsideScript = 1;
|
||
}
|
||
if(bIsClosingTag&&bInsideScript){
|
||
if(!oTag.getTagName().CompareNoCase("script"))
|
||
bInsideScript = 0;
|
||
}
|
||
}
|
||
</pre>}<br>
|
||
</code>change also the definitions adding the param bInsideScript for<br>
|
||
<pre>CLiteHTMLReader::parseTag(CLiteHTMLTag &rTag, <span class="code-keyword">bool</span> &bIsOpeningTag, <span class="code-keyword">bool</span> &bIsClosingTag,<span class="code-keyword">bool</span> &bIsInsideScript)</pre>and <br>
|
||
<pre><span class="code-keyword">inline</span> UINT CLiteHTMLTag::parseFromStr(LPCTSTR lpszString, <span class="code-keyword">bool</span> &bIsOpeningTag,<span class="code-keyword">bool</span> &bIsClosingTag,<span class="code-keyword">bool</span> &bIsInsideScript,<span class="code-keyword">bool</span> bParseAttrib <span class="code-comment">/*</span><span class="code-comment"> = true */</span>)</pre>
|
||
go and add inside CLiteHTMLTag::parseFromStr just where we've added the first mod:<br>
|
||
<pre><span class="code-comment">//</span><span class="code-comment">if is any other other than /script
|
||
</span> <span class="code-keyword">if</span>(bIsInsideScript){
|
||
<span class="code-keyword">if</span> (!bClosingTag)
|
||
<span class="code-keyword">return</span> 0U;
|
||
<span class="code-keyword">if</span>(strTagName.CompareNoCase(<span class="code-string">"</span><span class="code-string">script"</span>))
|
||
<span class="code-keyword">return</span> 0U;
|
||
}
|
||
|
||
<span class="code-comment">//</span><span class="code-comment">fix: rem white spaces till end </tagname > or <tagname >
|
||
</span> <span class="code-keyword">while</span> (::_istspace(*lpszEnd))
|
||
lpszEnd = ::_tcsinc(lpszEnd);
|
||
|
||
<span class="code-comment">//</span><span class="code-comment"> is this a closing tag?
|
||
</span> <span class="code-keyword">if</span> (bClosingTag)
|
||
{</pre>
|
||
oTag.getTagName() is defined like this <br>
|
||
<code>BOOL IsTagInline(){ return m_bIsInline;};</code><pre><span class="code-keyword">inline</span> UINT CLiteHTMLTag::parseFromStr(LPCTSTR lpszString,<span class="code-keyword">bool</span> &bIsOpeningTag,<span class="code-keyword">bool</span> &bIsClosingTag,<span class="code-keyword">bool</span> &bIsInsideScript,<span class="code-keyword">bool</span> bParseAttrib <span class="code-comment">/*</span><span class="code-comment"> = true */</span>)
|
||
{
|
||
....
|
||
m_bIsInline = bClosingTag&bOpeningTag;
|
||
<span class="code-keyword">return</span> (nRetVal);
|
||
}</pre>
|
||
with this fixes we can parse correctly html files which have scripts inside.<br>
|
||
<br>
|
||
this code helped me to get read of the mshtml parser which is in fact a mem leak generator; i had it used inside one of my software eZWeather, and constantly this mshtml working with a complex html page, increased the size of the program in mem with each hour, no matter of any tricks I have used (see <a href="http://www.codeproject.com/KB/IP/parse_html.aspx"></a><a href=""></a>[<a href="http://www.codeproject.com/KB/IP/parse_html.aspx" target="_blank" title="New Window">^</a>]here my comments) </div> <br>
|
||
<br>
|
||
<div class="ForumMod">modified on Saturday, April 26, 2008 6:43 PM</div></script><br></code></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2524891&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2524891&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=2524891" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/2524891/Some-problems-fixes-modified.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=2524891&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF2524891" style="white-space:nowrap;">2.00/5 (2 votes) <script type="text/javascript">
|
||
MsgVFrm(33978,2524891,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524891xx" onclick="RateMsg(33978, 2524891,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524891xx" title="vote this message a 1" onclick="RateMsg(33978, 2524891, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524891xx" title="vote this message a 2" onclick="RateMsg(33978, 2524891, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524891xx" title="vote this message a 3" onclick="RateMsg(33978, 2524891, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524891xx" title="vote this message a 4" onclick="RateMsg(33978, 2524891, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524891xx" title="vote this message a 5" onclick="RateMsg(33978, 2524891, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524891xx" onclick="RateMsg(33978, 2524891,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="root msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F2268677_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx2268677xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_question.gif" alt="Question"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="2268677" parent="0" thread="2268677" href="http://www.codeproject.com/Messages/2268677/Thanks-and-a-question.aspx">Thanks and a question</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=4596377">sumitmodi</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">14:55 12 Oct '07 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F2268677_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">Hi,<br>
|
||
Thanks for making such a good parser.<br>
|
||
This parser uses MFC libraries which makes it platform dependent. <br>
|
||
Do you have any parser which is platform independent.<br>
|
||
If yes, could u please send me the code.<br>
|
||
<br>
|
||
Secondly, Can i have the permission to modify your code for commercial use as per my need,<br>
|
||
<br>
|
||
Thanks in advance.<br>
|
||
<br>
|
||
<br>
|
||
With Regards,<br>
|
||
Sumit Modi<br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2268677&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2268677&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=2268677" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/2268677/Thanks-and-a-question.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=2268677&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF2268677" style="white-space:nowrap;">2.33/5 (3 votes) <script type="text/javascript">
|
||
MsgVFrm(4596377,2268677,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2268677xx" onclick="RateMsg(4596377, 2268677,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2268677xx" title="vote this message a 1" onclick="RateMsg(4596377, 2268677, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2268677xx" title="vote this message a 2" onclick="RateMsg(4596377, 2268677, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2268677xx" title="vote this message a 3" onclick="RateMsg(4596377, 2268677, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2268677xx" title="vote this message a 4" onclick="RateMsg(4596377, 2268677, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2268677xx" title="vote this message a 5" onclick="RateMsg(4596377, 2268677, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2268677xx" onclick="RateMsg(4596377, 2268677,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="root msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F1760329_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx1760329xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_question.gif" alt="Question"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="1760329" parent="0" thread="1760329" href="http://www.codeproject.com/Messages/1760329/how-to-use-link-error.aspx">how to use (link error )</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=872681">9999kkk</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">13:02 16 Nov '06 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F1760329_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">class CEventHandler : public ILiteHTMLReaderEvents<br>
|
||
{<br>
|
||
private:<br>
|
||
void BeginParse(DWORD dwAppData, bool &bAbort);<br>
|
||
void StartTag(CLiteHTMLTag *pTag, DWORD dwAppData, bool &bAbort);<br>
|
||
void EndTag(CLiteHTMLTag *pTag, DWORD dwAppData, bool &bAbort);<br>
|
||
void Characters(const CString &rText, DWORD dwAppData, bool &bAbort);<br>
|
||
void Comment(const CString &rComment, DWORD dwAppData, bool &bAbort);<br>
|
||
void EndParse(DWORD dwAppData, bool bIsAborted);<br>
|
||
};<br>
|
||
<br>
|
||
int main(int argc, char* argv[])<br>
|
||
{<br>
|
||
CEventHandler theEventHandler;<br>
|
||
CLiteHTMLReader theReader;<br>
|
||
theReader.setEventHandler(&theEventHandler);<br>
|
||
}<br>
|
||
<br>
|
||
I tried step 4 and found error <br>
|
||
<br>
|
||
can you explain how to fix this error ?<br>
|
||
<br>
|
||
<br>
|
||
error LNK2001: unresolved external symbol "private: virtual void __thiscall CEventHandler::EndParse(unsigned long,bool)" (?EndParse@CEventHandler@@EAEXK_N@Z)<br>
|
||
<br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1760329&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1760329&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=1760329" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/1760329/how-to-use-link-error.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1760329&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF1760329" style="white-space:nowrap;">1.40/5 (6 votes) <script type="text/javascript">
|
||
MsgVFrm(872681,1760329,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1760329xx" onclick="RateMsg(872681, 1760329,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1760329xx" title="vote this message a 1" onclick="RateMsg(872681, 1760329, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1760329xx" title="vote this message a 2" onclick="RateMsg(872681, 1760329, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1760329xx" title="vote this message a 3" onclick="RateMsg(872681, 1760329, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1760329xx" title="vote this message a 4" onclick="RateMsg(872681, 1760329, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1760329xx" title="vote this message a 5" onclick="RateMsg(872681, 1760329, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1760329xx" onclick="RateMsg(872681, 1760329,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote HdUnSel " id="F1795765_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="34px" class="Frm_MsgIndent"><a name="xx1795765xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_answer.gif" alt="Answer"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="1795765" parent="1760329" thread="1760329" href="http://www.codeproject.com/Messages/1795765/Re-how-to-use-link-error.aspx">Re: how to use (link error )</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=2058002">MaIron-cool</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">18:28 8 Dec '06 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F1795765_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:34px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="34px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">I have same problem to. <img src="./HTML Reader C++ Class Library - CodeProject_files/smiley_frown.gif" align="top" alt="Frown | :("> I don’t understand how this works <img src="./HTML Reader C++ Class Library - CodeProject_files/smiley_frown.gif" align="top" alt="Frown | :("> <br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1795765&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1795765&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=1760329" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/1795765/Re-how-to-use-link-error.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1795765&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF1795765" style="white-space:nowrap;">2.00/5 (4 votes) <script type="text/javascript">
|
||
MsgVFrm(2058002,1795765,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1795765xx" onclick="RateMsg(2058002, 1795765,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1795765xx" title="vote this message a 1" onclick="RateMsg(2058002, 1795765, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1795765xx" title="vote this message a 2" onclick="RateMsg(2058002, 1795765, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1795765xx" title="vote this message a 3" onclick="RateMsg(2058002, 1795765, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1795765xx" title="vote this message a 4" onclick="RateMsg(2058002, 1795765, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1795765xx" title="vote this message a 5" onclick="RateMsg(2058002, 1795765, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1795765xx" onclick="RateMsg(2058002, 1795765,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd HdUnSel " id="F2524990_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="52px" class="Frm_MsgIndent"><a name="xx2524990xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" alt="General"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="2524990" parent="1795765" thread="1760329" href="http://www.codeproject.com/Messages/2524990/Re-how-to-use-link-error.aspx">Re: how to use (link error )</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=33978">dchris_med</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">2:39 27 Apr '08 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F2524990_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:52px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="52px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">people..you must learn some c++<br>
|
||
<br>
|
||
there are only the functions declarations:<br>
|
||
<br>
|
||
<pre><span class="code-keyword">void</span> EndParse(DWORD dwAppData, <span class="code-keyword">bool</span> bIsAborted);</pre>
|
||
<br>
|
||
the linker error tells that you must implement a body for each function, like:<br>
|
||
<br>
|
||
<pre><span class="code-keyword">void</span> CHtmlEventHandler::EndParse(DWORD dwAppData, <span class="code-keyword">bool</span> bIsAborted);
|
||
{
|
||
AfxMessageBox(<span class="code-string">"</span><span class="code-string">we have finished the parsing!"</span>);
|
||
}</pre> <br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2524990&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=2524990&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=1760329" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/2524990/Re-how-to-use-link-error.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=2524990&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF2524990" style="white-space:nowrap;">3.00/5 (3 votes) <script type="text/javascript">
|
||
MsgVFrm(33978,2524990,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524990xx" onclick="RateMsg(33978, 2524990,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524990xx" title="vote this message a 1" onclick="RateMsg(33978, 2524990, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524990xx" title="vote this message a 2" onclick="RateMsg(33978, 2524990, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524990xx" title="vote this message a 3" onclick="RateMsg(33978, 2524990, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524990xx" title="vote this message a 4" onclick="RateMsg(33978, 2524990, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524990xx" title="vote this message a 5" onclick="RateMsg(33978, 2524990, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx2524990xx" onclick="RateMsg(33978, 2524990,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="root msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F1688023_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx1688023xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" alt="General"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="1688023" parent="0" thread="1688023" href="http://www.codeproject.com/Messages/1688023/This-is-truly-a-gift-from-god.aspx">This is truly a gift from god.</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=1198672">ThisIsANameOK</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">23:55 27 Sep '06 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F1688023_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">Thank you so much... works like a charm. <br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1688023&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1688023&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=1688023" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/1688023/This-is-truly-a-gift-from-god.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1688023&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF1688023" style="white-space:nowrap;">1.00/5 (1 vote) <script type="text/javascript">
|
||
MsgVFrm(1198672,1688023,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1688023xx" onclick="RateMsg(1198672, 1688023,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1688023xx" title="vote this message a 1" onclick="RateMsg(1198672, 1688023, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1688023xx" title="vote this message a 2" onclick="RateMsg(1198672, 1688023, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1688023xx" title="vote this message a 3" onclick="RateMsg(1198672, 1688023, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1688023xx" title="vote this message a 4" onclick="RateMsg(1198672, 1688023, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1688023xx" title="vote this message a 5" onclick="RateMsg(1198672, 1688023, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1688023xx" onclick="RateMsg(1198672, 1688023,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="root msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F1654699_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx1654699xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" alt="General"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="1654699" parent="0" thread="1654699" href="http://www.codeproject.com/Messages/1654699/HTML-Reader-revised-for-UNICODE.aspx">HTML Reader revised for UNICODE</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=685464">rObjects</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">21:55 4 Sep '06 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F1654699_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">I have got a version of HTMLReader working under UNICODE. The only thing I'm not sure of is ReadFile (no need to use in the context of my application, so not tested under UNICODE).<br>
|
||
<br>
|
||
The only corrections required in order to use it with Read (string) for a UNICODE string were:<br>
|
||
<br>
|
||
1) wrap string constants in _T() (about 166 or so of them)<br>
|
||
2) change TRACE1 to TRACE (TRACE1 seems problematic under UNICODE)<br>
|
||
3) fix a character counting flaw in attribute handling (counts a sizeof(TCHAR) where it should be just 1)<br>
|
||
<br>
|
||
If anyone is interested, let me know. <br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1654699&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1654699&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=1654699" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/1654699/HTML-Reader-revised-for-UNICODE.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1654699&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF1654699" style="white-space:nowrap;">1.17/5 (3 votes) <script type="text/javascript">
|
||
MsgVFrm(685464,1654699,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1654699xx" onclick="RateMsg(685464, 1654699,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1654699xx" title="vote this message a 1" onclick="RateMsg(685464, 1654699, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1654699xx" title="vote this message a 2" onclick="RateMsg(685464, 1654699, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1654699xx" title="vote this message a 3" onclick="RateMsg(685464, 1654699, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1654699xx" title="vote this message a 4" onclick="RateMsg(685464, 1654699, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1654699xx" title="vote this message a 5" onclick="RateMsg(685464, 1654699, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1654699xx" onclick="RateMsg(685464, 1654699,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote HdUnSel " id="F1657250_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="34px" class="Frm_MsgIndent"><a name="xx1657250xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_question.gif" alt="Question"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="1657250" parent="1654699" thread="1654699" href="http://www.codeproject.com/Messages/1657250/Re-HTML-Reader-revised-for-UNICODE.aspx">Re: HTML Reader revised for UNICODE</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=3204192">epicyeti</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">20:02 6 Sep '06 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F1657250_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:34px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="34px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">where are the sizeof(TCHAR) entries that need to be changed to 1? <br>
|
||
<br>
|
||
Nevermind, I found them.<br>
|
||
One is in LiteHTMLAttributes.h, Two are in LiteHTMLReader.h, and One is in LiteHTMLReader.cpp <br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1657250&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1657250&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=1654699" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/1657250/Re-HTML-Reader-revised-for-UNICODE.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1657250&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF1657250" style="white-space:nowrap;">1.00/5 (1 vote) <script type="text/javascript">
|
||
MsgVFrm(3204192,1657250,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1657250xx" onclick="RateMsg(3204192, 1657250,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1657250xx" title="vote this message a 1" onclick="RateMsg(3204192, 1657250, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1657250xx" title="vote this message a 2" onclick="RateMsg(3204192, 1657250, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1657250xx" title="vote this message a 3" onclick="RateMsg(3204192, 1657250, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1657250xx" title="vote this message a 4" onclick="RateMsg(3204192, 1657250, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1657250xx" title="vote this message a 5" onclick="RateMsg(3204192, 1657250, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1657250xx" onclick="RateMsg(3204192, 1657250,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="root msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F1619693_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx1619693xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" alt="General"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="1619693" parent="0" thread="1619693" href="http://www.codeproject.com/Messages/1619693/Getting-text.aspx">Getting text</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=3204192">epicyeti</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">20:11 10 Aug '06 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F1619693_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">Not sure if anyone is still watching this article but...How would I grap the text right after a tag, like in the situation of a link.<br> <br><a href="http://www.sample.com">The Sample Website</a><br> <br>how would I retreive the text "The Sample Website"?<br> <br>Thanks a lot. <br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1619693&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1619693&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=1619693" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/1619693/Getting-text.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1619693&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF1619693" style="white-space:nowrap;">2.00/5 (3 votes) <script type="text/javascript">
|
||
MsgVFrm(3204192,1619693,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1619693xx" onclick="RateMsg(3204192, 1619693,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1619693xx" title="vote this message a 1" onclick="RateMsg(3204192, 1619693, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1619693xx" title="vote this message a 2" onclick="RateMsg(3204192, 1619693, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1619693xx" title="vote this message a 3" onclick="RateMsg(3204192, 1619693, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1619693xx" title="vote this message a 4" onclick="RateMsg(3204192, 1619693, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1619693xx" title="vote this message a 5" onclick="RateMsg(3204192, 1619693, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1619693xx" onclick="RateMsg(3204192, 1619693,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote HdUnSel " id="F1653250_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="34px" class="Frm_MsgIndent"><a name="xx1653250xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" alt="General"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="1653250" parent="1619693" thread="1619693" href="http://www.codeproject.com/Messages/1653250/Re-Getting-text.aspx">Re: Getting text</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=685464">rObjects</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">5:26 3 Sep '06 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F1653250_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:34px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="34px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">In your example, your event handler will see a sequence of three calls:<br> <br>1) StartTag - for the <a> tag (with the href attribute),<br>2) Characters - for the text appearing between the start and end tags, and<br>3) EndTag - for the </a> ending tag<br> <br>If you want to collect the link into an application object, you'd have to create/initialize it when you get the StartTag call for the <a ...>, and gather all the text which appears in subsequent Characters calls until you get the EndTag call for the </a>. Bear in mind that if you have other tags occurring between the <a href=...> and </a>, or newlines for that matter, you'll get a sequence of Characters calls, not just one.<br> <br>e.g. <br> <br><a href="http://www.sample.com"><br>The <br>Sample<br>Website<br></a><br> <br>will give you at least 4 Characters calls because of all the newlines.<br> <br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1653250&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1653250&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=1619693" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/1653250/Re-Getting-text.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1653250&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF1653250" style="white-space:nowrap;">1.60/5 (5 votes) <script type="text/javascript">
|
||
MsgVFrm(685464,1653250,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1653250xx" onclick="RateMsg(685464, 1653250,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1653250xx" title="vote this message a 1" onclick="RateMsg(685464, 1653250, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1653250xx" title="vote this message a 2" onclick="RateMsg(685464, 1653250, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1653250xx" title="vote this message a 3" onclick="RateMsg(685464, 1653250, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1653250xx" title="vote this message a 4" onclick="RateMsg(685464, 1653250, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1653250xx" title="vote this message a 5" onclick="RateMsg(685464, 1653250, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1653250xx" onclick="RateMsg(685464, 1653250,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="root msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F1308200_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx1308200xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_question.gif" alt="Question"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="1308200" parent="0" thread="1308200" href="http://www.codeproject.com/Messages/1308200/it-seems-take-a-long-time-to-parse-a-file.aspx">it seems take a long time to parse a file</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=2531238">dirlee</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">4:37 16 Dec '05 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F1308200_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">parse a html file(572KB),get all image URL from this file,take me 57seconds,<br>
|
||
how can i make it faster,could u give me some code sample? <br>
|
||
<br>
|
||
Joe Lee<br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1308200&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1308200&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=1308200" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/1308200/it-seems-take-a-long-time-to-parse-a-file.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1308200&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF1308200" style="white-space:nowrap;">1.33/5 (3 votes) <script type="text/javascript">
|
||
MsgVFrm(2531238,1308200,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1308200xx" onclick="RateMsg(2531238, 1308200,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1308200xx" title="vote this message a 1" onclick="RateMsg(2531238, 1308200, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1308200xx" title="vote this message a 2" onclick="RateMsg(2531238, 1308200, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1308200xx" title="vote this message a 3" onclick="RateMsg(2531238, 1308200, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1308200xx" title="vote this message a 4" onclick="RateMsg(2531238, 1308200, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1308200xx" title="vote this message a 5" onclick="RateMsg(2531238, 1308200, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1308200xx" onclick="RateMsg(2531238, 1308200,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote HdSel " id="F1308222_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="34px" class="Frm_MsgIndent"><a name="xx1308222xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_answer.gif" alt="Answer"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="1308222" parent="1308200" thread="1308200" href="http://www.codeproject.com/Messages/1308222/Re-it-seems-take-a-long-time-to-parse-a-file.aspx">Re: it seems take a long time to parse a file</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=6533">Neville Franks</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">5:13 16 Dec '05 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F1308222_h1">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:34px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="34px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2"><blockquote class="FQ"><div class="FQA">dirlee wrote:</div>parse a html file(572KB),get all image URL from this file,take me 57seconds,<br>
|
||
how can i make it faster,could u give me some code sample? </blockquote><br>
|
||
<br>
|
||
That does seem like an awefully long time. I have to wonder what you're doing with a 572KB HTML file though!<br>
|
||
<br>
|
||
I suggest you use either the VC++ Profiler or Glowcode (www.glowcode.com) and see where the hotspots are and fix them. With a bit of luck it won't take you long to get a significant improvement.<br>
|
||
<br>
|
||
FYI The pugXML parser here on CP can parse a 10M XML file in less than second, using MMF.<br>
|
||
<br>
|
||
Good luck. <br>
|
||
<br>
|
||
Neville Franks, Author of Surfulater <a href="http://www.surfulater.com/">www.surfulater.com</a> "Save what you Surf" and ED for Windows <a href="http://www.getsoft.com/">www.getsoft.com</a><br>
|
||
<br>
|
||
<br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1308222&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1308222&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=1308200" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/1308222/Re-it-seems-take-a-long-time-to-parse-a-file.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1308222&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF1308222" style="white-space:nowrap;">2.00/5 (3 votes) <script type="text/javascript">
|
||
MsgVFrm(6533,1308222,false,"","","");
|
||
</script>Rate this message: <a href="./HTML Reader C++ Class Library - CodeProject_files/HTML Reader C++ Class Library - CodeProject.htm" onclick="RateMsg(6533, 1308222,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="./HTML Reader C++ Class Library - CodeProject_files/HTML Reader C++ Class Library - CodeProject.htm" title="vote this message a 1" onclick="RateMsg(6533, 1308222, 1,0)"><b>1</b></a> <a class="toolbar" href="./HTML Reader C++ Class Library - CodeProject_files/HTML Reader C++ Class Library - CodeProject.htm" title="vote this message a 2" onclick="RateMsg(6533, 1308222, 2,0)"><b>2</b></a> <a class="toolbar" href="./HTML Reader C++ Class Library - CodeProject_files/HTML Reader C++ Class Library - CodeProject.htm" title="vote this message a 3" onclick="RateMsg(6533, 1308222, 3,0)"><b>3</b></a> <a class="toolbar" href="./HTML Reader C++ Class Library - CodeProject_files/HTML Reader C++ Class Library - CodeProject.htm" title="vote this message a 4" onclick="RateMsg(6533, 1308222, 4,0)"><b>4</b></a> <a class="toolbar" href="./HTML Reader C++ Class Library - CodeProject_files/HTML Reader C++ Class Library - CodeProject.htm" title="vote this message a 5" onclick="RateMsg(6533, 1308222, 5,0)"><b>5</b></a> <a href="./HTML Reader C++ Class Library - CodeProject_files/HTML Reader C++ Class Library - CodeProject.htm" onclick="RateMsg(6533, 1308222,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="root msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F1307920_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx1307920xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_question.gif" alt="Question"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="1307920" parent="0" thread="1307920" href="http://www.codeproject.com/Messages/1307920/memory-leak.aspx">memory leak?</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=2525683">gholee</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">22:14 15 Dec '05 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F1307920_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">You have a wonderful library. I am trying to use it, but in debug mode I get a lot memory leak messages like this one:<br>
|
||
<br>
|
||
strcore.cpp(118) : {387} normal block at 0x00437320, 24 bytes long.<br>
|
||
Data: < ligh> 01 00 00 00 0B 00 00 00 0B 00 00 00 6C 69 67 68 <br>
|
||
<br>
|
||
I do not have a clue where this is coming from.<br>
|
||
<br>
|
||
-- modified at 16:07 Thursday 15th December, 2005<br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1307920&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1307920&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=1307920" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/1307920/memory-leak.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1307920&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF1307920" style="white-space:nowrap;">1.50/5 (2 votes) <script type="text/javascript">
|
||
MsgVFrm(2525683,1307920,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1307920xx" onclick="RateMsg(2525683, 1307920,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1307920xx" title="vote this message a 1" onclick="RateMsg(2525683, 1307920, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1307920xx" title="vote this message a 2" onclick="RateMsg(2525683, 1307920, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1307920xx" title="vote this message a 3" onclick="RateMsg(2525683, 1307920, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1307920xx" title="vote this message a 4" onclick="RateMsg(2525683, 1307920, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1307920xx" title="vote this message a 5" onclick="RateMsg(2525683, 1307920, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1307920xx" onclick="RateMsg(2525683, 1307920,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote HdUnSel " id="F1349831_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="34px" class="Frm_MsgIndent"><a name="xx1349831xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_answer.gif" alt="Answer"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="1349831" parent="1307920" thread="1307920" href="http://www.codeproject.com/Messages/1349831/Re-memory-leak.aspx">Re: memory leak?</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=1540681">zhangrusi</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">20:17 27 Jan '06 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F1349831_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:34px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="34px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">I saw this post and tried running my test project with memory leak detection enabled in the C-runtime.<br>
|
||
<br>
|
||
When I use a call to _CrtDumpMemoryLeaks() at the end of my executable's _tmain method to dump memory leaks, I get the same results--75 or so leaks that look like:<br>
|
||
<br>
|
||
strcore.cpp(118) : {379} normal block at 0x002FCC80, 22 bytes long.<br>
|
||
Data: < alic> 01 00 00 00 09 00 00 00 09 00 00 00 61 6C 69 63 <br>
|
||
<br>
|
||
However, if I comment out the call to _CrtDumpMemoryLeaks() and instead use the following code (at the beginning of my _tmain method) to dump leaks<br>
|
||
<br>
|
||
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);<br>
|
||
<br>
|
||
no leaks are reported. (See <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxcondetectingisolatingmemoryleaks.asp" rel="nofollow" class="chrome-seo_nofollow seoquake-nofollow NFClass">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxcondetectingisolatingmemoryleaks.asp</a>[<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxcondetectingisolatingmemoryleaks.asp" target="_blank" rel="nofollow" title="New Window" class="chrome-seo_nofollow seoquake-nofollow NFClass">^</a>] for more info on leak reporting options.) Using this second method to dump leaks may be a little more reliable, because I imagine it causes leak checking to be done later, after the C-runtime has had a chance to do more cleanup. My guess is that maybe there were some statics/globals that didn't get cleaned up until after _tmain terminated; when _CrtDumpMemoryLeaks was called at the end of _tmain, it reported these as leaks.<br>
|
||
<br>
|
||
I did a sanity check on the second reporting method and inserted a dummy leak into my code...the leak was reported as expected, so this method seems reliable.<br>
|
||
<br>
|
||
So there may not be a memory leak in HTML Reader after all. <br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1349831&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1349831&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=1307920" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/1349831/Re-memory-leak.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1349831&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF1349831" style="white-space:nowrap;">2.00/5 (1 vote) <script type="text/javascript">
|
||
MsgVFrm(1540681,1349831,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1349831xx" onclick="RateMsg(1540681, 1349831,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1349831xx" title="vote this message a 1" onclick="RateMsg(1540681, 1349831, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1349831xx" title="vote this message a 2" onclick="RateMsg(1540681, 1349831, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1349831xx" title="vote this message a 3" onclick="RateMsg(1540681, 1349831, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1349831xx" title="vote this message a 4" onclick="RateMsg(1540681, 1349831, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1349831xx" title="vote this message a 5" onclick="RateMsg(1540681, 1349831, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1349831xx" onclick="RateMsg(1540681, 1349831,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="root msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F1260205_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx1260205xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" alt="General"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="1260205" parent="0" thread="1260205" href="http://www.codeproject.com/Messages/1260205/Collecting-Tag-Contents.aspx">Collecting Tag Contents</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=2367850">PatrickCM</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">19:43 21 Oct '05 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F1260205_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">How would I collect the contents of a specific tag. I want to collect the contents of each </td><td> tag and do a string compare to see if it is the proper row. Then I want to collect the contents of the very next instance of </td><td> Is this possible? <br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1260205&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1260205&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=1260205" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/1260205/Collecting-Tag-Contents.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1260205&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF1260205" style="white-space:nowrap;">1.67/5 (8 votes) <script type="text/javascript">
|
||
MsgVFrm(2367850,1260205,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1260205xx" onclick="RateMsg(2367850, 1260205,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1260205xx" title="vote this message a 1" onclick="RateMsg(2367850, 1260205, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1260205xx" title="vote this message a 2" onclick="RateMsg(2367850, 1260205, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1260205xx" title="vote this message a 3" onclick="RateMsg(2367850, 1260205, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1260205xx" title="vote this message a 4" onclick="RateMsg(2367850, 1260205, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1260205xx" title="vote this message a 5" onclick="RateMsg(2367850, 1260205, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1260205xx" onclick="RateMsg(2367850, 1260205,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="root msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd LoVote Rt HdUnSel " id="F1194470_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="16px" class="Frm_MsgIndent"><a name="xx1194470xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" alt="General"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="1194470" parent="0" thread="1194470" href="http://www.codeproject.com/Messages/1194470/it-seems-that-this-class-does-not-support-unicode.aspx">it seems that this class does not support unicode</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img border="0" src="./HTML Reader C++ Class Library - CodeProject_files/member_sm.gif" title="member" alt="member" height="16px"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/View.aspx?mid=2135673">tomcat_sg</a></td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">18:23 14 Aug '05 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F1194470_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:16px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="16px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">After I define _UNICODE, a lot of unexpected error occured. <br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1194470&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1194470&floc=/KB/library/GomzyHTMLReader.aspx&action=e" title="Email">Email</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=1194470" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/1194470/it-seems-that-this-class-does-not-support-unicode.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1194470&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF1194470" style="white-space:nowrap;">1.00/5 (1 vote) <script type="text/javascript">
|
||
MsgVFrm(2135673,1194470,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1194470xx" onclick="RateMsg(2135673, 1194470,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1194470xx" title="vote this message a 1" onclick="RateMsg(2135673, 1194470, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1194470xx" title="vote this message a 2" onclick="RateMsg(2135673, 1194470, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1194470xx" title="vote this message a 3" onclick="RateMsg(2135673, 1194470, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1194470xx" title="vote this message a 4" onclick="RateMsg(2135673, 1194470, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1194470xx" title="vote this message a 5" onclick="RateMsg(2135673, 1194470, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1194470xx" onclick="RateMsg(2135673, 1194470,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr class="quick">
|
||
<td class="msg-divide"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="1px" alt=""></td>
|
||
</tr><tr class="MsgHd HiVote HdUnSel " id="F1194876_h0">
|
||
<td width="100%"><table class="quickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr class="hover-row">
|
||
<td width="34px" class="Frm_MsgIndent"><a name="xx1194876xx"></a><img height="16px" width="16px" align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" alt="General"></td><td class="Frm_MsgSubject hover-container"><a class="message-link chrome-seo_nofollow seoquake-nofollow NFClass" rel="nofollow" name="1194876" parent="1194470" thread="1194470" href="http://www.codeproject.com/Messages/1194876/Re-it-seems-that-this-class-does-not-support-unico.aspx">Re: it seems that this class does not support unicode</a> <a onclick="return Pin(this);" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#" title="Click to pin message"><img src="./HTML Reader C++ Class Library - CodeProject_files/pin.gif" border="0" align="top" alt="Pin" width="13px" height="12px"></a></td><td class="Frm_MsgIcon"><img src="./HTML Reader C++ Class Library - CodeProject_files/usersuss.gif" width="14px" height="15px" alt="suss"></td><td class="Frm_MsgAuthor">Anonymous</td><td class="Frm_MsgDate" style="vertical-align:top;white-space:nowrap;">11:38 15 Aug '05 </td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr id="F1194876_h1" style="display:none;">
|
||
<td width="100%"><table class="quickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td class="Frm_MsgIndent" style="width:34px;"><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" height="1px" width="34px" alt=""></td><td class="MsgBd BdSel "><table border="0" cellpadding="0" cellspacing="5px" width="100%">
|
||
<tbody><tr>
|
||
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tbody><tr>
|
||
<td colspan="2">yes, the error message like this:<br>
|
||
<br>
|
||
litehtmlentityresolver.h(160) : error C2002: invalid wide-character constant<br>
|
||
<br>
|
||
how to solve this problem?<img src="./HTML Reader C++ Class Library - CodeProject_files/smiley_cry.gif" align="top" alt="Cry | :(("> <img src="./HTML Reader C++ Class Library - CodeProject_files/smiley_cry.gif" align="top" alt="Cry | :(("> <br></td>
|
||
</tr><tr style="vertical-align:middle;">
|
||
<td class="msg-footer"><a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1194876&floc=/KB/library/GomzyHTMLReader.aspx&action=r" title="Reply">Reply</a>·<a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&sort=Position&select=1308222&tid=1194470" title="View Thread">View Thread</a>·<a class="toolbar" href="http://www.codeproject.com/Messages/1194876/Re-it-seems-that-this-class-does-not-support-unico.aspx" title="Get permanent link">Permalink</a>·<a class="toolbar" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1194876&obtid=3&action=AddBookmark&bio=false" title="Bookmark this post">Bookmark</a> | <a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1194876&floc=/KB/library/GomzyHTMLReader.aspx&action=m">Edit</a>·<a class="toolbar" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=36732&select=1194876&floc=/KB/library/GomzyHTMLReader.aspx&action=d">Delete</a></td><td class="msg-footer" style="text-align:right;"><span id="MVF1194876" style="white-space:nowrap;">5.00/5 (1 vote) <script type="text/javascript">
|
||
MsgVFrm(0,1194876,false,"","","");
|
||
</script>Rate this message: <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1194876xx" onclick="RateMsg(0, 1194876,1,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_down.gif" alt="vote 1" border="0" align="middle"></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1194876xx" title="vote this message a 1" onclick="RateMsg(0, 1194876, 1,0)"><b>1</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1194876xx" title="vote this message a 2" onclick="RateMsg(0, 1194876, 2,0)"><b>2</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1194876xx" title="vote this message a 3" onclick="RateMsg(0, 1194876, 3,0)"><b>3</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1194876xx" title="vote this message a 4" onclick="RateMsg(0, 1194876, 4,0)"><b>4</b></a> <a class="toolbar" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1194876xx" title="vote this message a 5" onclick="RateMsg(0, 1194876, 5,0)"><b>5</b></a> <a href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222#xx1194876xx" onclick="RateMsg(0, 1194876,5,0);"><img height="14px" width="14px" src="./HTML Reader C++ Class Library - CodeProject_files/thumbs_up.gif" border="0" alt="vote 5" align="middle"></a> </span></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr>
|
||
<td><img src="./HTML Reader C++ Class Library - CodeProject_files/t(1).gif" border="0" width="1px" height="5px" alt=""></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr><tr>
|
||
<td><table width="100%" cellpadding="2px" cellspacing="0">
|
||
<tbody><tr class="forum-footer">
|
||
<td>Last Visit: 16:47 14 Sep '11 Last Update: 10:57 15 Sep '11 </td><td style="text-align:right;white-space:nowrap;"><input id="_mbnUrl" type="hidden" value="/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&noise=3&prof=True&sort=Position&view=Quick&select=1308222&fr=26"><b>1</b><a class="toolbar" name="Frm_HoverNL" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&noise=3&prof=True&sort=Position&view=Quick&select=1308222&fr=26#xx0xx">2</a><a class="toolbar" name="Frm_HoverNL" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&noise=3&prof=True&sort=Position&view=Quick&select=1308222&fr=51#xx0xx">3</a> <a class="toolbar" name="Frm_HoverNL" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?fid=36732&df=90&mpp=25&noise=3&prof=True&sort=Position&view=Quick&select=1308222&fr=26#xx0xx">Next »</a></td>
|
||
</tr>
|
||
</tbody></table></td>
|
||
</tr>
|
||
</tbody></table>
|
||
</div><p class="small-text"><img align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_general.gif" width="16px" height="16px" alt="General"> General <img align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_news.gif" width="16px" height="16px" alt="News"> News <img align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_idea.gif" width="16px" height="16px" alt="Suggestion"> Suggestion <img align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_question.gif" width="16px" height="16px" alt="Question"> Question <img align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_bug.gif" width="16px" height="16px" alt="Bug"> Bug <img align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_answer.gif" width="16px" height="16px" alt="Answer"> Answer <img align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_joke.gif" width="16px" height="16px" alt="Joke"> Joke <img align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_rant.gif" width="16px" height="16px" alt="Rant"> Rant <img align="top" src="./HTML Reader C++ Class Library - CodeProject_files/msg_admin.gif" width="16px" height="16px" alt="Admin"> Admin </p><p class="small-text">Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.</p>
|
||
|
||
|
||
<div class="theme1-background" style="height:2px"></div>
|
||
|
||
<div class="extended tiny-text">
|
||
<div class="row">
|
||
<div class="float-left">
|
||
<a id="ctl00_PermaLink" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx">Permalink</a> |
|
||
<a id="ctl00_AdvertiseLink" href="http://lakequincy.com/">Advertise </a> |
|
||
<a id="ctl00_PrivacyLink" href="http://www.codeproject.com/info/privacy.aspx">Privacy</a> |
|
||
<a id="ctl00_Mobile" rel="nofollow" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222&display=Mobile" class="chrome-seo_nofollow seoquake-nofollow NFClass">Mobile</a>
|
||
<br>
|
||
|
||
|
|
||
Web24 |
|
||
2.3.110913.1
|
||
|
||
</div>
|
||
<div class="float-right align-right">
|
||
Article Copyright 2004 by <font color="maroon">gUrM33T</font><br>Everything else
|
||
Copyright © <a href="mailto:webmaster@codeproject.com">CodeProject</a>, 1999-2011<br>
|
||
<a id="ctl00_TermsOfUseLink" href="http://www.codeproject.com/info/TermsOfUse.aspx">Terms of Use</a>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<div class="page-width">
|
||
Layout: <a id="ctl00_PageWidth_FixedT" title="Fixed width layout" rel="nofollow" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222&PageFlow=FixedWidth" class="chrome-seo_nofollow seoquake-nofollow NFClass">fixed</a>
|
||
|
|
||
<a id="ctl00_PageWidth_FluidT" title="Fluid layout" rel="nofollow" href="http://www.codeproject.com/KB/library/GomzyHTMLReader.aspx?msg=1308222&PageFlow=Fluid" class="chrome-seo_nofollow seoquake-nofollow NFClass">fluid</a>
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<br clear="all">
|
||
|
||
|
||
</div>
|
||
|
||
<div id="ctl00_ContentSide" class="text-sidebar">
|
||
<script type="text/javascript">document.write(unescape('%0d%0a%0d%0a%3cdiv class%3d%22results%22%3e%0d%0a%0d%0a%09%3cdiv class%3d%22container-adwords%22%3e%0d%0a%09%09%3ca id%3d%22ctl00_RelatedAds_RelatedResults_ctl01_Link%22 href%3d%22%2fscript%2fCatalog%2fRedir.aspx%3fctid%3d1885%26amp%3bcttype%3d2%22 target%3d%22_blank%22%3e%3cspan id%3d%22ctl00_RelatedAds_RelatedResults_ctl01_Title%22 class%3d%22title%22%3eComponentOne PDF for .NET%3c%2fspan%3e%3cbr %2f%3e%0d%0a%09%09%09%3cspan id%3d%22ctl00_RelatedAds_RelatedResults_ctl01_Teaser%22 class%3d%22desc%22%3eCreate PDF Documents from within your Visual Studio Applications%3c%2fspan%3e%3cbr %2f%3e%0d%0a%09%09%09%3cspan id%3d%22ctl00_RelatedAds_RelatedResults_ctl01_Url%22 class%3d%22link%22%3ewww.componentone.com%3c%2fspan%3e%3c%2fa%3e%0d%0a%09%3c%2fdiv%3e%0d%0a%0d%0a%09%3cdiv class%3d%22container-adwords%22%3e%0d%0a%09%09%3ca id%3d%22ctl00_RelatedAds_RelatedResults_ctl02_Link%22 href%3d%22%2fscript%2fCatalog%2fRedir.aspx%3fctid%3d2694%26amp%3bcttype%3d3%22 target%3d%22_blank%22%3e%3cspan id%3d%22ctl00_RelatedAds_RelatedResults_ctl02_Title%22 class%3d%22title%22%3ePfz.Caching%3c%2fspan%3e%3cbr %2f%3e%0d%0a%09%09%09%3cspan id%3d%22ctl00_RelatedAds_RelatedResults_ctl02_Teaser%22 class%3d%22desc%22%3eA DLL to Cache serializable objects in memory and disk. The buffers are...%3c%2fspan%3e%3cbr %2f%3e%0d%0a%09%09%09%3cspan id%3d%22ctl00_RelatedAds_RelatedResults_ctl02_Url%22 class%3d%22link%22%3epaulozemek.conectou.net%3c%2fspan%3e%3c%2fa%3e%0d%0a%09%3c%2fdiv%3e%0d%0a%0d%0a%3c%2fdiv%3e%0d%0a'));</script>
|
||
|
||
<div class="results">
|
||
|
||
<div class="container-adwords">
|
||
<a id="ctl00_RelatedAds_RelatedResults_ctl01_Link" href="http://www.codeproject.com/script/Catalog/Redir.aspx?ctid=1885&cttype=2" target="_blank"><span id="ctl00_RelatedAds_RelatedResults_ctl01_Title" class="title">ComponentOne PDF for .NET</span><br>
|
||
<span id="ctl00_RelatedAds_RelatedResults_ctl01_Teaser" class="desc">Create PDF Documents from within your Visual Studio Applications</span><br>
|
||
<span id="ctl00_RelatedAds_RelatedResults_ctl01_Url" class="link">www.componentone.com</span></a>
|
||
</div>
|
||
|
||
<div class="container-adwords">
|
||
<a id="ctl00_RelatedAds_RelatedResults_ctl02_Link" href="http://www.codeproject.com/script/Catalog/Redir.aspx?ctid=2694&cttype=3" target="_blank"><span id="ctl00_RelatedAds_RelatedResults_ctl02_Title" class="title">Pfz.Caching</span><br>
|
||
<span id="ctl00_RelatedAds_RelatedResults_ctl02_Teaser" class="desc">A DLL to Cache serializable objects in memory and disk. The buffers are...</span><br>
|
||
<span id="ctl00_RelatedAds_RelatedResults_ctl02_Url" class="link">paulozemek.conectou.net</span></a>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div style="width:160px;margin: 10px 0;">
|
||
<div class="lqm_ad" lqm_publisher="lqm.codeproject.site" lqm_zone="77" lqm_format="160x600" lqm_country="RU" lqm_tags="VC6,Windows,Visual-Studio,MFC,Dev,Intermediate"><iframe id="lqmad4" width="160" height="600" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe></div>
|
||
</div>
|
||
|
||
|
||
<div class="announce">
|
||
<div id="ctl00_RelatedArticles_RelatedResults_ctl00_header" class="announce-header">See Also...</div>
|
||
<div class="announce-content">
|
||
|
||
<div class="container-related-item">
|
||
<a id="ctl00_RelatedArticles_RelatedResults_ctl01_Link" class="title" href="http://www.codeproject.com/KB/windows/CHMReader.aspx">CHM Reader for Pocket PC 2003</a>
|
||
|
||
</div>
|
||
|
||
<div class="container-related-item">
|
||
<a id="ctl00_RelatedArticles_RelatedResults_ctl03_Link" class="title" href="http://www.codeproject.com/KB/cs/html2xhtmlcleaner.aspx">Convert HTML to XHTML and Clean Unnecessary Tags and Attributes</a>
|
||
|
||
</div>
|
||
|
||
<div class="container-related-item">
|
||
<a id="ctl00_RelatedArticles_RelatedResults_ctl04_Link" class="title" href="http://www.codeproject.com/KB/windows/CHMReaderNet.aspx">CHMReader.Net</a>
|
||
|
||
</div>
|
||
|
||
<div class="container-related-item">
|
||
<a id="ctl00_RelatedArticles_RelatedResults_ctl05_Link" class="title" href="http://www.codeproject.com/KB/dotnet/apmilhtml.aspx">MIL HTML Parser</a>
|
||
|
||
</div>
|
||
|
||
<div class="container-related-item">
|
||
<a id="ctl00_RelatedArticles_RelatedResults_ctl06_Link" class="title" href="http://www.codeproject.com/KB/cs/rssreader.aspx">RSS Reader</a>
|
||
|
||
</div>
|
||
|
||
<div class="container-related-item">
|
||
<a id="ctl00_RelatedArticles_RelatedResults_ctl07_Link" class="title" href="http://www.codeproject.com/KB/windows/sthtmldialog.aspx">HTML based dialog for the Pocket PC</a>
|
||
|
||
</div>
|
||
|
||
<div class="container-related-item">
|
||
<a id="ctl00_RelatedArticles_RelatedResults_ctl08_Link" class="title" href="http://www.codeproject.com/KB/system/globalsystemhook.aspx">Global System Hooks in .NET</a>
|
||
|
||
</div>
|
||
|
||
<div class="container-related-item">
|
||
<a id="ctl00_RelatedArticles_RelatedResults_ctl09_Link" class="title" href="http://www.codeproject.com/KB/dotnet/NetHtmlEventHandler.aspx">Handling HTML Events from .NET, using C#</a>
|
||
|
||
</div>
|
||
|
||
<div class="container-related-item">
|
||
<a id="ctl00_RelatedArticles_RelatedResults_ctl10_Link" class="title" href="http://www.codeproject.com/KB/cs/html-dom-using-dot-net.aspx">HTML DOM Using .NET</a>
|
||
|
||
</div>
|
||
|
||
<div class="container-related-item">
|
||
<a id="ctl00_RelatedArticles_RelatedResults_ctl11_Link" class="title" href="http://www.codeproject.com/KB/MFC/dhtmlview.aspx">Integrating DHTML into MFC Views</a>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="announce">
|
||
<div class="announce-header">The Daily Insider</div>
|
||
<div class="announce-content">
|
||
|
||
<div><a id="ctl00_News_News_ctl01_Link" href="http://citizen428.net/archives/434">30 free programming books</a></div>
|
||
|
||
Daily News: <a id="ctl00_News_News_ctl02_Subscribe" href="http://www.codeproject.com/Feature/Insider/">Signup now</a>.
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div style="display:none;" id="lqm_AdTable">
|
||
|
||
</div>
|
||
|
||
<script type="text/javascript" language="Javascript" src="./HTML Reader C++ Class Library - CodeProject_files/jquery.min.js"></script><script type="text/javascript">//<![CDATA[
|
||
if (typeof jQuery == 'undefined') {
|
||
document.write(unescape("%3Cscript src='/script/JS/jquery-1.6.2.min.js' type='text/javascript' %3E%3C/script%3E"));
|
||
}//]]></script>
|
||
<script type="text/javascript" language="Javascript" src="./HTML Reader C++ Class Library - CodeProject_files/article.min.js"></script>
|
||
<script type="text/javascript" language="Javascript" src="./HTML Reader C++ Class Library - CodeProject_files/MemberProfilePopup.min.js"></script>
|
||
<script type="text/javascript" language="Javascript" src="./HTML Reader C++ Class Library - CodeProject_files/m.min.js"></script>
|
||
<script type="text/javascript" language="Javascript">//<![CDATA[
|
||
var socialLinks = new social();
|
||
socialLinks.PlaceholderId="ATD";socialLinks.ObjectId=6561;
|
||
socialLinks.ObjectTypeId=2;
|
||
socialLinks.addtoMethod=1;
|
||
socialLinks.Horizontal=false;
|
||
socialLinks.Showname=true;
|
||
socialLinks.setupLinks("socialLinks", escape(document.location.href),escape(document.title), 100, 0, "small-text Bold", "AddTo");
|
||
socialLinks.setupMenu();
|
||
if($.LqmAds)$.LqmAds();
|
||
var oSrchFlt = false, oSrchBox=false,srchBoxFoc=false;
|
||
$(document).ready(function() {
|
||
InitWatermark('sb_tb', 'Search');
|
||
var sbar = $('#sb_tb');
|
||
var sfilter = $('#SearchFilter');
|
||
if (sbar && sfilter) {
|
||
sfilter.removeClass('popup'); sfilter.hide();
|
||
sbar.blur(function() { if (!oSrchFlt)sfilter.hide();srchBoxFoc=false; });
|
||
sbar.focus(function() { oSrchFlt=false;srchBoxFoc=true;sfilter.show(); });
|
||
sbar.mouseleave(function() { oSrchBox=false; });
|
||
sbar.mouseover(function() { oSrchBox=true; });
|
||
sfilter.mouseleave(function() { oSrchFlt=false; if (!srchBoxFoc&&!oSrchBox)sfilter.hide();});
|
||
sfilter.mouseover(function() { oSrchFlt=true; });
|
||
}
|
||
});
|
||
$(document).ready(function() { anchorAnimate(); });
|
||
$("#ctl00_RateArticle_RateItemWrapper").removeClass("container-rating");$('#clear-rate_ctl00_RateArticle_RCD').click(function () { $('#ctl00_RateArticle_RCD').hide(); return false;});
|
||
function ChkRtctl00_RateArticle(val, objId) {if (val<=3||true) {
|
||
$('div[name=RateItem_' + objId + '] .rating-comment').css("display","");}
|
||
else $('div[name=RateItem_' + objId + '] .rating-comment').css("display","none");}
|
||
|
||
EnsureMessageVisible(1308222, true);
|
||
|
||
|
||
//]]>
|
||
</script>
|
||
|
||
|
||
|
||
<script type="text/javascript">
|
||
var _gaq = _gaq || [];
|
||
_gaq.push(['_setAccount', 'UA-1735123-1']);
|
||
_gaq.push(['_trackPageview']);
|
||
_gaq.push(['_setDomainName', 'www.codeproject.com']);
|
||
_gaq.push(['_setSessionTimeout', '1200']);
|
||
|
||
(function () {
|
||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
|
||
})();
|
||
</script>
|
||
|
||
|
||
|
||
<canvas id="cv1" width="1px" height="1px" style="position:absolute;left:0;top:0;pointer-events:none"></canvas><canvas id="cv2" width="1px" height="1px" style="position:absolute;left:0;top:0;pointer-events:none"></canvas><div id="MemberProfilePopupDiv" class="raised box" style="display: none; position: absolute; "></div><div id="MemberProfilePopupDiv" class="raised box" style="display: none; position: absolute; "></div><div id="MemberProfilePopupDiv" class="raised box" style="display: none; position: absolute; "></div></body></html> |