-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Basic types for representing XML
--   
--   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.
@package xml-types
@version 0.3.8

-- | 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.
module Data.XML.Types
data Document
Document :: Prologue -> Element -> [Miscellaneous] -> Document
[documentPrologue] :: Document -> Prologue
[documentRoot] :: Document -> Element
[documentEpilogue] :: Document -> [Miscellaneous]
data Prologue
Prologue :: [Miscellaneous] -> Maybe Doctype -> [Miscellaneous] -> Prologue
[prologueBefore] :: Prologue -> [Miscellaneous]
[prologueDoctype] :: Prologue -> Maybe Doctype
[prologueAfter] :: Prologue -> [Miscellaneous]
data Instruction
Instruction :: Text -> Text -> Instruction
[instructionTarget] :: Instruction -> Text
[instructionData] :: Instruction -> Text
data Miscellaneous
MiscInstruction :: Instruction -> Miscellaneous
MiscComment :: Text -> Miscellaneous
data Node
NodeElement :: Element -> Node
NodeInstruction :: Instruction -> Node
NodeContent :: Content -> Node
NodeComment :: Text -> Node
data Element
Element :: Name -> [(Name, [Content])] -> [Node] -> Element
[elementName] :: Element -> Name
[elementAttributes] :: Element -> [(Name, [Content])]
[elementNodes] :: Element -> [Node]
data Content
ContentText :: Text -> Content

-- | For pass-through parsing
ContentEntity :: Text -> Content

-- | 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 Name
Name :: Text -> Maybe Text -> Maybe Text -> Name
[nameLocalName] :: Name -> Text
[nameNamespace] :: Name -> Maybe Text
[namePrefix] :: Name -> Maybe Text

-- | 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.
data Doctype
Doctype :: Text -> Maybe ExternalID -> Doctype
[doctypeName] :: Doctype -> Text
[doctypeID] :: Doctype -> Maybe ExternalID
data ExternalID
SystemID :: Text -> ExternalID
PublicID :: Text -> Text -> ExternalID

-- | Some XML processing tools are incremental, and work in terms of events
--   rather than node trees. The Event type allows a document to be
--   fully specified as a sequence of events.
--   
--   Event-based XML libraries include:
--   
--   
--   
- http://hackage.haskell.org/package/xml-enumerator
--   
- http://hackage.haskell.org/package/libxml-enumerator
--   
- http://hackage.haskell.org/package/expat-enumerator
--   
data Event
EventBeginDocument :: Event
EventEndDocument :: Event
EventBeginDoctype :: Text -> Maybe ExternalID -> Event
EventEndDoctype :: Event
EventInstruction :: Instruction -> Event
EventBeginElement :: Name -> [(Name, [Content])] -> Event
EventEndElement :: Name -> Event
EventContent :: Content -> Event
EventComment :: Text -> Event
EventCDATA :: Text -> Event
isElement :: Node -> [Element]
isInstruction :: Node -> [Instruction]
isContent :: Node -> [Content]
isComment :: Node -> [Text]
isNamed :: Name -> Element -> [Element]
elementChildren :: Element -> [Element]
elementContent :: Element -> [Content]
elementText :: Element -> [Text]
nodeChildren :: Node -> [Node]
nodeContent :: Node -> [Content]
nodeText :: Node -> [Text]
hasAttribute :: Name -> Element -> [Element]
hasAttributeText :: Name -> (Text -> Bool) -> Element -> [Element]
attributeContent :: Name -> Element -> Maybe [Content]
attributeText :: Name -> Element -> Maybe Text
instance GHC.Internal.Data.Data.Data Data.XML.Types.Content
instance GHC.Internal.Data.Data.Data Data.XML.Types.Doctype
instance GHC.Internal.Data.Data.Data Data.XML.Types.Document
instance GHC.Internal.Data.Data.Data Data.XML.Types.Element
instance GHC.Internal.Data.Data.Data Data.XML.Types.Event
instance GHC.Internal.Data.Data.Data Data.XML.Types.ExternalID
instance GHC.Internal.Data.Data.Data Data.XML.Types.Instruction
instance GHC.Internal.Data.Data.Data Data.XML.Types.Miscellaneous
instance GHC.Internal.Data.Data.Data Data.XML.Types.Name
instance GHC.Internal.Data.Data.Data Data.XML.Types.Node
instance GHC.Internal.Data.Data.Data Data.XML.Types.Prologue
instance GHC.Classes.Eq Data.XML.Types.Content
instance GHC.Classes.Eq Data.XML.Types.Doctype
instance GHC.Classes.Eq Data.XML.Types.Document
instance GHC.Classes.Eq Data.XML.Types.Element
instance GHC.Classes.Eq Data.XML.Types.Event
instance GHC.Classes.Eq Data.XML.Types.ExternalID
instance GHC.Classes.Eq Data.XML.Types.Instruction
instance GHC.Classes.Eq Data.XML.Types.Miscellaneous
instance GHC.Classes.Eq Data.XML.Types.Name
instance GHC.Classes.Eq Data.XML.Types.Node
instance GHC.Classes.Eq Data.XML.Types.Prologue
instance GHC.Internal.Generics.Generic Data.XML.Types.Content
instance GHC.Internal.Generics.Generic Data.XML.Types.Doctype
instance GHC.Internal.Generics.Generic Data.XML.Types.Document
instance GHC.Internal.Generics.Generic Data.XML.Types.Element
instance GHC.Internal.Generics.Generic Data.XML.Types.Event
instance GHC.Internal.Generics.Generic Data.XML.Types.ExternalID
instance GHC.Internal.Generics.Generic Data.XML.Types.Instruction
instance GHC.Internal.Generics.Generic Data.XML.Types.Miscellaneous
instance GHC.Internal.Generics.Generic Data.XML.Types.Name
instance GHC.Internal.Generics.Generic Data.XML.Types.Node
instance GHC.Internal.Generics.Generic Data.XML.Types.Prologue
instance GHC.Internal.Data.String.IsString Data.XML.Types.Content
instance GHC.Internal.Data.String.IsString Data.XML.Types.Name
instance GHC.Internal.Data.String.IsString Data.XML.Types.Node
instance Control.DeepSeq.NFData Data.XML.Types.Content
instance Control.DeepSeq.NFData Data.XML.Types.Doctype
instance Control.DeepSeq.NFData Data.XML.Types.Document
instance Control.DeepSeq.NFData Data.XML.Types.Element
instance Control.DeepSeq.NFData Data.XML.Types.Event
instance Control.DeepSeq.NFData Data.XML.Types.ExternalID
instance Control.DeepSeq.NFData Data.XML.Types.Instruction
instance Control.DeepSeq.NFData Data.XML.Types.Miscellaneous
instance Control.DeepSeq.NFData Data.XML.Types.Name
instance Control.DeepSeq.NFData Data.XML.Types.Node
instance Control.DeepSeq.NFData Data.XML.Types.Prologue
instance GHC.Classes.Ord Data.XML.Types.Content
instance GHC.Classes.Ord Data.XML.Types.Doctype
instance GHC.Classes.Ord Data.XML.Types.Document
instance GHC.Classes.Ord Data.XML.Types.Element
instance GHC.Classes.Ord Data.XML.Types.Event
instance GHC.Classes.Ord Data.XML.Types.ExternalID
instance GHC.Classes.Ord Data.XML.Types.Instruction
instance GHC.Classes.Ord Data.XML.Types.Miscellaneous
instance GHC.Classes.Ord Data.XML.Types.Name
instance GHC.Classes.Ord Data.XML.Types.Node
instance GHC.Classes.Ord Data.XML.Types.Prologue
instance GHC.Internal.Show.Show Data.XML.Types.Content
instance GHC.Internal.Show.Show Data.XML.Types.Doctype
instance GHC.Internal.Show.Show Data.XML.Types.Document
instance GHC.Internal.Show.Show Data.XML.Types.Element
instance GHC.Internal.Show.Show Data.XML.Types.Event
instance GHC.Internal.Show.Show Data.XML.Types.ExternalID
instance GHC.Internal.Show.Show Data.XML.Types.Instruction
instance GHC.Internal.Show.Show Data.XML.Types.Miscellaneous
instance GHC.Internal.Show.Show Data.XML.Types.Name
instance GHC.Internal.Show.Show Data.XML.Types.Node
instance GHC.Internal.Show.Show Data.XML.Types.Prologue
