xeno-0.6: A fast event-based XML parser in pure Haskell

Safe Haskell | None
Language | Haskell2010

Xeno.DOM.Robust

Description

DOM parser and API for XML. Slightly slower DOM parsing, but add missing close tags.

Synopsis

- parse :: ByteString -> Either XenoException Node
- data Node
- data Content
  - = Element !Node
  - | Text !ByteString
  - | CData !ByteString
- name :: Node -> ByteString
- attributes :: Node -> [(ByteString, ByteString)]
- contents :: Node -> [Content]
- children :: Node -> [Node]

# Documentation

parse :: ByteString -> Either XenoException Node Source #

Parse a complete Nodes document.

data Node Source #

Some XML nodes.

#### Instances

Instances details

NFData Node Source # |
Instance details Defined in Xeno.DOM.Internal Methods rnf :: Node -> () Source #
Data Node Source # |

Instance details

Defined in Xeno.DOM.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Node -> c Node Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Node Source #

toConstr :: Node -> Constr Source #

dataTypeOf :: Node -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Node) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Node) Source #

gmapT :: (forall b. Data b => b -> b) -> Node -> Node Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Node -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Node -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Node -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Node -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Node -> m Node Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Node -> m Node Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Node -> m Node Source #

Show Node Source # |
Instance details Defined in Xeno.DOM.Internal Methods showsPrec :: Int -> Node -> ShowS Source # show :: Node -> String Source # showList :: [Node] -> ShowS Source #
Eq Node Source # |
Instance details Defined in Xeno.DOM.Internal Methods (==) :: Node -> Node -> Bool Source # (/=) :: Node -> Node -> Bool Source #

data Content Source #

Content of a node.

Constructors

Element !Node |
Text !ByteString |
CData !ByteString |

#### Instances

Instances details

NFData Content Source # |
Instance details Defined in Xeno.DOM.Internal Methods rnf :: Content -> () Source #
Data Content Source # |

Instance details

Defined in Xeno.DOM.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Content -> c Content Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Content Source #

toConstr :: Content -> Constr Source #

dataTypeOf :: Content -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Content) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Content) Source #

gmapT :: (forall b. Data b => b -> b) -> Content -> Content Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Content -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Content -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Content -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Content -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Content -> m Content Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Content -> m Content Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Content -> m Content Source #

Show Content Source # |
Instance details Defined in Xeno.DOM.Internal Methods showsPrec :: Int -> Content -> ShowS Source # show :: Content -> String Source # showList :: [Content] -> ShowS Source #
Eq Content Source # |
Instance details Defined in Xeno.DOM.Internal Methods (==) :: Content -> Content -> Bool Source # (/=) :: Content -> Content -> Bool Source #

name :: Node -> ByteString Source #

Name of the element.

attributes :: Node -> [(ByteString, ByteString)] Source #

Attributes of a node.

contents :: Node -> [Content] Source #

Contents of a node.

children :: Node -> [Node] Source #

Get just element children of the node (no text).