Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2007-07-12 14:02:51


on Thu Jul 12 2007, "Peter Dimov" <pdimov-AT-pdimov.com> wrote:

> David Abrahams wrote:
>> on Wed Jul 11 2007, Mathias Gaunard
>> <mathias.gaunard-AT-etu.u-bordeaux1.fr> wrote:
>>
>>> David Abrahams wrote:
>>>
>>>> I find XML horrible to read, however I find most of the
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>> procedural
>>>> code I've seen for manipulating it even more horrible.
>>>>
>>>> I would like to see a more declarative syntax for much of this
>>>> stuff.
>>>>
>>>>
>>>> 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

I don't know about that. The kind of interface used above has become
very popular in the Python world... because it's useful. It may not
cover the entire domain of XML manipulations well, but it does cover
an important corner.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com
The Astoria Seminar ==> http://www.astoriaseminar.com

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