-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Lenses, traversals, and prisms for xml-conduit
--   
--   Lens-based DOM selector
@package xml-lens
@version 0.1.6.3


module Text.XML.Lens
data Element
Element :: Name -> Map Name Text -> [Node] -> Element
[elementName] :: Element -> Name
[elementAttributes] :: Element -> Map Name Text
[elementNodes] :: Element -> [Node]

-- | Combine two <a>Traversal</a>s just like XPath's slash. Identical to
--   (<a>...</a>).
--   
--   <pre>
--   l ./ m ≡ l . <a>plate</a> . m
--   </pre>
(./) :: (Applicative f, Plated c) => LensLike f s t c c -> Over p f c c a b -> Over p f s t a b
infixr 9 ./
name :: Lens' Element Name
localName :: Lens' Element Text

-- | Traverse elements which has the specified name.
el :: Name -> Traversal' Element Element

-- | Old name for <a>named</a>
ell :: Text -> Traversal' Element Element

-- | Traverse elements which has the specified *local* name
--   (case-insensitive).
named :: CI Text -> Traversal' Element Element
attributeIs :: Name -> Text -> Traversal' Element Element
attributeSatisfies :: Name -> (Text -> Bool) -> Traversal' Element Element
attr :: Name -> Traversal' Element Text
attribute :: Name -> Lens' Element (Maybe Text)
attrs :: Lens' Element (Map Name Text)

-- | Traverse all contents of the element.
text :: Traversal' Element Text

-- | Traverse all comments of the element.
comment :: Traversal' Element Text

-- | Traverse itself with its all children. Rewriting subnodes of each
--   children will break a traversal law.
entire :: Traversal' Element Element
nodes :: Lens' Element [Node]
data Node
NodeElement :: Element -> Node
NodeInstruction :: Instruction -> Node
NodeContent :: Text -> Node
NodeComment :: Text -> Node
_Element :: Prism' Node Element
_Content :: Prism' Node Text
class AsInstruction t
_Instruction :: AsInstruction t => Prism' t Instruction
class AsComment t
_Comment :: AsComment t => Prism' t Text
data Document
Document :: Prologue -> Element -> [Miscellaneous] -> Document
[documentPrologue] :: Document -> Prologue
[documentRoot] :: Document -> Element
[documentEpilogue] :: Document -> [Miscellaneous]

-- | The root element of the document.
root :: Lens' Document Element
prologue :: Lens' Document Prologue
epilogue :: Lens' Document [Miscellaneous]
doctype :: Lens' Prologue (Maybe Doctype)

-- | A fully qualified name.
--   
--   Prefixes are not semantically important; they are included only to
--   simplify pass-through parsing. When comparing names with <a>Eq</a> or
--   <a>Ord</a> methods, prefixes are ignored.
--   
--   The <tt>IsString</tt> instance supports Clark notation; see
--   <a>http://www.jclark.com/xml/xmlns.htm</a> and
--   <a>http://infohost.nmt.edu/tcc/help/pubs/pylxml/etree-QName.html</a>.
--   Use the <tt>OverloadedStrings</tt> language extension for very simple
--   <tt>Name</tt> construction:
--   
--   <pre>
--   myname :: Name
--   myname = "{http://example.com/ns/my-namespace}my-name"
--   </pre>
data Name
Name :: Text -> Maybe Text -> Maybe Text -> Name
[nameLocalName] :: Name -> Text
[nameNamespace] :: Name -> Maybe Text
[namePrefix] :: Name -> Maybe Text
_nameLocalName :: Lens' Name Text
_nameNamespace :: Lens' Name (Maybe Text)
_namePrefix :: Lens' Name (Maybe Text)
data Instruction
Instruction :: Text -> Text -> Instruction
[instructionTarget] :: Instruction -> Text
[instructionData] :: Instruction -> Text
_instructionTarget :: Lens' Instruction Text
_instructionData :: Lens' Instruction Text
instance Text.XML.Lens.AsComment Text.XML.Node
instance Text.XML.Lens.AsComment Data.XML.Types.Miscellaneous
instance Text.XML.Lens.AsInstruction Text.XML.Node
instance Text.XML.Lens.AsInstruction Data.XML.Types.Miscellaneous
instance Control.Lens.Plated.Plated Text.XML.Element
