-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Basic types for representing XML -- @package xml-types @version 0.3.5 -- | 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: -- -- 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 Typeable Instruction instance Typeable Miscellaneous instance Typeable Content instance Typeable Name instance Typeable Element instance Typeable Node instance Typeable ExternalID instance Typeable Doctype instance Typeable Prologue instance Typeable Document instance Typeable Event instance Generic Event instance Generic ExternalID instance Generic Doctype instance Generic Name instance Generic Content instance Generic Element instance Generic Node instance Generic Miscellaneous instance Generic Instruction instance Generic Prologue instance Generic Document instance Data Instruction instance Eq Instruction instance Ord Instruction instance Show Instruction instance Data Miscellaneous instance Eq Miscellaneous instance Ord Miscellaneous instance Show Miscellaneous instance Data Content instance Eq Content instance Ord Content instance Show Content instance Data Name instance Show Name instance Data Element instance Eq Element instance Ord Element instance Show Element instance Data Node instance Eq Node instance Ord Node instance Show Node instance Data ExternalID instance Eq ExternalID instance Ord ExternalID instance Show ExternalID instance Data Doctype instance Eq Doctype instance Ord Doctype instance Show Doctype instance Data Prologue instance Eq Prologue instance Ord Prologue instance Show Prologue instance Data Document instance Eq Document instance Ord Document instance Show Document instance Data Event instance Eq Event instance Ord Event instance Show Event instance Datatype D1Event instance Constructor C1_0Event instance Constructor C1_1Event instance Constructor C1_2Event instance Constructor C1_3Event instance Constructor C1_4Event instance Constructor C1_5Event instance Constructor C1_6Event instance Constructor C1_7Event instance Constructor C1_8Event instance Constructor C1_9Event instance Datatype D1ExternalID instance Constructor C1_0ExternalID instance Constructor C1_1ExternalID instance Datatype D1Doctype instance Constructor C1_0Doctype instance Selector S1_0_0Doctype instance Selector S1_0_1Doctype instance Datatype D1Name instance Constructor C1_0Name instance Selector S1_0_0Name instance Selector S1_0_1Name instance Selector S1_0_2Name instance Datatype D1Content instance Constructor C1_0Content instance Constructor C1_1Content instance Datatype D1Element instance Constructor C1_0Element instance Selector S1_0_0Element instance Selector S1_0_1Element instance Selector S1_0_2Element instance Datatype D1Node instance Constructor C1_0Node instance Constructor C1_1Node instance Constructor C1_2Node instance Constructor C1_3Node instance Datatype D1Miscellaneous instance Constructor C1_0Miscellaneous instance Constructor C1_1Miscellaneous instance Datatype D1Instruction instance Constructor C1_0Instruction instance Selector S1_0_0Instruction instance Selector S1_0_1Instruction instance Datatype D1Prologue instance Constructor C1_0Prologue instance Selector S1_0_0Prologue instance Selector S1_0_1Prologue instance Selector S1_0_2Prologue instance Datatype D1Document instance Constructor C1_0Document instance Selector S1_0_0Document instance Selector S1_0_1Document instance Selector S1_0_2Document instance NFData Event instance NFData ExternalID instance NFData Doctype instance NFData Name instance IsString Name instance Ord Name instance Eq Name instance NFData Content instance NFData Element instance NFData Node instance NFData Miscellaneous instance NFData Instruction instance NFData Prologue instance NFData Document