liigo / html-parser Goto Github PK
View Code? Open in Web Editor NEWLiigo's HTML parser for C++, a fast & simple node-based HTML text parser.
Liigo's HTML parser for C++, a fast & simple node-based HTML text parser.
[code]<a href="xxxxx" ccc=w>AAA
BB
比如这个 我想取得A标签的文本"AAABBDD" 如何取得?
测试您的例子时报以下错误
PS: 不知道怎么贴代码,囧
Debug Assertion Failed!
Program: ...nts\Visual Studio 2010\Projects\CPP\cunese\Compiled\dCURL.exe
File: f:\dd\vctools\crt_bld\self_x86\crt\src\isctype.c
Line: 56
Expression: (unsigned)(c + 1) <= 256
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
[/code]
X86_X64 平台下使用出现无效内存访问.
跟踪代码发现.
struct HtmlAttribute
{
char* name; //属性名称
char* value; //属性值
size_t flags; //bit OR of HtmlNodeFlag !!!Here you use size_t
};
但是在属性解析中的appendInt接口中, 在内存中追加int ,而不是size_t , 平台不兼容.
inline size_t appendInt(int i) { return appendData(&i, sizeof(i)); }
inline size_t appendInt(size_t i) { return appendData(&i, sizeof(i)); } // Added
//标记需free属性名称和属性值文本
//TODO: 将来优化到尽量少复制文本
attributes->appendInt((size_t)(FLAG_NEED_FREE_NAME | FLAG_NEED_FREE_VALUE)); //attribute flags !!!修改之后的代码
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.