libhtmlpp 1.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
libhtmlpp::HtmlPage Class Reference

High level loader/saver for HTML documents (files and strings). More...

#include <html.h>

Public Member Functions

 HtmlPage ()
 
 ~HtmlPage ()
 
void loadFile (libhtmlpp::HtmlElement &html, const std::string &path)
 Loads an HTML file from disk into a given HtmlElement root.
 
void saveFile (libhtmlpp::HtmlElement &html, const std::string &path)
 Serializes an HtmlElement subtree and writes it to a file.
 
void loadString (libhtmlpp::HtmlElement &html, const std::string &src)
 Parses an HTML source string and copies the result into html.
 
void loadString (libhtmlpp::HtmlElement &html, const HtmlString &node)
 
void loadString (libhtmlpp::HtmlElement &html, const HtmlString *node)
 
bool isHtml5 ()
 

Detailed Description

High level loader/saver for HTML documents (files and strings).

Definition at line 433 of file html.h.

Constructor & Destructor Documentation

◆ HtmlPage()

libhtmlpp::HtmlPage::HtmlPage ( )

Definition at line 1906 of file html.cpp.

◆ ~HtmlPage()

libhtmlpp::HtmlPage::~HtmlPage ( )

Definition at line 1910 of file html.cpp.

Member Function Documentation

◆ isHtml5()

bool libhtmlpp::HtmlPage::isHtml5 ( )

Definition at line 1994 of file html.cpp.

◆ loadFile()

void libhtmlpp::HtmlPage::loadFile ( libhtmlpp::HtmlElement html,
const std::string &  path 
)

Loads an HTML file from disk into a given HtmlElement root.

Parameters
htmlOutput root element to populate.
pathFilesystem path to the HTML file.
Exceptions
HTMLExceptionif the file cannot be opened or parsed.

Definition at line 1919 of file html.cpp.

◆ loadString() [1/3]

void libhtmlpp::HtmlPage::loadString ( libhtmlpp::HtmlElement html,
const HtmlString node 
)

Definition at line 1954 of file html.cpp.

◆ loadString() [2/3]

void libhtmlpp::HtmlPage::loadString ( libhtmlpp::HtmlElement html,
const HtmlString node 
)

◆ loadString() [3/3]

void libhtmlpp::HtmlPage::loadString ( libhtmlpp::HtmlElement html,
const std::string &  src 
)

Parses an HTML source string and copies the result into html.

Parameters
htmlOutput root element to populate.
srcInput HTML source.
Exceptions
HTMLExceptionon malformed input.

Definition at line 1948 of file html.cpp.

◆ saveFile()

void libhtmlpp::HtmlPage::saveFile ( libhtmlpp::HtmlElement html,
const std::string &  path 
)

Serializes an HtmlElement subtree and writes it to a file.

Parameters
htmlElement to serialize.
pathDestination file path.
Exceptions
HTMLExceptionon I/O errors.

Definition at line 1975 of file html.cpp.


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