HaXml-1.25.4: Utilities for manipulating XML documents

Safe Haskell | Safe
Language | Haskell98

Text.XML.HaXml.Util

Contents

- utility functions to access XML content

Description

- Only a small module containing some helper functions to extract xml content
- I would have added this to Types but I've put it into an additional module
- to avoid circular references (Verbatim - Types)

Synopsis

- docContent :: i -> Document i -> Content i
- contentElem :: Content i -> Element i
- attrs :: Element i -> [Attribute]
- tagTextContent :: Content i -> [Char]

## utility functions to access XML content

docContent :: i -> Document i -> Content i #

Get the main element of the document so that you can apply CFilters directly. `i` is typically (posInNewCxt "filename" Nothing)

contentElem :: Content i -> Element i #

If you know that your CFilter returns a tag, you can use this function to get the tagged Element.

attrs :: Element i -> [Attribute] #

tagTextContent :: Content i -> [Char] #