hxt-9.1.2: A collection of tools for processing XML with Haskell.

Portability | portable
Stability | stable
Maintainer | Uwe Schmidt (uwe@fh-wedel.de)

Text.XML.HXT.DOM.XmlNode

Description

Interface for XmlArrow to basic data types NTree and XmlTree

If this module must be used in code working with arrows, it should be imported qualified e.g. `as XN`, to prevent name clashes.

For code working on the "node and tree level" this module is the interface for writing code without using the constructor functions of `XNode` and `NTree` directly

Synopsis

- class XmlNode a where
  - isText :: a -> Bool
  - isBlob :: a -> Bool
  - isCharRef :: a -> Bool
  - isEntityRef :: a -> Bool
  - isCmt :: a -> Bool
  - isCdata :: a -> Bool
  - isPi :: a -> Bool
  - isElem :: a -> Bool
  - isRoot :: a -> Bool
  - isDTD :: a -> Bool
  - isAttr :: a -> Bool
  - isError :: a -> Bool
  - mkText :: String -> a
  - mkBlob :: Blob -> a
  - mkCharRef :: Int -> a
  - mkEntityRef :: String -> a
  - mkCmt :: String -> a
  - mkCdata :: String -> a
  - mkPi :: QName -> XmlTrees -> a
  - mkError :: Int -> String -> a
  - getText :: a -> Maybe String
  - getBlob :: a -> Maybe Blob
  - getCharRef :: a -> Maybe Int
  - getEntityRef :: a -> Maybe String
  - getCmt :: a -> Maybe String
  - getCdata :: a -> Maybe String
  - getPiName :: a -> Maybe QName
  - getPiContent :: a -> Maybe XmlTrees
  - getElemName :: a -> Maybe QName
  - getAttrl :: a -> Maybe XmlTrees
  - getDTDPart :: a -> Maybe DTDElem
  - getDTDAttrl :: a -> Maybe Attributes
  - getAttrName :: a -> Maybe QName
  - getErrorLevel :: a -> Maybe Int
  - getErrorMsg :: a -> Maybe String
  - getName :: a -> Maybe QName
  - getQualifiedName :: a -> Maybe String
  - getUniversalName :: a -> Maybe String
  - getUniversalUri :: a -> Maybe String
  - getLocalPart :: a -> Maybe String
  - getNamePrefix :: a -> Maybe String
  - getNamespaceUri :: a -> Maybe String
  - changeText :: (String -> String) -> a -> a
  - changeBlob :: (Blob -> Blob) -> a -> a
  - changeCmt :: (String -> String) -> a -> a
  - changeName :: (QName -> QName) -> a -> a
  - changeElemName :: (QName -> QName) -> a -> a
  - changeAttrl :: (XmlTrees -> XmlTrees) -> a -> a
  - changeAttrName :: (QName -> QName) -> a -> a
  - changePiName :: (QName -> QName) -> a -> a
  - changeDTDAttrl :: (Attributes -> Attributes) -> a -> a
  - setText :: String -> a -> a
  - setBlob :: Blob -> a -> a
  - setCmt :: String -> a -> a
  - setName :: QName -> a -> a
  - setElemName :: QName -> a -> a
  - setElemAttrl :: XmlTrees -> a -> a
  - setAttrName :: QName -> a -> a
  - setPiName :: QName -> a -> a
  - setDTDAttrl :: Attributes -> a -> a
- mkElementNode :: QName -> XmlTrees -> XNode
- mkAttrNode :: QName -> XNode
- mkDTDNode :: DTDElem -> Attributes -> XNode
- mkElement :: QName -> XmlTrees -> XmlTrees -> XmlTree
- mkRoot :: XmlTrees -> XmlTrees -> XmlTree
- mkAttr :: QName -> XmlTrees -> XmlTree
- mkDTDElem :: DTDElem -> Attributes -> XmlTrees -> XmlTree
- addAttr :: XmlTree -> XmlTrees -> XmlTrees
- mergeAttrl :: XmlTrees -> XmlTrees -> XmlTrees
- mkElement' :: QName -> XmlTrees -> XmlTrees -> XmlTree
- mkRoot' :: XmlTrees -> XmlTrees -> XmlTree
- mkAttr' :: QName -> XmlTrees -> XmlTree
- mkText' :: String -> XmlTree
- mkCharRef' :: Int -> XmlTree
- mkEntityRef' :: String -> XmlTree
- mkCmt' :: String -> XmlTree
- mkCdata' :: String -> XmlTree
- mkPi' :: QName -> XmlTrees -> XmlTree
- mkError' :: Int -> String -> XmlTree
- mkDTDElem' :: DTDElem -> Attributes -> XmlTrees -> XmlTree
- module Data.Tree.Class
- module Data.Tree.NTree.TypeDefs

# Documentation

class XmlNode a where

Methods

isText :: a -> Bool

isBlob :: a -> Bool

isCharRef :: a -> Bool

isEntityRef :: a -> Bool

isCmt :: a -> Bool

isCdata :: a -> Bool

isPi :: a -> Bool

isElem :: a -> Bool

isRoot :: a -> Bool

isDTD :: a -> Bool

isAttr :: a -> Bool

isError :: a -> Bool

mkText :: String -> a

mkBlob :: Blob -> a

mkCharRef :: Int -> a

mkEntityRef :: String -> a

mkCmt :: String -> a

mkCdata :: String -> a

mkPi :: QName -> XmlTrees -> a

mkError :: Int -> String -> a

getText :: a -> Maybe String

getBlob :: a -> Maybe Blob

getCharRef :: a -> Maybe Int

getEntityRef :: a -> Maybe String

getCmt :: a -> Maybe String

getCdata :: a -> Maybe String

getPiName :: a -> Maybe QName

getPiContent :: a -> Maybe XmlTrees

getElemName :: a -> Maybe QName

getAttrl :: a -> Maybe XmlTrees

getDTDPart :: a -> Maybe DTDElem

getDTDAttrl :: a -> Maybe Attributes

getAttrName :: a -> Maybe QName

getErrorLevel :: a -> Maybe Int

getErrorMsg :: a -> Maybe String

getName :: a -> Maybe QName

getQualifiedName :: a -> Maybe String

getUniversalName :: a -> Maybe String

getUniversalUri :: a -> Maybe String

getLocalPart :: a -> Maybe String

getNamePrefix :: a -> Maybe String

getNamespaceUri :: a -> Maybe String

changeText :: (String -> String) -> a -> a

changeBlob :: (Blob -> Blob) -> a -> a

changeCmt :: (String -> String) -> a -> a

changeName :: (QName -> QName) -> a -> a

changeElemName :: (QName -> QName) -> a -> a

changeAttrl :: (XmlTrees -> XmlTrees) -> a -> a

changeAttrName :: (QName -> QName) -> a -> a

changePiName :: (QName -> QName) -> a -> a

changeDTDAttrl :: (Attributes -> Attributes) -> a -> a

setText :: String -> a -> a

setBlob :: Blob -> a -> a

setCmt :: String -> a -> a

setName :: QName -> a -> a

setElemName :: QName -> a -> a

setElemAttrl :: XmlTrees -> a -> a

setAttrName :: QName -> a -> a

setPiName :: QName -> a -> a

setDTDAttrl :: Attributes -> a -> a

Instances

XmlNode XNode |
(XmlNode a, Tree t) => XmlNode (t a) |

mkElementNode :: QName -> XmlTrees -> XNode

mkAttrNode :: QName -> XNode

mkDTDNode :: DTDElem -> Attributes -> XNode

mkElement :: QName -> XmlTrees -> XmlTrees -> XmlTree

mkRoot :: XmlTrees -> XmlTrees -> XmlTree

mkAttr :: QName -> XmlTrees -> XmlTree

mkDTDElem :: DTDElem -> Attributes -> XmlTrees -> XmlTree

addAttr :: XmlTree -> XmlTrees -> XmlTrees

mergeAttrl :: XmlTrees -> XmlTrees -> XmlTrees

mkElement' :: QName -> XmlTrees -> XmlTrees -> XmlTree

weak normalform versions of constructors

mkRoot' :: XmlTrees -> XmlTrees -> XmlTree

mkAttr' :: QName -> XmlTrees -> XmlTree

mkText' :: String -> XmlTree

mkCharRef' :: Int -> XmlTree

mkEntityRef' :: String -> XmlTree

mkCmt' :: String -> XmlTree

mkCdata' :: String -> XmlTree

mkPi' :: QName -> XmlTrees -> XmlTree

mkError' :: Int -> String -> XmlTree

mkDTDElem' :: DTDElem -> Attributes -> XmlTrees -> XmlTree

module Data.Tree.Class

module Data.Tree.NTree.TypeDefs