SyndicationDomination 0.0
An RSS/Atom parser, because there's nothing else out there.
|
Represents an HTML document. More...
#include <html.hpp>
Public Member Functions | |
Html (std::string path) | |
Constructs the Html object from a valid file path. | |
std::string | get_title () |
std::string | get_icon_url () |
std::string | get_img_url () |
std::string | get_rss_url () |
std::string | get_body () |
std::string | get_article () |
std::string | get_description () |
std::string | to_json (bool metadata_only=false) |
Static Public Member Functions | |
static Html | from_string (std::string s) |
Constructs the Html object from a string containing valid HTML. | |
Represents an HTML document.
Upon construction it will convert the given HTML using tidy, then feed it to pugixml for parsing.
This parser is mostly useful for feed readers, so it only provides very little information and it's not suitable as a full-fledged HTML parser.
Values are parsed on the fly when requested, this is mostly to avoid unnecessary overhead trying to parse unneeded information ahead of time.
In case some value cannot be found, it will just contain an empty string.
Html::Html | ( | std::string | path | ) |
Constructs the Html object from a valid file path.
path | a valid file path to a local HTML document. |
|
static |
Constructs the Html object from a string containing valid HTML.
s | a string containing the HTML to parse |
std::string Html::get_article | ( | ) |
std::string Html::get_body | ( | ) |
std::string Html::get_description | ( | ) |
std::string Html::get_icon_url | ( | ) |
std::string Html::get_img_url | ( | ) |
std::string Html::get_rss_url | ( | ) |
std::string Html::get_title | ( | ) |
std::string Html::to_json | ( | bool | metadata_only = false | ) |