Boost logo

Boost :

Subject: Re: [boost] [property_tree] RapidXML needs updating
From: Dmitry Vinogradov (sraider_at_[hidden])
Date: 2009-07-28 18:05:52


Preston A. Elder wrote:

> There is an existing problem with the version of rapidxml included with
> boost::property_tree (from the trunk, I have this as an SVN external
> into my own repository for my own project in preparation for it getting
> into boost proper).
>
> If I have something like:
> <field>&#x20;</field>
>
> The intention is obviously to have the value of field be a space. Since
> spaces are trimmed and condensed, something like:
> <field> </field>
> will not work.
>
> It seems that condensing of whitespace is happening AFTER the expansion
> of the &#xNN; expansion (similarly with &#NNN;). This is obviously an
> error, because otherwise there is no way for me to have a space as the
> first or last character (or have multiple spaces in a row).

I think this is the right behaviour.

BTW, if you want to get <field> with one space inside, you should write:
<field xml:space="preserve"> </field>
or
<field xml:space="preserve">&#x20;</field>


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