|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r55884 - branches/sredl_2009_05_proptree_update/libs/property_tree/doc
From: sebastian.redl_at_[hidden]
Date: 2009-08-30 16:47:43
Author: cornedbee
Date: 2009-08-30 16:47:43 EDT (Sun, 30 Aug 2009)
New Revision: 55884
URL: http://svn.boost.org/trac/boost/changeset/55884
Log:
Update docs to reflect XML parser changes.
Text files modified:
branches/sredl_2009_05_proptree_update/libs/property_tree/doc/xml_parser.qbk | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
Modified: branches/sredl_2009_05_proptree_update/libs/property_tree/doc/xml_parser.qbk
==============================================================================
--- branches/sredl_2009_05_proptree_update/libs/property_tree/doc/xml_parser.qbk (original)
+++ branches/sredl_2009_05_proptree_update/libs/property_tree/doc/xml_parser.qbk 2009-08-30 16:47:43 EDT (Sun, 30 Aug 2009)
@@ -1,17 +1,17 @@
[section XML Parser]
[def __xml__ [@http://en.wikipedia.org/wiki/XML XML format]]
[def __xml_parser.hpp__ [headerref boost/property_tree/xml_parser.hpp xml_parser.hpp]]
-[def __TinyXML__ [@http://sourceforge.net/projects/tinyxml TinyXML]]
+[def __RapidXML__ [@http://rapidxml.sourceforge.net/ RapidXML]]
[def __boost__ [@http://www.boost.org Boost]]
The __xml__ is an industry standard for storing information in textual
form. Unfortunately, there is no XML parser in __boost__ as of the
-time of this writing. Therefore, a custom parser was created. It only supports
-a core subset of XML standard. For example, declarations and entity references
-are not supported. The parser is built with Spirit, and based on the XML grammar
-sample by Daniel Nuffer. As an alternative, a parser based on
-__TinyXML__ is also provided. To enable it define
-[^BOOST_PROPERTY_TREE_XML_PARSER_TINYXML] before including the
-__xml_parser.hpp__ file. __TinyXML__ library has to be obtained separately.
+time of this writing. The library therefore contains the fast and tiny
+__RapidXML__ parser (currently in version 1.13) to provide XML parsing support.
+RapidXML does not fully support the XML standard; it is not capable of parsing
+DTDs and therefore cannot do full entity substitution. The parser is configured
+to trim whitespace from the edges of character data. This behaviour exists for
+compatibility with older versions of PropertyTree and will be made configurable
+in the future.
XML / property tree conversion schema (__read_xml__ and __write_xml__):
@@ -28,6 +28,9 @@
relative ordering of text and child elements is lost. The other way stores
each text content as a separate node, all called [^<xmltext>].
-With comments and text node separation enabled, this conversion round-trips for
-the supported subset of XML.
+The XML storage encoding does not round-trip perfectly. A read-write cycle loses
+trimmed whitespace, low-level formatting information, and the distinction
+between normal data and CDATA nodes. Comments are only preserved when enabled.
+A write-read cycle loses trimmed whitespace; that is, if the origin tree has
+string data that starts or ends with whitespace, that whitespace is lost.
[endsect] [/xml_parser]
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk