Boost logo

Boost :

From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2007-07-13 14:11:01


Peter Dimov a écrit :
> David Abrahams wrote:

>>>> root.push_front(
>>>> tag("articleinfo")[
>>>> title ? (comment("This title was moved"), title) : NULL
>>>> , tag("author")[
>>>> tag("firstname")["Joe"],
>>>> tag("surname")["Random"]
>>>> ]
>>>> ]
>>>> )
>>> Interesting. It doesn't look a lot like raw XML
>> Maybe that's the point ;-)
>>
>>> but it certainly integrates better into C++.
>> That too.
>
> You're optimizing the wrong case, a toy example.

Its best usage is obviously for an XML template, where variables
directly maps to the contents of an XML structure.

To do that, people usually invent pseudo-languages that integrate into
XML, but then they end up duplicating full programming languages, with
an even uglier syntax.

Being able to write an XML document and integrate it with C++ variables
and logic is what that kind of stuff is for.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk