module Text.HTML.Yuuko where
import Text.XML.HXT.Arrow
import qualified Text.XML.HXT.Arrow.XPathSimple as XS
yuuko :: String -> String -> IO [String]
yuuko expr s = do
runX process
where
args =
[ (a_validate, v_0)
, (a_parse_html, v_1)
, (a_encoding, utf8)
, (a_issue_warnings, v_0)
]
process =
readString args s
>>> XS.getXPathTreesInDoc expr
>>> getText