Hacker News new | ask | show | jobs
by Negitivefrags 2741 days ago
You would implement that like this:

    HTML::document d;   
    HTML::p p( d );
    d.text( "Hello, " );
    {
        HTML::span s( d );
        d.text( "world!" );
    }
    d.text( " Welcome!" );

Obviously though, if you were trying to do an HTML parser as well, then my ideas are not appropriate.