xml-enumerator-0.3.4: Pure-Haskell utilities for dealing with XML with the enumerator package.

Text.XML.Enumerator.Resolved

Contents

Synopsis

Data types

data Name

A fully qualified name.

Prefixes are not semantically important; they are included only to simplify pass-through parsing. When comparing names with Eq or Ord methods, prefixes are ignored.

The IsString instance supports Clark notation; see http://www.jclark.com/xml/xmlns.htm and http://infohost.nmt.edu/tcc/help/pubs/pylxml/etree-QName.html. Use the OverloadedStrings language extension for very simple Name construction:

 myname :: Name
 myname = "{http://example.com/ns/my-namespace}my-name"

data Doctype

Note: due to the incredible complexity of DTDs, this type only supports external subsets. I've tried adding internal subset types, but they quickly gain more code than the rest of this module put together.

It is possible that some future version of this library might support internal subsets, but I am no longer actively working on adding them.

Constructors

Doctype 

Parsing

decodeEntities :: DecodeEntitiesSource

Default implementation of DecodeEntities: handles numeric entities and the five standard character entities (lt, gt, amp, quot, apos).

Rendering

prettyText :: Document -> TextSource

Pretty prints via prettyBytes.

Conversion