|
| Is the given node an element?
|
|
|
| Is the given node text?
|
|
|
| Extract all text content from inside a tag into a single string, including
any text contained in children.
|
|
|
| Is the given node a tag with the given name?
|
|
|
| Get the name of this node if it's an element, return empty string otherwise.
|
|
| getAttributes :: n tag text -> [(tag, text)] | Source |
|
| Get the attributes of a node if it's an element, return empty list otherwise.
|
|
| getChildren :: n tag text -> [n tag text] | Source |
|
| Get children of a node if it's an element, return empty list otherwise.
|
|
| modifyName :: (tag -> tag) -> n tag text -> n tag text | Source |
|
| Modify name if it's an element, no-op otherwise.
|
|
| modifyAttributes :: ([(tag, text)] -> [(tag, text)]) -> n tag text -> n tag text | Source |
|
| Modify attributes if it's an element, no-op otherwise.
|
|
| modifyChildren :: ([n tag text] -> [n tag text]) -> n tag text -> n tag text | Source |
|
| Modify children (non-recursively) if it's an element, no-op otherwise.
|
|
| mapAllTags :: (tag -> tag') -> n tag text -> n tag' text | Source |
|
| Map all tags (both tag names and attribute names) recursively.
|
|
| mapElement :: ((tag, [(tag, text)], [n tag text]) -> (tag', [(tag', text)], [n tag' text])) -> n tag text -> n tag' text | Source |
|
| Map an element non-recursively, allowing the tag type to be changed.
|