-- ------------------------------------------------------------

{- |
   Module     : Text.XML.HXT.Arrow.ParserInterface
   Copyright  : Copyright (C) 2010 Uwe Schmidt
   License    : MIT

   Maintainer : Uwe Schmidt (uwe@fh-wedel.de)
   Stability  : stable
   Portability: portable

   interface to the HXT XML and DTD parsers
-}

-- ------------------------------------------------------------

module Text.XML.HXT.Arrow.ParserInterface
    ( module Text.XML.HXT.Arrow.ParserInterface )
where

import Control.Arrow.ArrowList

import Text.XML.HXT.DOM.Interface
import Text.XML.HXT.Arrow.XmlArrow

import qualified Text.XML.HXT.Parser.HtmlParsec          as HP
import qualified Text.XML.HXT.Parser.XmlParsec           as XP
import qualified Text.XML.HXT.Parser.XmlDTDParser        as DP

-- ------------------------------------------------------------

parseXmlDoc                     :: ArrowXml a => a (String, String) XmlTree
parseXmlDoc :: forall (a :: * -> * -> *). ArrowXml a => a (String, String) XmlTree
parseXmlDoc                     =  (String -> String -> [XmlTree]) -> a (String, String) XmlTree
forall b c d. (b -> c -> [d]) -> a (b, c) d
forall (a :: * -> * -> *) b c d.
ArrowList a =>
(b -> c -> [d]) -> a (b, c) d
arr2L String -> String -> [XmlTree]
XP.parseXmlDocument

parseXmlDTDPart                 :: ArrowXml a => a (String, XmlTree) XmlTree
parseXmlDTDPart :: forall (a :: * -> * -> *).
ArrowXml a =>
a (String, XmlTree) XmlTree
parseXmlDTDPart                 =  (String -> XmlTree -> [XmlTree]) -> a (String, XmlTree) XmlTree
forall b c d. (b -> c -> [d]) -> a (b, c) d
forall (a :: * -> * -> *) b c d.
ArrowList a =>
(b -> c -> [d]) -> a (b, c) d
arr2L String -> XmlTree -> [XmlTree]
XP.parseXmlDTDPart

xreadCont                       :: ArrowXml a => a String XmlTree
xreadCont :: forall (a :: * -> * -> *). ArrowXml a => a String XmlTree
xreadCont                       =  (String -> [XmlTree]) -> a String XmlTree
forall b c. (b -> [c]) -> a b c
forall (a :: * -> * -> *) b c. ArrowList a => (b -> [c]) -> a b c
arrL String -> [XmlTree]
XP.xread

xreadDoc                        :: ArrowXml a => a String XmlTree
xreadDoc :: forall (a :: * -> * -> *). ArrowXml a => a String XmlTree
xreadDoc                        =  (String -> [XmlTree]) -> a String XmlTree
forall b c. (b -> [c]) -> a b c
forall (a :: * -> * -> *) b c. ArrowList a => (b -> [c]) -> a b c
arrL String -> [XmlTree]
XP.xreadDoc

parseXmlEntityEncodingSpec
  , parseXmlDocEncodingSpec
  , removeEncodingSpec          :: ArrowXml a => a XmlTree XmlTree

parseXmlDocEncodingSpec :: forall (a :: * -> * -> *). ArrowXml a => a XmlTree XmlTree
parseXmlDocEncodingSpec         =  (XmlTree -> [XmlTree]) -> a XmlTree XmlTree
forall b c. (b -> [c]) -> a b c
forall (a :: * -> * -> *) b c. ArrowList a => (b -> [c]) -> a b c
arrL XmlTree -> [XmlTree]
XP.parseXmlDocEncodingSpec
parseXmlEntityEncodingSpec :: forall (a :: * -> * -> *). ArrowXml a => a XmlTree XmlTree
parseXmlEntityEncodingSpec      =  (XmlTree -> [XmlTree]) -> a XmlTree XmlTree
forall b c. (b -> [c]) -> a b c
forall (a :: * -> * -> *) b c. ArrowList a => (b -> [c]) -> a b c
arrL XmlTree -> [XmlTree]
XP.parseXmlEntityEncodingSpec

removeEncodingSpec :: forall (a :: * -> * -> *). ArrowXml a => a XmlTree XmlTree
removeEncodingSpec              =  (XmlTree -> [XmlTree]) -> a XmlTree XmlTree
forall b c. (b -> [c]) -> a b c
forall (a :: * -> * -> *) b c. ArrowList a => (b -> [c]) -> a b c
arrL XmlTree -> [XmlTree]
XP.removeEncodingSpec

parseXmlDTDdeclPart             :: ArrowXml a => a XmlTree XmlTree
parseXmlDTDdeclPart :: forall (a :: * -> * -> *). ArrowXml a => a XmlTree XmlTree
parseXmlDTDdeclPart             =  (XmlTree -> [XmlTree]) -> a XmlTree XmlTree
forall b c. (b -> [c]) -> a b c
forall (a :: * -> * -> *) b c. ArrowList a => (b -> [c]) -> a b c
arrL XmlTree -> [XmlTree]
DP.parseXmlDTDdeclPart

parseXmlDTDdecl                 :: ArrowXml a => a XmlTree XmlTree
parseXmlDTDdecl :: forall (a :: * -> * -> *). ArrowXml a => a XmlTree XmlTree
parseXmlDTDdecl                 =  (XmlTree -> [XmlTree]) -> a XmlTree XmlTree
forall b c. (b -> [c]) -> a b c
forall (a :: * -> * -> *) b c. ArrowList a => (b -> [c]) -> a b c
arrL XmlTree -> [XmlTree]
DP.parseXmlDTDdecl

parseXmlDTDEntityValue          :: ArrowXml a => a XmlTree XmlTree
parseXmlDTDEntityValue :: forall (a :: * -> * -> *). ArrowXml a => a XmlTree XmlTree
parseXmlDTDEntityValue          =  (XmlTree -> [XmlTree]) -> a XmlTree XmlTree
forall b c. (b -> [c]) -> a b c
forall (a :: * -> * -> *) b c. ArrowList a => (b -> [c]) -> a b c
arrL XmlTree -> [XmlTree]
DP.parseXmlDTDEntityValue

parseXmlEntityValueAsContent    :: ArrowXml a => String -> a XmlTree XmlTree
parseXmlEntityValueAsContent :: forall (a :: * -> * -> *).
ArrowXml a =>
String -> a XmlTree XmlTree
parseXmlEntityValueAsContent    =  (XmlTree -> [XmlTree]) -> a XmlTree XmlTree
forall b c. (b -> [c]) -> a b c
forall (a :: * -> * -> *) b c. ArrowList a => (b -> [c]) -> a b c
arrL ((XmlTree -> [XmlTree]) -> a XmlTree XmlTree)
-> (String -> XmlTree -> [XmlTree]) -> String -> a XmlTree XmlTree
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> XmlTree -> [XmlTree]
XP.parseXmlEntityValueAsContent

parseXmlEntityValueAsAttrValue  :: ArrowXml a => String -> a XmlTree XmlTree
parseXmlEntityValueAsAttrValue :: forall (a :: * -> * -> *).
ArrowXml a =>
String -> a XmlTree XmlTree
parseXmlEntityValueAsAttrValue  =  (XmlTree -> [XmlTree]) -> a XmlTree XmlTree
forall b c. (b -> [c]) -> a b c
forall (a :: * -> * -> *) b c. ArrowList a => (b -> [c]) -> a b c
arrL ((XmlTree -> [XmlTree]) -> a XmlTree XmlTree)
-> (String -> XmlTree -> [XmlTree]) -> String -> a XmlTree XmlTree
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> XmlTree -> [XmlTree]
XP.parseXmlEntityValueAsAttrValue

-- ------------------------------------------------------------

parseHtmlDoc                    :: ArrowList a => a (String, String) XmlTree
parseHtmlDoc :: forall (a :: * -> * -> *).
ArrowList a =>
a (String, String) XmlTree
parseHtmlDoc                    = (String -> String -> [XmlTree]) -> a (String, String) XmlTree
forall b c d. (b -> c -> [d]) -> a (b, c) d
forall (a :: * -> * -> *) b c d.
ArrowList a =>
(b -> c -> [d]) -> a (b, c) d
arr2L String -> String -> [XmlTree]
HP.parseHtmlDocument

hread                           :: ArrowList a => a String XmlTree
hread :: forall (a :: * -> * -> *). ArrowList a => a String XmlTree
hread                           = (String -> [XmlTree]) -> a String XmlTree
forall b c. (b -> [c]) -> a b c
forall (a :: * -> * -> *) b c. ArrowList a => (b -> [c]) -> a b c
arrL   String -> [XmlTree]
HP.parseHtmlContent

hreadDoc                        :: ArrowList a => a String XmlTree
hreadDoc :: forall (a :: * -> * -> *). ArrowList a => a String XmlTree
hreadDoc                        = (String -> [XmlTree]) -> a String XmlTree
forall b c. (b -> [c]) -> a b c
forall (a :: * -> * -> *) b c. ArrowList a => (b -> [c]) -> a b c
arrL ((String -> [XmlTree]) -> a String XmlTree)
-> (String -> [XmlTree]) -> a String XmlTree
forall a b. (a -> b) -> a -> b
$ String -> String -> [XmlTree]
HP.parseHtmlDocument String
"string"

-- ------------------------------------------------------------