pugixml-0.3.3: pugixml binding.

Safe HaskellNone
LanguageHaskell2010

Text.XML.Pugi.Mutable

Contents

Synopsis

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

Methods

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

findChildByNameAndAttr Source

Arguments

:: HasChildren k 
=> ByteString

node name

-> ByteString

attribute name

-> ByteString

attribute value

-> n k Mutable 
-> Modify (Maybe (MutableNode Unknown)) 

findChildByAttr Source

Arguments

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

specified append/prepend child