SyndicationDomination 0.0
An RSS/Atom parser, because there's nothing else out there.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
Html Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Html()

Html::Html ( std::string  path)

Constructs the Html object from a valid file path.

Parameters
patha valid file path to a local HTML document.

Member Function Documentation

◆ from_string()

Html Html::from_string ( std::string  s)
static

Constructs the Html object from a string containing valid HTML.

Parameters
sa string containing the HTML to parse

◆ get_article()

std::string Html::get_article ( )

◆ get_body()

std::string Html::get_body ( )

◆ get_description()

std::string Html::get_description ( )

◆ get_icon_url()

std::string Html::get_icon_url ( )

◆ get_img_url()

std::string Html::get_img_url ( )

◆ get_rss_url()

std::string Html::get_rss_url ( )

◆ get_title()

std::string Html::get_title ( )

◆ to_json()

std::string Html::to_json ( bool  metadata_only = false)

The documentation for this class was generated from the following files: