dom-selector-0.1.0.0: dom-selector.cabal
-- Initial dom-selector.cabal generated by cabal init. For further
-- documentation, see http://haskell.org/cabal/users-guide/
-- The name of the package.
name: dom-selector
version: 0.1.0.0
synopsis: DOM traversal by CSS selectors for xml-conduit package
description:
CSS selector support for xml-conduit/html-conduit. This package supports compile-time checking of CSS selectors using quasiquotes.
.
* Quick start
.
> -- The following pragmas should be put first (Haddock does not accept a pragma notation.)
> -- LANGUAGE OverloadedStrings, QuasiQuotes
> module Main (main) where
>
> import Text.XML.Cursor
> import qualified Text.HTML.DOM as H (readFile)
> import qualified Data.Text.Lazy.IO as TI (putStrLn)
> import Text.XML.Scraping (innerHtml)
> import Text.XML.Selector.TH
>
> main :: IO ()
> main = do
> c <- fmap fromDocument $ H.readFile "input.html"
> let cs = queryT [jq| ul#foo > li.bar |] c
> TI.putStrLn $ innerHtml cs
.
You can use some elementary CSS selectors for traversing a DOM tree.
.
* Other examples
.
<https://github.com/nebuta/dom-selector/tree/master/examples>
homepage: https://github.com/nebuta/
license: BSD3
license-file: LICENSE
author: Nebuta Lab
maintainer: nebuta.office@gmail.com
copyright: Copyright 2012 by Nebuta Lab
category: Web
stability: alpha
build-type: Simple
cabal-version: >=1.8
source-repository head
type: git
location: https://github.com/nebuta/dom-selector
library
exposed-modules: Text.XML.Scraping, Text.XML.Selector, Text.XML.Selector.Parser, Text.XML.Selector.Test, Text.XML.Selector.TH, Text.XML.Selector.Types
other-modules:
build-depends: base >=4.0 && <5, text ==0.11.*, xml-conduit, html-conduit >=0.1, containers >=0.4, blaze-html >=0.5, parsec >=3.1, QuickCheck >=2.4, template-haskell >=2.5, th-lift >=0.5