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 Source #

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 Source #

isBlob :: a -> Bool Source #

isCharRef :: a -> Bool Source #

isEntityRef :: a -> Bool Source #

isCmt :: a -> Bool Source #

isCdata :: a -> Bool Source #

isPi :: a -> Bool Source #

isElem :: a -> Bool Source #

isRoot :: a -> Bool Source #

isDTD :: a -> Bool Source #

isAttr :: a -> Bool Source #

isError :: a -> Bool Source #

mkText :: String -> a Source #

mkBlob :: Blob -> a Source #

mkCharRef :: Int -> a Source #

mkEntityRef :: String -> a Source #

mkCmt :: String -> a Source #

mkCdata :: String -> a Source #

mkPi :: QName -> XmlTrees -> a Source #

mkError :: Int -> String -> a Source #

getText :: a -> Maybe String Source #

getBlob :: a -> Maybe Blob Source #

getCharRef :: a -> Maybe Int Source #

getEntityRef :: a -> Maybe String Source #

getCmt :: a -> Maybe String Source #

getCdata :: a -> Maybe String Source #

getPiName :: a -> Maybe QName Source #

getPiContent :: a -> Maybe XmlTrees Source #

getElemName :: a -> Maybe QName Source #

getAttrl :: a -> Maybe XmlTrees Source #

getDTDPart :: a -> Maybe DTDElem Source #

getDTDAttrl :: a -> Maybe Attributes Source #

getAttrName :: a -> Maybe QName Source #

getErrorLevel :: a -> Maybe Int Source #

getErrorMsg :: a -> Maybe String Source #

getName :: a -> Maybe QName Source #

getQualifiedName :: a -> Maybe String Source #

getUniversalName :: a -> Maybe String Source #

getUniversalUri :: a -> Maybe String Source #

getLocalPart :: a -> Maybe String Source #

getNamePrefix :: a -> Maybe String Source #

getNamespaceUri :: a -> Maybe String Source #

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

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

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

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

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

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

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

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

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

setText :: String -> a -> a Source #

setBlob :: Blob -> a -> a Source #

setCmt :: String -> a -> a Source #

setName :: QName -> a -> a Source #

setElemName :: QName -> a -> a Source #

setElemAttrl :: XmlTrees -> a -> a Source #

setAttrName :: QName -> a -> a Source #

setPiName :: QName -> a -> a Source #

setDTDAttrl :: Attributes -> a -> a Source #

Instances

XmlNode XNode Source # |

Methods

isText :: XNode -> Bool Source #

isBlob :: XNode -> Bool Source #

isCharRef :: XNode -> Bool Source #

isEntityRef :: XNode -> Bool Source #

isCmt :: XNode -> Bool Source #

isCdata :: XNode -> Bool Source #

isPi :: XNode -> Bool Source #

isElem :: XNode -> Bool Source #

isRoot :: XNode -> Bool Source #

isDTD :: XNode -> Bool Source #

isAttr :: XNode -> Bool Source #

isError :: XNode -> Bool Source #

mkText :: String -> XNode Source #

mkBlob :: Blob -> XNode Source #

mkCharRef :: Int -> XNode Source #

mkEntityRef :: String -> XNode Source #

mkCmt :: String -> XNode Source #

mkCdata :: String -> XNode Source #

mkPi :: QName -> XmlTrees -> XNode Source #

mkError :: Int -> String -> XNode Source #

getText :: XNode -> Maybe String Source #

getBlob :: XNode -> Maybe Blob Source #

getCharRef :: XNode -> Maybe Int Source #

getEntityRef :: XNode -> Maybe String Source #

getCmt :: XNode -> Maybe String Source #

getCdata :: XNode -> Maybe String Source #

getPiName :: XNode -> Maybe QName Source #

getPiContent :: XNode -> Maybe XmlTrees Source #

getElemName :: XNode -> Maybe QName Source #

getAttrl :: XNode -> Maybe XmlTrees Source #

getDTDPart :: XNode -> Maybe DTDElem Source #

getDTDAttrl :: XNode -> Maybe Attributes Source #

getAttrName :: XNode -> Maybe QName Source #

getErrorLevel :: XNode -> Maybe Int Source #

getErrorMsg :: XNode -> Maybe String Source #

getName :: XNode -> Maybe QName Source #

getQualifiedName :: XNode -> Maybe String Source #

getUniversalName :: XNode -> Maybe String Source #

getUniversalUri :: XNode -> Maybe String Source #

getLocalPart :: XNode -> Maybe String Source #

getNamePrefix :: XNode -> Maybe String Source #

getNamespaceUri :: XNode -> Maybe String Source #

changeText :: (String -> String) -> XNode -> XNode Source #

changeBlob :: (Blob -> Blob) -> XNode -> XNode Source #

changeCmt :: (String -> String) -> XNode -> XNode Source #

changeName :: (QName -> QName) -> XNode -> XNode Source #

changeElemName :: (QName -> QName) -> XNode -> XNode Source #

changeAttrl :: (XmlTrees -> XmlTrees) -> XNode -> XNode Source #

changeAttrName :: (QName -> QName) -> XNode -> XNode Source #

changePiName :: (QName -> QName) -> XNode -> XNode Source #

changeDTDAttrl :: (Attributes -> Attributes) -> XNode -> XNode Source #

setText :: String -> XNode -> XNode Source #

setBlob :: Blob -> XNode -> XNode Source #

setCmt :: String -> XNode -> XNode Source #

setName :: QName -> XNode -> XNode Source #

setElemName :: QName -> XNode -> XNode Source #

setElemAttrl :: XmlTrees -> XNode -> XNode Source #

setAttrName :: QName -> XNode -> XNode Source #

setPiName :: QName -> XNode -> XNode Source #

setDTDAttrl :: Attributes -> XNode -> XNode Source #

(XmlNode a, Tree t) => XmlNode (t a) Source # |

Methods

isText :: t a -> Bool Source #

isBlob :: t a -> Bool Source #

isCharRef :: t a -> Bool Source #

isEntityRef :: t a -> Bool Source #

isCmt :: t a -> Bool Source #

isCdata :: t a -> Bool Source #

isPi :: t a -> Bool Source #

isElem :: t a -> Bool Source #

isRoot :: t a -> Bool Source #

isDTD :: t a -> Bool Source #

isAttr :: t a -> Bool Source #

isError :: t a -> Bool Source #

mkText :: String -> t a Source #

mkBlob :: Blob -> t a Source #

mkCharRef :: Int -> t a Source #

mkEntityRef :: String -> t a Source #

mkCmt :: String -> t a Source #

mkCdata :: String -> t a Source #

mkPi :: QName -> XmlTrees -> t a Source #

mkError :: Int -> String -> t a Source #

getText :: t a -> Maybe String Source #

getBlob :: t a -> Maybe Blob Source #

getCharRef :: t a -> Maybe Int Source #

getEntityRef :: t a -> Maybe String Source #

getCmt :: t a -> Maybe String Source #

getCdata :: t a -> Maybe String Source #

getPiName :: t a -> Maybe QName Source #

getPiContent :: t a -> Maybe XmlTrees Source #

getElemName :: t a -> Maybe QName Source #

getAttrl :: t a -> Maybe XmlTrees Source #

getDTDPart :: t a -> Maybe DTDElem Source #

getDTDAttrl :: t a -> Maybe Attributes Source #

getAttrName :: t a -> Maybe QName Source #

getErrorLevel :: t a -> Maybe Int Source #

getErrorMsg :: t a -> Maybe String Source #

getName :: t a -> Maybe QName Source #

getQualifiedName :: t a -> Maybe String Source #

getUniversalName :: t a -> Maybe String Source #

getUniversalUri :: t a -> Maybe String Source #

getLocalPart :: t a -> Maybe String Source #

getNamePrefix :: t a -> Maybe String Source #

getNamespaceUri :: t a -> Maybe String Source #

changeText :: (String -> String) -> t a -> t a Source #

changeBlob :: (Blob -> Blob) -> t a -> t a Source #

changeCmt :: (String -> String) -> t a -> t a Source #

changeName :: (QName -> QName) -> t a -> t a Source #

changeElemName :: (QName -> QName) -> t a -> t a Source #

changeAttrl :: (XmlTrees -> XmlTrees) -> t a -> t a Source #

changeAttrName :: (QName -> QName) -> t a -> t a Source #

changePiName :: (QName -> QName) -> t a -> t a Source #

changeDTDAttrl :: (Attributes -> Attributes) -> t a -> t a Source #

setText :: String -> t a -> t a Source #

setBlob :: Blob -> t a -> t a Source #

setCmt :: String -> t a -> t a Source #

setName :: QName -> t a -> t a Source #

setElemName :: QName -> t a -> t a Source #

setElemAttrl :: XmlTrees -> t a -> t a Source #

setAttrName :: QName -> t a -> t a Source #

setPiName :: QName -> t a -> t a Source #

setDTDAttrl :: Attributes -> t a -> t a Source #

mkElementNode :: QName -> XmlTrees -> XNode Source #

mkAttrNode :: QName -> XNode Source #

mkDTDNode :: DTDElem -> Attributes -> XNode Source #

mkElement :: QName -> XmlTrees -> XmlTrees -> XmlTree Source #

mkRoot :: XmlTrees -> XmlTrees -> XmlTree Source #

mkAttr :: QName -> XmlTrees -> XmlTree Source #

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

addAttr :: XmlTree -> XmlTrees -> XmlTrees Source #

mergeAttrl :: XmlTrees -> XmlTrees -> XmlTrees Source #

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

weak normalform versions of constructors

mkRoot' :: XmlTrees -> XmlTrees -> XmlTree Source #

mkAttr' :: QName -> XmlTrees -> XmlTree Source #

mkText' :: String -> XmlTree Source #

mkCharRef' :: Int -> XmlTree Source #

mkEntityRef' :: String -> XmlTree Source #

mkCmt' :: String -> XmlTree Source #

mkCdata' :: String -> XmlTree Source #

mkPi' :: QName -> XmlTrees -> XmlTree Source #

mkError' :: Int -> String -> XmlTree Source #

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

toText :: XmlTree -> XmlTree Source #

concText :: XmlTree -> XmlTree -> XmlTrees Source #

mergeText :: XmlTree -> XmlTree -> XmlTrees Source #

module Data.Tree.Class

module Data.Tree.NTree.TypeDefs