|
| 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 c tag text -> [(tag, text)] | Source |
|
| Get the attributes of a node if it's an element, return empty list otherwise.
|
|
| getChildren :: n c tag text -> c (n c tag text) | Source |
|
| Get children of a node if it's an element, return empty list otherwise.
|
|
|
| Get this node's text if it's a text node, return empty text otherwise.
|
|
| modifyName :: (tag -> tag) -> n c tag text -> n c tag text | Source |
|
| Modify name if it's an element, no-op otherwise.
|
|
| modifyAttributes :: ([(tag, text)] -> [(tag, text)]) -> n c tag text -> n c tag text | Source |
|
| Modify attributes if it's an element, no-op otherwise.
|
|
| modifyChildren :: (c (n c tag text) -> c (n c tag text)) -> n c tag text -> n c tag text | Source |
|
| Modify children (non-recursively) if it's an element, no-op otherwise.
|
|
| mapAllTags :: (tag -> tag') -> n c tag text -> n c tag' text | Source |
|
| Map all tags (both tag names and attribute names) recursively.
|
|
| mapElement :: ((tag, [(tag, text)], c (n c tag text)) -> (tag', [(tag', text)], c (n c tag' text))) -> n c tag text -> n c tag' text | Source |
|
| Map an element non-recursively, allowing the tag type to be changed.
|
|
| mapNodeContainer :: (c (n c tag text) -> ItemM c (c' (n c' tag text))) -> n c tag text -> ItemM c (n c' tag text) | Source |
|
| Change a node from one container type to another.
|