2011-11-20 C++ HTML

Embedded Declarative HTML in C++

How about writing that in C++:

Node html
{"html", {{ "lang", "pl" }}, { // tag with attributes
  {"head", { // tag without attributes
    {"title", {
      "Page Title" // text node
    }}
  }},
  {"body", {{ "style", "background-color: #fff;" }}, {
    {"h1", {"Page Title"}},
    {"div", {}} // empty tag
  }}
}};

cout << html;

and getting that:

<html lang="pl">
  <head>
    <title>
      Page Title
    </title>
  </head>
  <body style="background-color: #fff;">
    <h1>
      Page Title
    </h1>
    <div />
  </body>
</html>

Continue Reading… Comments

2009-06-07 C++ make

One Makefile To Rule Them All

One Makefile to rule them all, One Makefile to find them,
One Makefile to bring them all and in the batch compile them
In the Land of Unix where the Shells lie.

Continue Reading… Comments

Toggle: Abstracts, All Tags
Long-standing Bug: All Articles, About, RSS
Tags: Clojure[4] GUI FTW[3] C++[2] HTML[2] Java[2] JavaScript[2] Makeblog[2] event handling[2] make[2] CoffeeScript[1] LOL[1] OpenGL[1] Python[1] WebGL[1] fail[1] graphics[1] pyparsing[1] screenshot[1] slideshow[1] sound[1]
© Copywrong 2011 Szymon Witamborski