C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

xhtml generation library

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Mitchel Haas
Guest





PostPosted: Tue Jun 27, 2006 8:54 am    Post subject: xhtml generation library Reply with quote



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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.