Any parser

Any parser is a simple and lightweight parsing library that can parse documents of types html, css and json (xml is comming soon).

More documents

License

LGPL v2

Sample usage

    auto html_text = R"~(<!DOCTYPE HTML>
                     <html>
                     <head>
                     <meta name="qrichtext" content="1" />
                     <style type="text/css">
                     p, li { white-space: pre-wrap; }
                     b { color: "red" }
                     </style>
                     </head>
                     <body style=" font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;">
                     <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">dfg</p>
                     <img src="image.png" />
                     <p id="p1" class="par">
                     <b>Sample</b> paragraph
                     <img src="image.png" />
                     </p>
                     </body>
                     </html>)~";
    html_parser html;
    html.set_text(html_text);
    auto b = html.query("body .p1 b").at(0);
    b->add_class("text-danger");
    b->set_attr("dir", "rt");

Tooska

Tooska Info

⭐ Stars 19
🔗 Source Code github.com
🕒 Last Update 7 months ago
🕒 Created 3 years ago
🐞 Open Issues 0
➗ Star-Issue Ratio Infinity
😎 Author HamedMasafi