473,406 Members | 2,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

xhtml generation library

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


Jun 27 '06 #1
0 1187

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

51
by: Mudge | last post by:
Please, someone, tell me why OO in PHP is better than procedural.
3
by: Frank Thomas | last post by:
So, where are we (as an industry) with regards to XHTML? I've been going through a book published in 2002 that promotes the idea that we should all be looking to create new projects as compliant...
1
by: darrel | last post by:
I have two issues: 1) The WYSIWYG content editor we're using for our CMS doesn't truly support xhtml. 2) .net doesn't truly support xhtml my question is if there is a .net...
6
by: interfaced | last post by:
I am trying to include and xml document inside my xhtml document. There are a number of reasons for this including portability, multiple interface generation, and scalability of information. My...
4
by: musosdev | last post by:
I think I'm having a dim day and should just go back to bed, but alas, I cant do that.... I'm writing a peice of code to create XHTML compliant documents using System.IO, there's probably an...
4
by: Alexandre Drolet | last post by:
I have heard a lot of time that one day XML will replace XHTML for Web page development; and that XHTML will not be used anymore. Since XHTML is still widely used,do you think that these "sayings"...
2
by: Cat | last post by:
I created a web site, and I thought I followed XHTML 1.1 rules. But when I validated the pages, I got some error messages. I found that those codes are automatically generated parts by ASP.NET. ...
7
by: C.W.Holeman II | last post by:
For info on the context of my question see the end of this posting. From http://www.w3.org/TR/XHTMLplusMathMLplusSVG/: How can I validate the result of client-side XSLT transform which has...
0
by: Mitchel Haas | last post by:
I've noticed several inquiries in the past for libraries/toolkits to generate or parse xhtml. Although there are already a few libraries available for this purpose, I'd like to announce a new...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.