Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Xeno.DOM
Description
DOM parser and API for XML.
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.
Some XML nodes.
Instances
Data Node Source # | |
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 # | |
NFData Node Source # | |
Defined in Xeno.DOM.Internal | |
Eq Node Source # | |
Content of a node.
Constructors
Element !Node | |
Text !ByteString | |
CData !ByteString |
Instances
Data Content Source # | |
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 # | |
NFData Content Source # | |
Defined in Xeno.DOM.Internal | |
Eq Content Source # | |
name :: Node -> ByteString Source #
Name of the element.
attributes :: Node -> [(ByteString, ByteString)] Source #
Attributes of a node.