[][src]Crate xml5ever

This crate provides a push based XML parser library that adheres to XML5 specification. In other words this library trades well-formedness for error recovery.

The idea behind this, was to minimize number of errors from tools that generate XML (e.g. &#83 won't just return &#83 as text, but will parse it into S ). You can check out full specification here.

What this library provides is a solid XML parser that can:

What isn't in scope for this library:

  • Document Type Definition parsing - this is pretty hard to do right and nowadays, its used

Modules

buffer_queue

The BufferQueue struct and helper types.

data

Data that is known at compile-time and hard-coded into the binary.

driver

Driver

interface

Types for tag and attribute names, and tree-builder functionality.

rcdom

A simple reference-counted DOM.

serialize

Traits for serializing elements. The serializer expects the data to be xml-like (with a name, and optional children, attrs, text, comments, doctypes, and processing instructions). It uses the visitor pattern, where the serializer and the serializable objects are decoupled and implement their own traits.

serialize

Serializer for XML5.

smallcharset

This module contains a single struct SmallCharSet. See its documentation for details.

tendril
tokenizer

XML5 tokenizer - converts input into tokens

tree_builder

XML5 tree builder - converts tokens into a tree like structure

Macros

expanded_name

Helper to quickly create an expanded name.

local_name

Takes a local name as a string and returns its key in the string cache.

namespace_prefix

Takes a namespace prefix string and returns its key in a string cache.

namespace_url

Takes a namespace url string and returns its key in a string cache.

ns

Maps the input of namespace_prefix! to the output of namespace_url!.

small_char_set

Create a SmallCharSet, with each space-separated number stored in the set.

Structs

LocalNameStaticSet
NamespaceStaticSet
PrefixStaticSet

Type Definitions

LocalName
Namespace
Prefix