HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulexml-types-0.3.8Haskell2010

Data.XML.Types

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.

  • 11 types
  • 15 values

Types

0 declarations

Document prologue

datadata Document
#
Instances7Eq, Data, Ord, Show, Generic, NFData, …
datadata Prologue
#
Instances7Eq, Data, Ord, Show, Generic, NFData, …
datadata Instruction
#
Instances7Eq, Data, Ord, Show, Generic, NFData, …
datadata Miscellaneous
#
Instances7Eq, Data, Ord, Show, Generic, NFData, …

Document body

datadata Node
#
Instances8Eq, Data, Ord, Show, IsString, Generic, …
datadata Element
#
Instances7Eq, Data, Ord, Show, Generic, NFData, …
datadata Content
#

Constructors

Instances8Eq, Data, Ord, Show, IsString, Generic, …
datadata 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"
Instances8Eq, Data, Ord, Show, IsString, Generic, …

Doctypes

datadata 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.

Instances7Eq, Data, Ord, Show, Generic, NFData, …
datadata ExternalID
#
Instances7Eq, Data, Ord, Show, Generic, NFData, …

Incremental processing

datadata Event
#
Instances7Eq, Data, Ord, Show, Generic, NFData, …

Combinators

0 declarations

Filters

Element traversal

Node traversal

Attributes