Light-weight, simple and fast XML parser for C++ with XPath support
Find a file
Arseny Kapoulkine 47c15ad949 Implement document fragment parsing.
Introduce a notable behavior change in default parsing mode: documents without a
document element node are now considered invalid. This is technically a breaking change,
however the amount of documents it affects is very small, all parsed data still persists,
and lack of this check results in very confusing behavior in a number of cases.

In order to be able to parse documents without an element node, a fragment parsing flag is
introduced.

Parsing a buffer in fragment mode treats the buffer as a fragment of a valid XML.
As a consequence, top-level PCDATA is added to the tree; additionally, there are no
restrictions on the number of nodes -- so documents without a document element are considered
valid.

Due to the way parsing works internally, load_buffer_inplace occasionally can not preserve
the document contents if it's parsed in a fragment mode. While unfortunate, this problem is
fundamental; since the use case is relatively obscure, hopefully documenting this shortcoming
will be enough.

git-svn-id: https://pugixml.googlecode.com/svn/trunk@980 99668b35-9821-0410-8761-19e4c4f06640
2014-02-11 06:45:27 +00:00
contrib contrib: Foreach contrib file is not really needed any more; left for compatibility, + removed node/attribute adapters since we now have object range support in pugixml.hpp 2012-03-27 05:31:33 +00:00
docs Update compatibility section of the manual 2014-02-10 05:21:40 +00:00
scripts Update version to 1.4 and copyright year to 2014. 2014-02-08 23:01:58 +00:00
src Implement document fragment parsing. 2014-02-11 06:45:27 +00:00
tests Implement document fragment parsing. 2014-02-11 06:45:27 +00:00
.travis.yml Fix .travis.yml script 2014-02-09 22:02:48 +00:00
Jamfile.jam Update version to 1.4 and copyright year to 2014. 2014-02-08 23:01:58 +00:00
Jamrules.jam Fix documentation building on Linux 2013-07-10 04:38:21 +00:00
Makefile Add Makefile for building and running tests. 2014-02-09 21:56:30 +00:00
README.md Add README.md for GitHub 2014-02-09 00:28:29 +00:00
readme.txt Update version to 1.4 and copyright year to 2014. 2014-02-08 23:01:58 +00:00

pugixml Build Status

pugixml is a C++ XML processing library, which consists of a DOM-like interface with rich traversal/modification capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0 implementation for complex data-driven tree queries. Full Unicode support is also available, with Unicode interface variants and conversions between different Unicode encodings (which happen automatically during parsing/saving).

pugixml is used by a lot of projects, both open-source and proprietary, for performance and easy-to-use interface.

Documentation

Documentation for the current release of pugixml is available on-line as two separate documents:

Youre advised to start with the quick-start guide; however, many important library features are either not described in it at all or only mentioned briefly; if you require more information you should read the complete manual.

License

This library is available to anybody free of charge, under the terms of MIT License:

Copyright (c) 2006-2014 Arseny Kapoulkine

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.