xhtml generation library

M

Mitchel Haas

Hello,

A few months ago, I received some good feedback and suggestions regarding
the tree container library I was working on. I'm in the process of
finishing a new
library for xhtml generation, called xhtml_gen, and was hoping to get some
feedback
on this new library.

The library generates well formed xhtml documents, and formats the raw
content with indenting
between the nested (block level) elements.
xhtml_gen uses the tree container library to store the element nodes in a
natural tree like structure,
which is transparent to the user.

There is just a handful of interface classes including xhtml_document<>,
xhtml_element,
stylesheet, and stylesheet_rule. The two template classes will accept a
template parameter of
xhtml_transitional, xhtml_frameset, or xhtml_strict, which are enumerations
for the element names.

A typedef is provided for the default document type (xhtml_strict), which
defines document, and element
as the two interface types to use.

Creating a simple xhtml_document is as easy as....

document doc;
element h1_elem(h1); // create an h1 element
h1_elem << "Sample xhtml Doc"; // insert text in h1 element
doc << h1_elem; // insert h1 element in doc

// lets use 2nd method to insert content, which returns an element iterator
element::iterator it = doc.insert(element(ul)); // create a user list
element
*it << (element(li) << "First Item"); // need these parenth
it = it->insert(element(li)); // it now points to list item element
*it << "Second Item";

doc.save("c:\\my_xhtml_doc.htm");

Library documentation and downloads are at
http://www.datasoftsolutions.net/xhtml_gen/overview.php

Thanks in advance,

Mitch Haas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top