xml-types-0.2: Basic types for representing XML

Portabilityportable
Maintainerjmillikin@gmail.com

Data.XML.Types

Contents

Description

Basic types for representing XML.

The idea is to have a full set of appropriate types, which various XML libraries can share. Instead of having equivalent-but-incompatible types for every binding, parser, or client, they all share the same types can can thus interoperate easily.

This library contains complete types for most parts of an XML document, including the prologue, node tree, and doctype. Some basic combinators are included for common tasks, including traversing the node tree and filtering children.

Synopsis

Types

Document prologue

Document body

data Content Source

Constructors

ContentText Text 
ContentEntity Text

For pass-through parsing

data Name Source

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"

Doctypes

data Declaration Source

Internal doctype declarations are still largely unimplemented. This type will be populated and published in a later version of xml-types.

Incremental processing

Combinators

Filters

Element traversal

Node traversal

Attributes