Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2007-07-10 22:00:05


on Mon Jul 09 2007, Stefan Seefeld <seefeld-AT-sympatico.ca> wrote:

> Jake Voytko wrote:
>
>> I'm looking through the example code and I have a few questions.
>>
>> - Is it possible to have parameters in the tags? For example:
>>
>> element_ptr g_elem = root->insert_element("g");
>> g_elem->add_parameter("stroke_color", "red");
>>
>> produces:
>>
>> <g stroke_color = "red">
>> ..
>> </g>
>>
>> Is this what append_element() does, or is there another function to do this?
>
> What you call a 'parameter' is actually called an 'attribute', and it gets
> set like
>
> g_elem->set_parameter("stroke_color", "red");

Surely

        g_elem->set_attribute(...)

?

-- 
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