libhtmlpp 1.0.0
Loading...
Searching...
No Matches
html.h
Go to the documentation of this file.
1
9/*******************************************************************************
10Copyright (c) 2014, Jan Koester jan.koester@gmx.net
11All rights reserved.
12
13Redistribution and use in source and binary forms, with or without
14modification, are permitted provided that the following conditions are met:
15 * Redistributions of source code must retain the above copyright
16 notice, this list of conditions and the following disclaimer.
17 * Redistributions in binary form must reproduce the above copyright
18 notice, this list of conditions and the following disclaimer in the
19 documentation and/or other materials provided with the distribution.
20 * Neither the name of the <organization> nor the
21 names of its contributors may be used to endorse or promote products
22 derived from this software without specific prior written permission.
23
24THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
25ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
28DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34*******************************************************************************/
35
36#include <sys/types.h>
37
38#include <string>
39#include <cstring>
40#include <vector>
41#include <stack>
42#include <memory>
43
44#pragma once
50namespace libhtmlpp {
54 class DocElements;
58 class HtmlElement;
62 class HtmlString;
63
76 class Element {
77 public:
78 virtual ~Element();
79
80 Element(const Element &el);
81
82 void insertAfter(Element* el);
83 void insertBefore(Element* el);
84
85 Element& operator=(const Element &hel);
86 Element& operator=(const Element *hel);
87
88 Element* nextElement() const;
89 Element* prevElement() const;
90 Element* parentElement() const;
91
92 virtual void remove(Element* el);
93
94 virtual int getType() const=0;
95 protected:
96
97 Element();
98
99 std::unique_ptr<Element> _nextElement;
102
103 friend class HtmlElement;
104 friend class TextElement;
105 friend class HtmlString;
106 friend void print(const Element& element, HtmlString &output,bool formated);
107 friend void _copy(libhtmlpp::Element *dest,const libhtmlpp::Element *src);
108 };
109
110 class HtmlElement : public Element {
111 public:
112 HtmlElement();
113 HtmlElement(const std::string &tag);
114 HtmlElement(const HtmlElement &hel);
115 HtmlElement(const HtmlElement *hel);
116 ~HtmlElement();
117
118 HtmlElement& operator=(const HtmlElement &hel);
119 HtmlElement& operator=(const HtmlElement *hel);
120
121 bool operator==(const HtmlElement *hel);
122 bool operator==(const HtmlElement &hel);
123
124 void setAttribute(const std::string &name, const std::string &value);
125
126 void setIntAttribute(const std::string &name, int value);
127
128 const std::string getAtributte(const std::string &name) const;
129
130 int getIntAtributte(const std::string &name) const;
131
132 void insertChild(const Element* el);
133 void insertChild(const Element& el);
134 void appendChild(const Element* el);
135 void appendChild(const Element& el);
136
137 void setTagname(const std::string &name);
138 const std::string getTagname() const;
139
140 HtmlElement *getElementbyID(const std::string &id) const;
141 HtmlElement *getElementbyTag(const std::string &tag) const;
142
143 Element* firstChild() const;
144
145 struct Attributes {
146 Attributes();
147 ~Attributes();
148
149 const std::string getKey() const;
150 const std::string getValue() const;
151 Attributes* nextAttribute() const;
152
153 private:
154 std::vector<char> _Key;
155 std::vector<char> _Value;
156 std::unique_ptr<Attributes> _nextAttr;
157
158 friend class HtmlElement;
159 friend void print(const Element& element, HtmlString &output,bool formated);
160 friend void _copy(libhtmlpp::Element *dest,const libhtmlpp::Element *src);
161 };
162
163 const Attributes* firstAttribute() const;
164
165 int getType() const;
166 void remove(Element* el);
167
168 static size_t parseElement(const std::vector<char> &in,std::unique_ptr<libhtmlpp::Element> &el,size_t start,bool &termination);
169
179 static size_t parseStyleElement(const std::vector<char> &in,std::unique_ptr<libhtmlpp::Element> &el,size_t start,bool &termination);
180 protected:
181
182 std::unique_ptr<Element> _childElement=nullptr;
183
184 // preserveAttrCase: skip lowercasing attribute keys (SVG's own attributes
185 // like viewBox/preserveAspectRatio are case-sensitive per the XML/SVG spec,
186 // unlike regular HTML attributes).
187 void _serialelize(const std::vector<char> &in, bool preserveAttrCase = false);
188 private:
189 //if text tagname must be zero
190 std::vector<char> _TagName;
191
192 //if text Attributes must be zero
193 std::unique_ptr<Attributes> _firstAttr;
194 Attributes* _lastAttr;
195
196 // Sets `node`'s parent to `parent`, and does the same for every
197 // sibling reachable via nextElement() (they share the same parent)
198 // -- recursing into each HtmlElement-shaped node's own child chain
199 // (with that node as the new parent). Called after building or
200 // copying a subtree, once its own sibling/child links are already
201 // correct, rather than threaded through the parser/copy internals
202 // themselves.
203 static void _assignParentPointers(Element* node, Element* parent);
204
205 friend class HtmlString;
206 friend class HtmlTable;
207 friend void print(const Element& element, HtmlString &output,bool formated);
208 friend void _copy(libhtmlpp::Element *dest,const libhtmlpp::Element *src);
209 };
214 class TextElement : public Element {
215 public:
216 TextElement();
217 TextElement(const std::string &txt);
218 TextElement(const TextElement &texel);
219 ~TextElement();
220
221 TextElement& operator=(const Element &hel);
222 TextElement& operator=(const Element *hel);
223
224 const std::string getText();
225 void setText(const std::string &txt);
226
227 int getType() const;
228
229 static size_t parseElement(const std::vector<char> &in,std::unique_ptr<libhtmlpp::Element> &el,size_t start,bool &termination);
230
231 protected:
232 std::vector<char> _Text;
233 friend class HtmlString;
234 friend void print(const Element& element, HtmlString &output,bool formated);
235 friend void _copy(libhtmlpp::Element *dest,const libhtmlpp::Element *src);
236 };
241 class CommentElement : public Element{
242 public:
244 CommentElement(const CommentElement &comel);
246
247 CommentElement& operator=(const Element &hel);
248 CommentElement& operator=(const Element *hel);
249
250 const std::string getComment();
251 void setComment(const std::string &txt);
252
253 int getType() const;
254
255 static size_t parseElement(const std::vector<char> &in,std::unique_ptr<libhtmlpp::Element> &el,size_t start,bool &termination);
256 protected:
257 std::vector<char> _Comment;
258 friend class HtmlString;
259 friend void print(const Element& element, HtmlString &output,bool formated);
260 friend void _copy(libhtmlpp::Element *dest,const libhtmlpp::Element *src);
261 };
267 public:
269 ScriptElement(const ScriptElement &scriptsrc);
271
272 ScriptElement& operator=(const Element &hel);
273 ScriptElement& operator=(const Element *hel);
274
275 const std::string getScript();
276 void setScript(const std::string &txt);
277
278 int getType() const;
279
280 void insertChild(const Element* el)=delete;
281 void insertChild(const Element& el)=delete;
282 void appendChild(const Element* el)=delete;
283 void appendChild(const Element& el)=delete;
284
285 static size_t parseElement(const std::vector<char> &in,std::unique_ptr<libhtmlpp::Element> &el,size_t start,bool &termination);
286 protected:
287
288 std::unique_ptr<Element> _childElement=nullptr;
289
290 std::vector<char> _Script;
291 friend class HtmlString;
292 friend void print(const Element& element, HtmlString &output,bool formated);
293 friend void _copy(libhtmlpp::Element *dest,const libhtmlpp::Element *src);
294 };
299 class SvgElement : public HtmlElement{
300 public:
301 SvgElement();
302 SvgElement(const SvgElement &svgsrc);
303 ~SvgElement();
304
305 SvgElement& operator=(const Element &hel);
306 SvgElement& operator=(const Element *hel);
307
308 const std::vector<char> getSvg();
309 void setSvg(const std::string &svg);
310
311 int getType() const;
312
313 void insertChild(const Element* el)=delete;
314 void insertChild(const Element& el)=delete;
315 void appendChild(const Element* el)=delete;
316 void appendChild(const Element& el)=delete;
317
318 static size_t parseElement(const std::vector<char> &in,std::unique_ptr<libhtmlpp::Element> &el,size_t start,bool &termination);
319 protected:
320
321 std::unique_ptr<Element> _childElement=nullptr;
322
323 std::vector<char> _Svg;
324 friend class HtmlString;
325 friend void print(const Element& element, HtmlString &output,bool formated);
326 friend void _copy(libhtmlpp::Element *dest,const libhtmlpp::Element *src);
327 };
328
333 class TextArea : public HtmlElement{
334 public:
335 TextArea();
336 TextArea(const TextArea &textsrc);
337 ~TextArea();
338
339 TextArea& operator=(const Element &hel);
340 TextArea& operator=(const Element *hel);
341
342 const std::vector<char> getText();
343 void setText(const std::string &text);
344
345 int getType() const;
346
347 void insertChild(const Element* el)=delete;
348 void insertChild(const Element& el)=delete;
349 void appendChild(const Element* el)=delete;
350 void appendChild(const Element& el)=delete;
351
352 static size_t parseElement(const std::vector<char> &in,std::unique_ptr<libhtmlpp::Element> &el,size_t start,bool &termination);
353 protected:
354
355 std::unique_ptr<Element> _childElement=nullptr;
356
357 std::vector<char> _Text;
358 friend class HtmlString;
359 friend void print(const Element& element, HtmlString &output,bool formated);
360 friend void _copy(libhtmlpp::Element *dest,const libhtmlpp::Element *src);
361 };
362
371 void print(const Element& element, HtmlString &output,bool formated=false);
372
374 public:
375
376 using value_type = char;
377
378 HtmlString()=default;
379 HtmlString(const HtmlString &str);
380 HtmlString(char str);
381 HtmlString(const std::string &str);
382 ~HtmlString();
383
384 void append(const std::string &src);
385 void append(HtmlString& hstring);
386
387 void push_back(const char src);
388
389 void insert(size_t pos, char src);
390
391 HtmlString& operator+=(const std::string &src);
393 HtmlString& operator=(const std::string &src);
394 HtmlString& operator=(const HtmlString& src);
395 char operator[](size_t pos) const;
396
397 HtmlString& operator<<(const char* src);
398 HtmlString& operator<<(const std::string &src);
400 HtmlString& operator<<(int src);
401 HtmlString& operator<<(char src);
402 HtmlString& operator<<(size_t src);
403
404 const char* operator*();
405
406 size_t size() const;
407 size_t length() const;
408 void clear();
409 bool empty();
410
411 const std::vector<char>& data() const;
412 const std::string str() const;
413 const char *c_str() const;
421
422 private:
423 std::unique_ptr<Element> _rootEl;
424 void _buildTree();
425 void _buildtreenode(DocElements *firstel,DocElements *lastel,std::unique_ptr<Element>&html);
426 std::vector<char> _Data;
427 friend void HtmlEncode(const std::string &input,HtmlString *output);
428 friend class HtmlPage;
429 };
435 void HtmlDecode(const std::string &input,HtmlString &output);
436
442 void HtmlDecode(const std::string &input,std::string &output);
443
450 void HtmlEncode(const std::string &input,std::string &output);
455 class HtmlPage {
456 public:
457 HtmlPage();
458 ~HtmlPage();
459 void loadFile(libhtmlpp::HtmlElement &html,const std::string &path);
460 void saveFile(libhtmlpp::HtmlElement &html,const std::string &path);
461 void loadString(libhtmlpp::HtmlElement &html,const std::string &src);
462 void loadString(libhtmlpp::HtmlElement &html,const HtmlString &node);
464 bool isHtml5();
465 private:
466 void _CheckHeader(const HtmlString& page);
467 bool _Html5 = true;
468 };
469
470 class HtmlTable {
471 public:
472 HtmlTable();
473 ~HtmlTable();
474
475 class Column {
476 public:
477 std::string Data;
478 ~Column();
479 Column(const Column &col);
480 Column();
481 Column(const std::string &data);
482 Column(const HtmlString &data);
483 Column(Column&& col) noexcept;
484 private:
485 std::unique_ptr<Column> _nextColumn;
486 friend class HtmlTable;
487 };
488
489 class Row {
490 public:
491 Row();
492 Row(const Row &row);
493 ~Row();
494
495 Row &operator<<(Column &&col);
496 Row& operator<<(const Column &col);
497 Row& operator<<(const HtmlString &value);
498 Row& operator<<(const std::string &value);
499 Row& operator<<(const char* value);
500 Row& operator<<(int value);
501
502 Column& operator[](size_t pos);
503
504 void delColumn(size_t pos);
505 void clear();
506 private:
507 std::unique_ptr<Column> _firstColumn;
508 Column *_lastColumn;
509 std::unique_ptr<Row> _nextRow;
510 size_t _count;
511 friend class HtmlTable;
512 };
513
514 Row& operator<<(const Row &row);
515 Row& operator[](size_t pos);
516
517 void insert(HtmlElement *element);
518 void parse(HtmlElement *element);
519
520 void setHeader(int count,...);
521 void deleteRow(size_t pos);
522 private:
523 std::unique_ptr<Row> _firstRow;
524 Row *_lastRow;
525 Row _header;
526 size_t _count;
527 };
528};
529
530std::ostream& operator<<(std::ostream& os, const libhtmlpp::HtmlString& p);
Leaf node representing an HTML comment ().
Definition html.h:241
static size_t parseElement(const std::vector< char > &in, std::unique_ptr< libhtmlpp::Element > &el, size_t start, bool &termination)
Definition html.cpp:1738
CommentElement & operator=(const Element &hel)
Definition html.cpp:1715
std::vector< char > _Comment
Definition html.h:257
friend void print(const Element &element, HtmlString &output, bool formated)
Serializes an element (and its subtree) into an HtmlString.
friend void _copy(libhtmlpp::Element *dest, const libhtmlpp::Element *src)
Definition html.cpp:1269
void setComment(const std::string &txt)
Definition html.cpp:1725
const std::string getComment()
Definition html.cpp:1730
Abstract base class for all nodes in the HTML tree.
Definition html.h:76
virtual void remove(Element *el)
Definition html.cpp:1582
Element * _prevElement
Definition html.h:100
void insertAfter(Element *el)
Definition html.cpp:1501
virtual ~Element()
Definition html.cpp:1575
Element * _parentElement
Definition html.h:101
void insertBefore(Element *el)
Definition html.cpp:1469
Element & operator=(const Element &hel)
Definition html.cpp:1542
std::unique_ptr< Element > _nextElement
Definition html.h:99
virtual int getType() const =0
Definition html.cpp:802
friend void print(const Element &element, HtmlString &output, bool formated)
Serializes an element (and its subtree) into an HtmlString.
Element * prevElement() const
Definition html.cpp:1556
Element * parentElement() const
Definition html.cpp:1560
friend void _copy(libhtmlpp::Element *dest, const libhtmlpp::Element *src)
Definition html.cpp:1269
Element * nextElement() const
Definition html.cpp:1552
int getType() const
Definition html.cpp:2787
const Attributes * firstAttribute() const
Definition html.cpp:2705
HtmlElement * getElementbyTag(const std::string &tag) const
Definition html.cpp:2662
const std::string getAtributte(const std::string &name) const
Definition html.cpp:2757
void _serialelize(const std::vector< char > &in, bool preserveAttrCase=false)
Extracts tag name and attributes from a token vector into an HtmlElement.
Definition html.cpp:998
static size_t parseElement(const std::vector< char > &in, std::unique_ptr< libhtmlpp::Element > &el, size_t start, bool &termination)
Definition html.cpp:1110
static size_t parseStyleElement(const std::vector< char > &in, std::unique_ptr< libhtmlpp::Element > &el, size_t start, bool &termination)
Parses a <style> tag the same "raw text until literal </style>" way ScriptElement::parseElement parse...
Definition html.cpp:1174
void appendChild(const Element *el)
Definition html.cpp:872
int getIntAtributte(const std::string &name) const
Definition html.cpp:2771
void setTagname(const std::string &name)
Definition html.cpp:806
void setAttribute(const std::string &name, const std::string &value)
Definition html.cpp:2709
void remove(Element *el)
Definition html.cpp:949
friend void print(const Element &element, HtmlString &output, bool formated)
Serializes an element (and its subtree) into an HtmlString.
bool operator==(const HtmlElement *hel)
Definition html.cpp:921
friend void _copy(libhtmlpp::Element *dest, const libhtmlpp::Element *src)
Definition html.cpp:1269
void insertChild(const Element *el)
Definition html.cpp:835
Element * firstChild() const
Definition html.cpp:2689
const std::string getTagname() const
Definition html.cpp:811
HtmlElement * getElementbyID(const std::string &id) const
Definition html.cpp:2635
HtmlElement & operator=(const HtmlElement &hel)
Definition html.cpp:939
std::unique_ptr< Element > _childElement
Definition html.h:182
void setIntAttribute(const std::string &name, int value)
Definition html.cpp:2751
High level loader/saver for HTML documents (files and strings).
Definition html.h:455
void loadString(libhtmlpp::HtmlElement &html, const std::string &src)
Parses an HTML source string and copies the result into html.
Definition html.cpp:2187
void loadString(libhtmlpp::HtmlElement &html, const HtmlString *node)
void saveFile(libhtmlpp::HtmlElement &html, const std::string &path)
Serializes an HtmlElement subtree and writes it to a file.
Definition html.cpp:2214
void loadFile(libhtmlpp::HtmlElement &html, const std::string &path)
Loads an HTML file from disk into a given HtmlElement root.
Definition html.cpp:2158
const std::vector< char > & data() const
Definition html.cpp:374
friend void HtmlEncode(const std::string &input, HtmlString *output)
void append(const std::string &src)
Definition html.cpp:238
HtmlString & operator<<(const char *src)
Definition html.cpp:301
HtmlString & operator+=(const std::string &src)
Definition html.cpp:275
size_t size() const
Definition html.cpp:350
char operator[](size_t pos) const
Definition html.cpp:297
void push_back(const char src)
Definition html.cpp:226
void insert(size_t pos, char src)
Definition html.cpp:261
const char * c_str() const
Definition html.cpp:370
size_t length() const
Definition html.cpp:340
libhtmlpp::Element & parse()
Parses the current buffer into a DOM-like tree and returns the root element.
Definition html.cpp:379
const char * operator*()
Definition html.cpp:336
HtmlString & operator=(const std::string &src)
Definition html.cpp:285
const std::string str() const
Definition html.cpp:364
Row & operator<<(Column &&col)
Definition html.cpp:2932
Column & operator[](size_t pos)
Definition html.cpp:2986
void delColumn(size_t pos)
Definition html.cpp:3002
Row & operator[](size_t pos)
Definition html.cpp:2816
Row & operator<<(const Row &row)
Definition html.cpp:2801
void deleteRow(size_t pos)
Definition html.cpp:2860
void parse(HtmlElement *element)
Definition html.cpp:2847
void insert(HtmlElement *element)
Definition html.cpp:2832
void setHeader(int count,...)
Definition html.cpp:2850
Element representing a <script> tag and its text content.
Definition html.h:266
void setScript(const std::string &txt)
Definition html.cpp:1802
static size_t parseElement(const std::vector< char > &in, std::unique_ptr< libhtmlpp::Element > &el, size_t start, bool &termination)
Definition html.cpp:1814
ScriptElement & operator=(const Element &hel)
Definition html.cpp:1792
void insertChild(const Element &el)=delete
std::unique_ptr< Element > _childElement
Definition html.h:288
void appendChild(const Element &el)=delete
std::vector< char > _Script
Definition html.h:290
void appendChild(const Element *el)=delete
void insertChild(const Element *el)=delete
const std::string getScript()
Definition html.cpp:1806
friend void print(const Element &element, HtmlString &output, bool formated)
Serializes an element (and its subtree) into an HtmlString.
friend void _copy(libhtmlpp::Element *dest, const libhtmlpp::Element *src)
Definition html.cpp:1269
Element representing an embedded <svg> tag and its attributes/content.
Definition html.h:299
int getType() const
Definition html.cpp:1968
void appendChild(const Element &el)=delete
void insertChild(const Element *el)=delete
SvgElement & operator=(const Element &hel)
Definition html.cpp:1949
static size_t parseElement(const std::vector< char > &in, std::unique_ptr< libhtmlpp::Element > &el, size_t start, bool &termination)
Definition html.cpp:1972
std::unique_ptr< Element > _childElement
Definition html.h:321
const std::vector< char > getSvg()
Definition html.cpp:1964
void insertChild(const Element &el)=delete
friend void print(const Element &element, HtmlString &output, bool formated)
Serializes an element (and its subtree) into an HtmlString.
friend void _copy(libhtmlpp::Element *dest, const libhtmlpp::Element *src)
Definition html.cpp:1269
std::vector< char > _Svg
Definition html.h:323
void appendChild(const Element *el)=delete
void setSvg(const std::string &svg)
Definition html.cpp:1959
Element representing an embedded <textarea> tag and its attributes/content.
Definition html.h:333
std::unique_ptr< Element > _childElement
Definition html.h:355
void appendChild(const Element &el)=delete
void insertChild(const Element &el)=delete
void appendChild(const Element *el)=delete
void insertChild(const Element *el)=delete
std::vector< char > _Text
Definition html.h:357
friend void print(const Element &element, HtmlString &output, bool formated)
Serializes an element (and its subtree) into an HtmlString.
TextArea & operator=(const Element &hel)
Definition html.cpp:2036
const std::vector< char > getText()
Definition html.cpp:2051
friend void _copy(libhtmlpp::Element *dest, const libhtmlpp::Element *src)
Definition html.cpp:1269
static size_t parseElement(const std::vector< char > &in, std::unique_ptr< libhtmlpp::Element > &el, size_t start, bool &termination)
Definition html.cpp:2059
int getType() const
Definition html.cpp:2055
void setText(const std::string &text)
Definition html.cpp:2046
Leaf node representing plain text content of an HTML document.
Definition html.h:214
TextElement & operator=(const Element &hel)
Definition html.cpp:1629
std::vector< char > _Text
Definition html.h:232
void setText(const std::string &txt)
Definition html.cpp:1639
int getType() const
Definition html.cpp:1647
friend void print(const Element &element, HtmlString &output, bool formated)
Serializes an element (and its subtree) into an HtmlString.
friend void _copy(libhtmlpp::Element *dest, const libhtmlpp::Element *src)
Definition html.cpp:1269
static size_t parseElement(const std::vector< char > &in, std::unique_ptr< libhtmlpp::Element > &el, size_t start, bool &termination)
Definition html.cpp:1651
const std::string getText()
Definition html.cpp:1643
std::ostream & operator<<(std::ostream &os, const libhtmlpp::HtmlString &p)
Streams an HtmlString to an output stream using its underlying string.
Definition html.cpp:734
Core namespace for the libhtmlpp HTML parsing and printing library.
Definition css.h:37
ElementType
Definition html.h:64
@ TextEl
Definition html.h:65
@ ScriptEL
Definition html.h:68
@ HtmlEl
Definition html.h:66
@ TextAreaEL
Definition html.h:70
@ SvgEL
Definition html.h:69
@ CommentEl
Definition html.h:67
void print(const Element &element, HtmlString &output, bool formated=false)
Serializes an element (and its subtree) into an HtmlString.
Definition html.cpp:2328
void HtmlEncode(const std::string &input, std::string &output)
Encodes special HTML characters in a string and writes into std::string.
Definition html.cpp:739
void HtmlDecode(const std::string &input, HtmlString &output)
Decodes special HTML characters in a string and appends to an HtmlString.
Definition html.cpp:773
const std::string getValue() const
Definition html.cpp:2697
friend void print(const Element &element, HtmlString &output, bool formated)
Serializes an element (and its subtree) into an HtmlString.
Attributes * nextAttribute() const
Definition html.cpp:2701
friend void _copy(libhtmlpp::Element *dest, const libhtmlpp::Element *src)
Definition html.cpp:1269
const std::string getKey() const
Definition html.cpp:2693