
From: "Robert Ramey" <ramey@rrsd.com> 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
Robert Ramey
I just played with the examples demo_xml_load along with boost 1.39. As I mainly use xml as configuration files. I found some features I really like are missing: - often I need to edit the xml file manually with 3rd tools(gedit, kate notepad++ etc) other than the app itself. When saving back with those editors, they may add some BOM bytes(0xFFFE for UTF16LE, 0xFEFF for UTF16BE, 0xefbbbf for utf8) and replace the line-breakers(0x0a, 0x0a0d) with another fashion(e.g 0x0d0a -> 0x0a) the system default. In such cases, I wish boost.serialize would detect and ignore them as the real data the xml carries do NOT change. - 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, and embbded them when saving(is this possible). - I wish only the hierarchy not the order or nodes matters. Ex. <a> <first = "1st"> <second = "2nd"> </a> Would be equivalent to <a> <second = "2nd"> <first = "1st"> </a> It seems not to be support yet. On the whole, my impression is boost.serialize imposes some restrictions (orders for instance) that make sense to plain text files, but limits the buil-in flexibility that coming with xml.