Text.XML.HXT.DOM.XmlNode

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

Copyright | Copyright (C) 2008 Uwe Schmidt
License | MIT
Maintainer | Uwe Schmidt (uwe@fh-wedel.de)
Stability | stable
Portability | portable
Safe Haskell | None
Language | Haskell98

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
- 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
- toText :: XmlTree -> XmlTree
- concText :: XmlTree -> XmlTree -> XmlTrees
- mergeText :: XmlTree -> XmlTree -> XmlTrees
- module Data.Tree.Class
- module Data.Tree.NTree.TypeDefs

# Documentation

class XmlNode a where #

Minimal complete definition

isText, isBlob, isCharRef, isEntityRef, isCmt, isCdata, isPi, isElem, isRoot, isDTD, isAttr, isError, mkText, mkBlob, mkCharRef, mkEntityRef, mkCmt, mkCdata, mkPi, mkError, getText, getBlob, getCharRef, getEntityRef, getCmt, getCdata, getPiName, getPiContent, getElemName, getAttrl, getDTDPart, getDTDAttrl, getAttrName, getErrorLevel, getErrorMsg, changeText, changeBlob, changeCmt, changeName, changeElemName, changeAttrl, changeAttrName, changePiName, changeDTDAttrl

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 # |
Methods isText :: XNode -> Bool # isBlob :: XNode -> Bool # isCharRef :: XNode -> Bool # isEntityRef :: XNode -> Bool # isCmt :: XNode -> Bool # isCdata :: XNode -> Bool # isPi :: XNode -> Bool # isElem :: XNode -> Bool # isRoot :: XNode -> Bool # isDTD :: XNode -> Bool # isAttr :: XNode -> Bool # isError :: XNode -> Bool # mkText :: String -> XNode # mkBlob :: Blob -> XNode # mkCharRef :: Int -> XNode # mkEntityRef :: String -> XNode # mkCmt :: String -> XNode # mkCdata :: String -> XNode # mkPi :: QName -> XmlTrees -> XNode # mkError :: Int -> String -> XNode # getText :: XNode -> Maybe String # getBlob :: XNode -> Maybe Blob # getCharRef :: XNode -> Maybe Int # getEntityRef :: XNode -> Maybe String # getCmt :: XNode -> Maybe String # getCdata :: XNode -> Maybe String # getPiName :: XNode -> Maybe QName # getPiContent :: XNode -> Maybe XmlTrees # getElemName :: XNode -> Maybe QName # getAttrl :: XNode -> Maybe XmlTrees # getDTDPart :: XNode -> Maybe DTDElem # getDTDAttrl :: XNode -> Maybe Attributes # getAttrName :: XNode -> Maybe QName # getErrorLevel :: XNode -> Maybe Int # getErrorMsg :: XNode -> Maybe String # getName :: XNode -> Maybe QName # getQualifiedName :: XNode -> Maybe String # getUniversalName :: XNode -> Maybe String # getUniversalUri :: XNode -> Maybe String # getLocalPart :: XNode -> Maybe String # getNamePrefix :: XNode -> Maybe String # getNamespaceUri :: XNode -> Maybe String # changeText :: (String -> String) -> XNode -> XNode # changeBlob :: (Blob -> Blob) -> XNode -> XNode # changeCmt :: (String -> String) -> XNode -> XNode # changeName :: (QName -> QName) -> XNode -> XNode # changeElemName :: (QName -> QName) -> XNode -> XNode # changeAttrl :: (XmlTrees -> XmlTrees) -> XNode -> XNode # changeAttrName :: (QName -> QName) -> XNode -> XNode # changePiName :: (QName -> QName) -> XNode -> XNode # changeDTDAttrl :: (Attributes -> Attributes) -> XNode -> XNode # setText :: String -> XNode -> XNode # setBlob :: Blob -> XNode -> XNode # setCmt :: String -> XNode -> XNode # setName :: QName -> XNode -> XNode # setElemName :: QName -> XNode -> XNode # setElemAttrl :: XmlTrees -> XNode -> XNode # setAttrName :: QName -> XNode -> XNode # setPiName :: QName -> XNode -> XNode # setDTDAttrl :: Attributes -> XNode -> XNode #
(XmlNode a, Tree t) => XmlNode (t a) # |
Methods isText :: t a -> Bool # isBlob :: t a -> Bool # isCharRef :: t a -> Bool # isEntityRef :: t a -> Bool # isCmt :: t a -> Bool # isCdata :: t a -> Bool # isPi :: t a -> Bool # isElem :: t a -> Bool # isRoot :: t a -> Bool # isDTD :: t a -> Bool # isAttr :: t a -> Bool # isError :: t a -> Bool # mkText :: String -> t a # mkBlob :: Blob -> t a # mkCharRef :: Int -> t a # mkEntityRef :: String -> t a # mkCmt :: String -> t a # mkCdata :: String -> t a # mkPi :: QName -> XmlTrees -> t a # mkError :: Int -> String -> t a # getText :: t a -> Maybe String # getBlob :: t a -> Maybe Blob # getCharRef :: t a -> Maybe Int # getEntityRef :: t a -> Maybe String # getCmt :: t a -> Maybe String # getCdata :: t a -> Maybe String # getPiName :: t a -> Maybe QName # getPiContent :: t a -> Maybe XmlTrees # getElemName :: t a -> Maybe QName # getAttrl :: t a -> Maybe XmlTrees # getDTDPart :: t a -> Maybe DTDElem # getDTDAttrl :: t a -> Maybe Attributes # getAttrName :: t a -> Maybe QName # getErrorLevel :: t a -> Maybe Int # getErrorMsg :: t a -> Maybe String # getName :: t a -> Maybe QName # getQualifiedName :: t a -> Maybe String # getUniversalName :: t a -> Maybe String # getUniversalUri :: t a -> Maybe String # getLocalPart :: t a -> Maybe String # getNamePrefix :: t a -> Maybe String # getNamespaceUri :: t a -> Maybe String # changeText :: (String -> String) -> t a -> t a # changeBlob :: (Blob -> Blob) -> t a -> t a # changeCmt :: (String -> String) -> t a -> t a # changeName :: (QName -> QName) -> t a -> t a # changeElemName :: (QName -> QName) -> t a -> t a # changeAttrl :: (XmlTrees -> XmlTrees) -> t a -> t a # changeAttrName :: (QName -> QName) -> t a -> t a # changePiName :: (QName -> QName) -> t a -> t a # changeDTDAttrl :: (Attributes -> Attributes) -> t a -> t a # setText :: String -> t a -> t a # setBlob :: Blob -> t a -> t a # setCmt :: String -> t a -> t a # setName :: QName -> t a -> t a # setElemName :: QName -> t a -> t a # setElemAttrl :: XmlTrees -> t a -> t a # setAttrName :: QName -> t a -> t a # setPiName :: QName -> t a -> t a # setDTDAttrl :: Attributes -> t a -> 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 #

toText :: XmlTree -> XmlTree #

concText :: XmlTree -> XmlTree -> XmlTrees #

mergeText :: XmlTree -> XmlTree -> XmlTrees #

module Data.Tree.Class

module Data.Tree.NTree.TypeDefs