hxt-9.3.1.22: 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 | Haskell2010

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

- toText :: XmlTree -> XmlTree
- 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
- mkDTDElem :: DTDElem -> Attributes -> XmlTrees -> XmlTree
- mkText' :: String -> XmlTree
- mkError' :: Int -> String -> XmlTree
- mkCdata' :: String -> XmlTree
- mkCmt' :: String -> XmlTree
- mkCharRef' :: Int -> XmlTree
- mkElement' :: QName -> XmlTrees -> XmlTrees -> XmlTree
- mkAttr' :: QName -> XmlTrees -> XmlTree
- mkDTDElem' :: DTDElem -> Attributes -> XmlTrees -> XmlTree
- mkPi' :: QName -> XmlTrees -> XmlTree
- mergeAttrl :: XmlTrees -> XmlTrees -> XmlTrees
- mkRoot' :: XmlTrees -> XmlTrees -> XmlTree
- mkEntityRef' :: String -> XmlTree
- mergeText :: XmlTree -> XmlTree -> XmlTrees
- mkElementNode :: QName -> XmlTrees -> XNode
- mkAttrNode :: QName -> XNode
- mkDTDNode :: DTDElem -> Attributes -> XNode
- mkElement :: QName -> XmlTrees -> XmlTrees -> XmlTree
- mkRoot :: XmlTrees -> XmlTrees -> XmlTree
- mkAttr :: QName -> XmlTrees -> XmlTree
- addAttr :: XmlTree -> XmlTrees -> XmlTrees
- concText :: XmlTree -> XmlTree -> XmlTrees
- module Data.Tree.Class
- module Data.Tree.NTree.TypeDefs

# Documentation

toText :: XmlTree -> XmlTree Source #

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

Instances details

XmlNode XNode Source # |

Instance details

Defined in Text.XML.HXT.DOM.XmlNode

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

Instance details

Defined in Text.XML.HXT.DOM.XmlNode

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 #

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

mkText' :: String -> XmlTree Source #

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

mkCdata' :: String -> XmlTree Source #

mkCmt' :: String -> XmlTree Source #

mkCharRef' :: Int -> XmlTree Source #

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

weak normalform versions of constructors

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

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

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

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

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

mkEntityRef' :: String -> XmlTree Source #

mergeText :: XmlTree -> XmlTree -> XmlTrees 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 #

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

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

module Data.Tree.Class

module Data.Tree.NTree.TypeDefs