Boost logo

Boost Users :

Subject: Re: [Boost-users] PropertyTree's XML parsers survey
From: Nat Goodspeed (nat_at_[hidden])
Date: 2009-05-18 10:27:37


Tan, Tom (Shanghai) wrote:

>> From: "Robert Ramey" <ramey_at_[hidden]>
>> Subject: Re: [Boost-users] PropertyTree's XML parsers survey
>
>> The serialization library has been using the spirit library
>> for parsing XML for years. This is for both utf-8 and wide characters
>
> I mainly use xml as configuration files. I found some features I really
> like are missing:

Heh. Just a guess, but I'm guessing Robert will say he intentionally
parses the smallest possible subset of XML needed to support the syntax
he knows the XML archive writes. Instead of adding features to his
parser, I bet he'll simply suggest you implement an alternative XML
archive type based on an existing general-purpose XML parser library.

> - I often embed some comment nodes inside the xml to facilitate the
> manual edit. E.g, enumeration of accepted value some fields. I wish
> boost.serialize ignores them when parsing,

That seems plausible to me...

> and embed them when saving (is this possible).

This request feels more difficult. Boost.Serialize is designed to read
from a file into /your/ data structures, and/or write those data
structures to a file. XML is only one of several possible archive
formats for such a file.

Where in your own data structures would you recommend the Serialize
library store any XML comments it may encounter?

Supposing there were an appropriate place to collect such comments, how
would you write them again in something like their original file location?

> On the whole, my impression is boost.serialize imposes some restrictions
> (orders for instance) that make sense to plain text files, but limits
> the built-in flexibility that coming with xml.

Instead of incrementally enhancing a minimal XML parser, wouldn't it
make more sense to jump right to an existing full-blown parser
implementation?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net