-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Basic types for representing XML -- -- Basic types for representing XML @package xml-types @version 0.2 -- | 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 -> Map Name [Content] -> [Node] -> Element elementName :: Element -> Name elementAttributes :: Element -> Map 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
data Doctype
Doctype :: Text -> Maybe ExternalID -> [DoctypeNode] -> Doctype
doctypeName :: Doctype -> Text
doctypeExternalID :: Doctype -> Maybe ExternalID
doctypeNodes :: Doctype -> [DoctypeNode]
data ExternalID
SystemID :: Text -> ExternalID
PublicID :: Text -> Text -> ExternalID
data DoctypeNode
DoctypeDeclaration :: Declaration -> DoctypeNode
DoctypeInstruction :: Instruction -> DoctypeNode
DoctypeComment :: Text -> DoctypeNode
-- | Internal doctype declarations are still largely unimplemented. This
-- type will be populated and published in a later version of
-- xml-types.
data Declaration
-- | 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:
--
--
data Event
EventBeginDocument :: Event
EventEndDocument :: Event
EventBeginDoctype :: Text -> (Maybe ExternalID) -> Event
EventDeclaration :: Declaration -> Event
EventEndDoctype :: Event
EventInstruction :: Instruction -> Event
EventBeginElement :: Name -> (Map 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 Show Instruction
instance Eq Instruction
instance Ord Instruction
instance Show Miscellaneous
instance Eq Miscellaneous
instance Show Content
instance Eq Content
instance Show Name
instance Show Element
instance Eq Element
instance Show Node
instance Eq Node
instance Show ExternalID
instance Eq ExternalID
instance Ord ExternalID
instance Show Declaration
instance Eq Declaration
instance Show DoctypeNode
instance Eq DoctypeNode
instance Show Doctype
instance Eq Doctype
instance Show Prologue
instance Eq Prologue
instance Show Document
instance Eq Document
instance Show Event
instance Eq Event
instance Typeable Event
instance Typeable Declaration
instance Typeable DoctypeNode
instance Typeable ExternalID
instance Typeable Doctype
instance Ord Doctype
instance IsString Name
instance Ord Name
instance Eq Name
instance Typeable Name
instance Typeable Content
instance Typeable Element
instance Typeable Node
instance Typeable Miscellaneous
instance Typeable Instruction
instance Typeable Prologue
instance Typeable Document