| 1 | // Copyright 2014-2017 The html5ever Project Developers. See the |
| 2 | // COPYRIGHT file at the top-level directory of this distribution. |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or |
| 5 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license |
| 6 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your |
| 7 | // option. This file may not be copied, modified, or distributed |
| 8 | // except according to those terms. |
| 9 | |
| 10 | //! This crate provides a push based XML parser library that |
| 11 | //! adheres to XML5 specification. In other words this library |
| 12 | //! trades well-formedness for error recovery. |
| 13 | //! |
| 14 | //! The idea behind this, was to minimize number of errors from |
| 15 | //! tools that generate XML (e.g. `S` won't just return `S` |
| 16 | //! as text, but will parse it into `S` ). |
| 17 | //! You can check out full specification [here](https://ygg01.github.io/xml5_draft/). |
| 18 | //! |
| 19 | //! What this library provides is a solid XML parser that can: |
| 20 | //! |
| 21 | //! * Parse somewhat erroneous XML input |
| 22 | //! * Provide support for [Numeric character references](https://en.wikipedia.org/wiki/Numeric_character_reference). |
| 23 | //! * Provide partial [XML namespace](http://www.w3.org/TR/xml-names11/) support. |
| 24 | //! * Provide full set of SVG/MathML entities |
| 25 | //! |
| 26 | //! What isn't in scope for this library: |
| 27 | //! |
| 28 | //! * Document Type Definition parsing - this is pretty hard to do right and nowadays, its used |
| 29 | //! |
| 30 | |
| 31 | #![crate_name = "xml5ever"] |
| 32 | #![crate_type = "dylib"] |
| 33 | #![allow(unexpected_cfgs)] |
| 34 | #![deny(missing_docs)] |
| 35 | |
| 36 | pub use markup5ever::*; |
| 37 | |
| 38 | pub(crate) mod macros; |
| 39 | |
| 40 | /// Driver |
| 41 | pub mod driver; |
| 42 | /// Serializer for XML5. |
| 43 | pub mod serialize; |
| 44 | /// XML5 tokenizer - converts input into tokens |
| 45 | pub mod tokenizer; |
| 46 | /// XML5 tree builder - converts tokens into a tree like structure |
| 47 | pub mod tree_builder; |