Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Modify a
- create :: Monad m => (MutableDocument -> Modify ()) -> m Document
- modify :: Monad m => Document -> (MutableDocument -> Modify ()) -> m Document
- class MutableNodeLike n where
- asNode :: n k Mutable -> Modify (Node_ k Mutable)
- nodeEqual :: n k Mutable -> n l o -> Modify Bool
- forgetNodeKind :: n k Mutable -> n Unknown Mutable
- prettyNode :: PrettyConfig -> Int -> n k Mutable -> Modify ByteString
- hashValue :: n k Mutable -> Modify CSize
- nodeType :: n k Mutable -> Modify NodeType
- getName :: HasName k => n k Mutable -> Modify ByteString
- getValue :: HasValue k => n k Mutable -> Modify ByteString
- parent :: n k Mutable -> Modify (Maybe (MutableNode Unknown))
- firstChild :: HasChildren k => n k Mutable -> Modify (Maybe (MutableNode Unknown))
- lastChild :: HasChildren k => n k Mutable -> Modify (Maybe (MutableNode Unknown))
- nextSibling :: n k Mutable -> Modify (Maybe (MutableNode Unknown))
- prevSibling :: n k Mutable -> Modify (Maybe (MutableNode Unknown))
- child :: HasChildren k => ByteString -> n k Mutable -> Modify (Maybe (MutableNode Unknown))
- attribute :: HasAttribute k => ByteString -> n k Mutable -> Modify (Maybe ByteString)
- nextSiblingByName :: ByteString -> n k Mutable -> Modify (Maybe (MutableNode Unknown))
- prevSiblingByName :: ByteString -> n k Mutable -> Modify (Maybe (MutableNode Unknown))
- findChildByNameAndAttr :: HasChildren k => ByteString -> ByteString -> ByteString -> n k Mutable -> Modify (Maybe (MutableNode Unknown))
- findChildByAttr :: HasChildren k => ByteString -> ByteString -> n k Mutable -> Modify (Maybe (MutableNode Unknown))
- childValue :: HasChildren k => n k Mutable -> Modify ByteString
- childValueByName :: HasChildren k => ByteString -> n k Mutable -> Modify ByteString
- text :: n k Mutable -> Modify ByteString
- findAttribute :: (ByteString -> ByteString -> Bool) -> n k Mutable -> Modify (Maybe Attribute)
- findChild :: (Node -> Bool) -> n k Mutable -> Modify (Maybe (MutableNode Unknown))
- findNode :: (Node -> Bool) -> n k Mutable -> Modify (Maybe (MutableNode Unknown))
- path :: Char -> n k Mutable -> Modify ByteString
- firstElementByPath :: Char -> ByteString -> n k Mutable -> Modify (Maybe (MutableNode Unknown))
- root :: n k Mutable -> Modify (Maybe (MutableNode Unknown))
- evaluate :: EvalXPath r => XPath r -> n k Mutable -> Modify (XPathResult r Mutable)
- selectSingleNode :: XPath NodeSet -> n k Mutable -> Modify (XPathNode Mutable)
- selectNodes :: XPath NodeSet -> n k Mutable -> Modify (NodeSet Mutable)
- setName :: HasName k => ByteString -> n k Mutable -> Modify ()
- setValue :: HasValue k => ByteString -> n k Mutable -> Modify ()
- appendAttr :: HasAttribute k => ByteString -> ByteString -> n k Mutable -> Modify ()
- prependAttr :: HasAttribute k => ByteString -> ByteString -> n k Mutable -> Modify ()
- setAttr :: HasAttribute k => ByteString -> ByteString -> n k Mutable -> Modify ()
- appendChild :: HasChildren k => NodeType -> n k Mutable -> Modify (MutableNode l)
- prependChild :: HasChildren k => NodeType -> n k Mutable -> Modify (MutableNode l)
- appendCopy :: HasChildren k => Node_ k a -> n l Mutable -> Modify (MutableNode k)
- prependCopy :: HasChildren k => Node_ k a -> n l Mutable -> Modify (MutableNode k)
- removeAttr :: HasAttribute k => ByteString -> n k Mutable -> Modify ()
- removeChild :: HasChildren k => Node_ k a -> n l Mutable -> Modify ()
- appendFlagment :: HasChildren k => ParseConfig -> ByteString -> n k Mutable -> Modify ()
- mapSiblingM :: (MutableNode Unknown -> Modify a) -> n k Mutable -> Modify [a]
- mapSiblingM_ :: (MutableNode Unknown -> Modify a) -> n k Mutable -> Modify ()
- appendAttrs :: (MutableNodeLike n, HasAttribute k) => [Attribute] -> n k Mutable -> Modify ()
- setOrAppendAttr :: (HasAttribute k, MutableNodeLike n) => ByteString -> ByteString -> n k Mutable -> Modify ()
- appendElement :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Element)
- prependElement :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Element)
- appendDeclaration :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Declaration)
- prependDeclaration :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Declaration)
- appendPCData :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode PCData)
- prependPCData :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode PCData)
- appendCData :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode CData)
- prependCData :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode CData)
- appendComment :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Comment)
- prependComment :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Comment)
- appendDoctype :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Doctype)
- prependDoctype :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Doctype)
- appendPi :: (HasChildren k, MutableNodeLike n) => ByteString -> ByteString -> n k Mutable -> Modify (MutableNode Pi)
- prependPi :: (HasChildren k, MutableNodeLike n) => ByteString -> ByteString -> n k Mutable -> Modify (MutableNode Pi)
setter
create :: Monad m => (MutableDocument -> Modify ()) -> m Document Source
create document from scratch.
modify :: Monad m => Document -> (MutableDocument -> Modify ()) -> m Document Source
modify document.
class MutableNodeLike n where Source
asNode, nodeEqual, prettyNode, hashValue, nodeType, getName, getValue, parent, firstChild, lastChild, nextSibling, prevSibling, child, attribute, nextSiblingByName, prevSiblingByName, findChildByNameAndAttr, findChildByAttr, childValue, childValueByName, text, findAttribute, findChild, findNode, path, firstElementByPath, root, evaluate, selectSingleNode, selectNodes, setName, setValue, appendAttr, prependAttr, setAttr, appendChild, prependChild, appendCopy, prependCopy, removeAttr, removeChild, appendFlagment, mapSiblingM, mapSiblingM_
asNode :: n k Mutable -> Modify (Node_ k Mutable) Source
nodeEqual :: n k Mutable -> n l o -> Modify Bool Source
forgetNodeKind :: n k Mutable -> n Unknown Mutable Source
prettyNode :: PrettyConfig -> Int -> n k Mutable -> Modify ByteString Source
hashValue :: n k Mutable -> Modify CSize Source
nodeType :: n k Mutable -> Modify NodeType Source
getName :: HasName k => n k Mutable -> Modify ByteString Source
getValue :: HasValue k => n k Mutable -> Modify ByteString Source
parent :: n k Mutable -> Modify (Maybe (MutableNode Unknown)) Source
firstChild :: HasChildren k => n k Mutable -> Modify (Maybe (MutableNode Unknown)) Source
lastChild :: HasChildren k => n k Mutable -> Modify (Maybe (MutableNode Unknown)) Source
nextSibling :: n k Mutable -> Modify (Maybe (MutableNode Unknown)) Source
prevSibling :: n k Mutable -> Modify (Maybe (MutableNode Unknown)) Source
child :: HasChildren k => ByteString -> n k Mutable -> Modify (Maybe (MutableNode Unknown)) Source
attribute :: HasAttribute k => ByteString -> n k Mutable -> Modify (Maybe ByteString) Source
nextSiblingByName :: ByteString -> n k Mutable -> Modify (Maybe (MutableNode Unknown)) Source
prevSiblingByName :: ByteString -> n k Mutable -> Modify (Maybe (MutableNode Unknown)) Source
:: HasChildren k | |
=> ByteString | node name |
-> ByteString | attribute name |
-> ByteString | attribute value |
-> n k Mutable | |
-> Modify (Maybe (MutableNode Unknown)) |
:: HasChildren k | |
=> ByteString | attribute name |
-> ByteString | attribute value |
-> n k Mutable | |
-> Modify (Maybe (MutableNode Unknown)) |
childValue :: HasChildren k => n k Mutable -> Modify ByteString Source
childValueByName :: HasChildren k => ByteString -> n k Mutable -> Modify ByteString Source
text :: n k Mutable -> Modify ByteString Source
findAttribute :: (ByteString -> ByteString -> Bool) -> n k Mutable -> Modify (Maybe Attribute) Source
find attribute by predicate. since v0.2.0.
findChild :: (Node -> Bool) -> n k Mutable -> Modify (Maybe (MutableNode Unknown)) Source
find child by predicate. since v0.2.0.
findNode :: (Node -> Bool) -> n k Mutable -> Modify (Maybe (MutableNode Unknown)) Source
find node by predicate. since v0.2.0.
path :: Char -> n k Mutable -> Modify ByteString Source
firstElementByPath :: Char -> ByteString -> n k Mutable -> Modify (Maybe (MutableNode Unknown)) Source
root :: n k Mutable -> Modify (Maybe (MutableNode Unknown)) Source
evaluate :: EvalXPath r => XPath r -> n k Mutable -> Modify (XPathResult r Mutable) Source
selectSingleNode :: XPath NodeSet -> n k Mutable -> Modify (XPathNode Mutable) Source
selectNodes :: XPath NodeSet -> n k Mutable -> Modify (NodeSet Mutable) Source
setName :: HasName k => ByteString -> n k Mutable -> Modify () Source
setValue :: HasValue k => ByteString -> n k Mutable -> Modify () Source
appendAttr :: HasAttribute k => ByteString -> ByteString -> n k Mutable -> Modify () Source
prependAttr :: HasAttribute k => ByteString -> ByteString -> n k Mutable -> Modify () Source
setAttr :: HasAttribute k => ByteString -> ByteString -> n k Mutable -> Modify () Source
appendChild :: HasChildren k => NodeType -> n k Mutable -> Modify (MutableNode l) Source
generic appendChild method. Recommend to use appendElement
etc...
prependChild :: HasChildren k => NodeType -> n k Mutable -> Modify (MutableNode l) Source
generic prependChild method. Recommend to use prependElement
etc...
appendCopy :: HasChildren k => Node_ k a -> n l Mutable -> Modify (MutableNode k) Source
prependCopy :: HasChildren k => Node_ k a -> n l Mutable -> Modify (MutableNode k) Source
removeAttr :: HasAttribute k => ByteString -> n k Mutable -> Modify () Source
removeChild :: HasChildren k => Node_ k a -> n l Mutable -> Modify () Source
appendFlagment :: HasChildren k => ParseConfig -> ByteString -> n k Mutable -> Modify () Source
mapSiblingM :: (MutableNode Unknown -> Modify a) -> n k Mutable -> Modify [a] Source
mapSiblingM_ :: (MutableNode Unknown -> Modify a) -> n k Mutable -> Modify () Source
appendAttrs :: (MutableNodeLike n, HasAttribute k) => [Attribute] -> n k Mutable -> Modify () Source
setOrAppendAttr :: (HasAttribute k, MutableNodeLike n) => ByteString -> ByteString -> n k Mutable -> Modify () Source
specified append/prepend child
appendElement :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Element) Source
prependElement :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Element) Source
appendDeclaration :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Declaration) Source
prependDeclaration :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Declaration) Source
appendPCData :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode PCData) Source
prependPCData :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode PCData) Source
appendCData :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode CData) Source
prependCData :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode CData) Source
appendComment :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Comment) Source
prependComment :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Comment) Source
appendDoctype :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Doctype) Source
prependDoctype :: (HasChildren k, MutableNodeLike n) => ByteString -> n k Mutable -> Modify (MutableNode Doctype) Source
appendPi :: (HasChildren k, MutableNodeLike n) => ByteString -> ByteString -> n k Mutable -> Modify (MutableNode Pi) Source
prependPi :: (HasChildren k, MutableNodeLike n) => ByteString -> ByteString -> n k Mutable -> Modify (MutableNode Pi) Source