| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sat, 17 Jan 2026 09:14:04 GMT
X-Served-By: cache-dfw-kdal2120124-DFW, cache-bom-vanm7210055-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768641244.290059,VS0,VE297
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
xml-lens: Lenses, traversals, and prisms for xml-conduit
[Skip to Readme]
xml-lens: Lenses, traversals, and prisms for xml-conduit
This package provides DOM selectors based on lenses and prisms. See README.md for examples
[Skip to Readme]
Downloads
- xml-lens-0.3.1.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.1, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.6.1, 0.1.6.2, 0.1.6.3, 0.2, 0.3, 0.3.1 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (>=4 && <5), case-insensitive, containers (>=0.4.0 && <0.8), lens (>=4.0 && <5.5), text (>=0.7 && <1.3 || >=2 && <2.2), xml-conduit (>=1.1 && <1.11) [details] |
| License | BSD-3-Clause |
| Copyright | Copyright (C) 2021 Fumiaki Kinoshita |
| Author | Fumiaki Kinoshita |
| Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
| Uploaded | by FumiakiKinoshita at 2022-05-15T11:18:51Z |
| Revised | Revision 5 made by jack at 2025-08-20T07:24:10Z |
| Category | XML |
| Home page | https://github.com/fumieval/xml-lens |
| Bug tracker | https://github.com/fumieval/xml-lens/issues |
| Source repo | head: git clone https://github.com/fumieval/xml-lens.git |
| Distributions | NixOS:0.3.1, Stackage:0.3.1 |
| Reverse Dependencies | 8 direct, 1 indirect [details] |
| Downloads | 11435 total (44 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2022-05-15 [all 1 reports] |
Readme for xml-lens-0.3.1
[back to package description]xml-lens
Lenses and traversals for xml-conduit.
Example
> doc <- Text.XML.readFile def "examples/books.xml"
> doc ^.. root . named "books" ... named "book" . attributeIs "category" "Textbooks" ... named "title" . text
["Learn You a Haskell for Great Good!","Programming in Haskell","Real World Haskell"]
> lengthOf ?? doc $ root . named "books" ... named "book"
7
> doc ^? root . named "books" ... attributeIs "category" "Joke" ... named "title" . text
Just "Functional Ikamusume"
> doc & root . named "books" ... named "book" ... named "pages" . text <>~ " pages" & renderLBS def & BL.putStrLn
<?xml version="1.0" encoding="ISO-8859-1"?>
<books>
<book category="Language and library definition">
<title>Haskell 98 language and libraries: the Revised Report</title>
<author year="2003">Simon Peyton Jones</author>
<pages>272 pages</pages>
<price>£45.00</price>
</book>
<book category="Textbooks">
<title>Learn You a Haskell for Great Good!</title>
<author year="2011">Miran Lipovaca</author>
<pages>360 pages</pages>
</book>
<book category="Textbooks">
<title>Programming in Haskell</title>
<author year="2007">Graham Hutton</author>
<pages>200 pages</pages>
</book>
…