Text.XML.Light.Types

xml-1.3.7: A simple XML library.

Copyright | (c) Galois Inc. 2007
License | BSD3
Maintainer | Iavor S. Diatchki <diatchki@galois.com>
Stability | provisional
Portability | Basic XML types.
Safe Haskell | Safe
Language | Haskell98

Text.XML.Light.Types

Description

Synopsis

- type Line = Integer
- data Content
  - = Elem Element
  - | Text CData
  - | CRef String
- data Element = Element {
  - elName :: QName
  - elAttribs :: [Attr]
  - elContent :: [Content]
  - elLine :: Maybe Line
  }
- data Attr = Attr {
  - attrKey :: QName
  - attrVal :: String
  }
- data CData = CData {
  - cdVerbatim :: CDataKind
  - cdData :: String
  - cdLine :: Maybe Line
  }
- data CDataKind
  - = CDataText
  - | CDataVerbatim
  - | CDataRaw
- data QName = QName {
  - qName :: String
  - qURI :: Maybe String
  - qPrefix :: Maybe String
  }
- blank_name :: QName
- blank_cdata :: CData
- blank_element :: Element

# Documentation

type Line = Integer #

A line is an Integer

data Content #

XML content

Constructors

Elem Element |
Text CData |
CRef String |

Instances

Show Content # |
Methods showsPrec :: Int -> Content -> ShowS # show :: Content -> String # showList :: [Content] -> ShowS #
Node Content # |
Methods node :: QName -> Content -> Element #
Node [Content] # |
Methods node :: QName -> [Content] -> Element #
Node ([Attr], [Content]) # |
Methods node :: QName -> ([Attr], [Content]) -> Element #
Node ([Attr], Content) # |
Methods node :: QName -> ([Attr], Content) -> Element #
Node (Attr, Content) # |
Methods node :: QName -> (Attr, Content) -> Element #

data Element #

XML elements

Constructors

Element |
Fields elName :: QName elAttribs :: [Attr] elContent :: [Content] elLine :: Maybe Line

Instances

Show Element # |
Methods showsPrec :: Int -> Element -> ShowS # show :: Element -> String # showList :: [Element] -> ShowS #
Node Element # |
Methods node :: QName -> Element -> Element #
Node [Element] # |
Methods node :: QName -> [Element] -> Element #
Node ([Attr], [Element]) # |
Methods node :: QName -> ([Attr], [Element]) -> Element #
Node ([Attr], Element) # |
Methods node :: QName -> ([Attr], Element) -> Element #
Node (Attr, Element) # |
Methods node :: QName -> (Attr, Element) -> Element #

data Attr #

XML attributes

Constructors

Attr |
Fields attrKey :: QName attrVal :: String

Instances

Eq Attr # |
Methods (==) :: Attr -> Attr -> Bool # (/=) :: Attr -> Attr -> Bool #
Ord Attr # |
Methods compare :: Attr -> Attr -> Ordering # (<) :: Attr -> Attr -> Bool # (<=) :: Attr -> Attr -> Bool # (>) :: Attr -> Attr -> Bool # (>=) :: Attr -> Attr -> Bool # max :: Attr -> Attr -> Attr # min :: Attr -> Attr -> Attr #
Show Attr # |
Methods showsPrec :: Int -> Attr -> ShowS # show :: Attr -> String # showList :: [Attr] -> ShowS #
Node Attr # |
Methods node :: QName -> Attr -> Element #
Node [Attr] # |
Methods node :: QName -> [Attr] -> Element #
Node ([Attr], [CData]) # |
Methods node :: QName -> ([Attr], [CData]) -> Element #
Node ([Attr], [Element]) # |
Methods node :: QName -> ([Attr], [Element]) -> Element #
Node ([Attr], [Content]) # |
Methods node :: QName -> ([Attr], [Content]) -> Element #
Node ([Attr], String) # |
Methods node :: QName -> ([Attr], String) -> Element #
Node ([Attr], CData) # |
Methods node :: QName -> ([Attr], CData) -> Element #
Node ([Attr], Element) # |
Methods node :: QName -> ([Attr], Element) -> Element #
Node ([Attr], Content) # |
Methods node :: QName -> ([Attr], Content) -> Element #
Node (Attr, String) # |
Methods node :: QName -> (Attr, String) -> Element #
Node (Attr, CData) # |
Methods node :: QName -> (Attr, CData) -> Element #
Node (Attr, Element) # |
Methods node :: QName -> (Attr, Element) -> Element #
Node (Attr, Content) # |
Methods node :: QName -> (Attr, Content) -> Element #

data CData #

XML CData

Constructors

CData |
Fields cdVerbatim :: CDataKind cdData :: String cdLine :: Maybe Line

Instances

Show CData # |
Methods showsPrec :: Int -> CData -> ShowS # show :: CData -> String # showList :: [CData] -> ShowS #
Node CData # |
Methods node :: QName -> CData -> Element #
Node [CData] # |
Methods node :: QName -> [CData] -> Element #
Node ([Attr], [CData]) # |
Methods node :: QName -> ([Attr], [CData]) -> Element #
Node ([Attr], CData) # |
Methods node :: QName -> ([Attr], CData) -> Element #
Node (Attr, CData) # |
Methods node :: QName -> (Attr, CData) -> Element #

data CDataKind #

Constructors

CDataText | Ordinary character data; pretty printer escapes &, < etc.
CDataVerbatim | Unescaped character data; pretty printer embeds it in <![CDATA[..
CDataRaw | As-is character data; pretty printer passes it along without any escaping or CDATA wrap-up.

Instances

Eq CDataKind # |
Methods (==) :: CDataKind -> CDataKind -> Bool # (/=) :: CDataKind -> CDataKind -> Bool #
Show CDataKind # |
Methods showsPrec :: Int -> CDataKind -> ShowS # show :: CDataKind -> String # showList :: [CDataKind] -> ShowS #

data QName #

XML qualified names

Constructors

QName |
Fields qName :: String qURI :: Maybe String qPrefix :: Maybe String

Instances

Eq QName # |
Methods (==) :: QName -> QName -> Bool # (/=) :: QName -> QName -> Bool #
Ord QName # |
Methods compare :: QName -> QName -> Ordering # (<) :: QName -> QName -> Bool # (<=) :: QName -> QName -> Bool # (>) :: QName -> QName -> Bool # (>=) :: QName -> QName -> Bool # max :: QName -> QName -> QName # min :: QName -> QName -> QName #
Show QName # |
Methods showsPrec :: Int -> QName -> ShowS # show :: QName -> String # showList :: [QName] -> ShowS #

blank_name :: QName #

Blank names

blank_cdata :: CData #

Blank cdata

blank_element :: Element #

Blank elements