@@ -6,15 +6,19 @@ Lenses and traversals for [xml-conduit](http://hackage.haskell.org/package/xml-c
9−> doc <- Text.XML.readFile def "examples\\books.xml"
9+ > doc <- Text.XML.readFile def "examples\\books.xml"
11−> lengthOf ?? doc $ root . el "books" ./ el "book"
11+ > doc ^.. root . el "books" ./ el "book" . attributeIs "category" "Textbooks" ./ el "title" . text
12−7
12+ ["Learn You a Haskell for Great Good!","Programming in Haskell","Real World Haskell"]
14+ > lengthOf ?? doc $ root . el "books" ./ el "book"
14−> doc ^? root . el "books" ./ attributeIs "category" "Joke" ./ el "title" . text
17+ > doc ^? root . el "books" ./ attributeIs "category" "Joke" ./ el "title" . text
15−Just "Functional Ikamusume"
18+ Just "Functional Ikamusume"
20+ > doc & root . el "books" ./ el "book" ./ el "pages" . text <>~ " pages" & renderLBS def & BL.putStrLn
17−> doc & root . el "books" ./ el "book" ./ el "pages" . text <>~ " pages" & renderLBS def & BL.putStrLn
19<?xml version="1.0" encoding="ISO-8859-1"?>
23<?xml version="1.0" encoding="ISO-8859-1"?>
@@ -35,4 +39,6 @@ Just "Functional Ikamusume"
35 <pages>200 pages</pages>
39 <pages>200 pages</pages>