nomlib
Loading...
Searching...
No Matches
nom::HTMLElement Class Reference

An HTML element, can contain children (either text or other elements), as well as storing a list of attributes. More...

#include <MiniHTML.hpp>

Inheritance diagram for nom::HTMLElement:
[legend]

Public Member Functions

 HTMLElement (const std::string &tag)
void append_attribute (const std::string &name, const std::string &value)
void append_child (HTMLNode *node)
HTMLElement * append_element (const std::string &type)
HTMLTextNodeappend_text (const std::string &text)
virtual std::string print (const std::string &indent="")

Private Attributes

std::string tag_name_
std::list< std::pair< std::string, std::string > > attributes_
std::list< HTMLNode * > children_

Detailed Description

An HTML element, can contain children (either text or other elements), as well as storing a list of attributes.

Definition at line 71 of file MiniHTML.hpp.

Member Function Documentation

◆ print()

virtual std::string nom::HTMLElement::print ( const std::string & indent = "")
virtual

Implements nom::HTMLNode.

Member Data Documentation

◆ attributes_

std::list<std::pair<std::string, std::string> > nom::HTMLElement::attributes_
private

Definition at line 92 of file MiniHTML.hpp.

◆ children_

std::list<HTMLNode*> nom::HTMLElement::children_
private

Definition at line 93 of file MiniHTML.hpp.

◆ tag_name_

std::string nom::HTMLElement::tag_name_
private

Definition at line 91 of file MiniHTML.hpp.


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