úÎDÛAº     None2IT[b#Zipper into a  tree. Retrieves the current node of a .*Nodes to the left (ordered right to left). +Nodes to the right (ordered left to right).!(Parents' name, attributes, and siblings.Renders a value of type a into an XML fragment.If a  instance for a exists, then:    ( a) == " a #Parsing the top-level nodes.$"Parsing a particular root element.!XML parser monad. To be run with  .You can build a  using  ,  ,  , , , or any of the %, & or ' combinators.,Parses an XML fragment into a value of type a.If a  instance for a exists, then:    ( a) == " a 4Either a text or an element node in an XML fragment.Construct with  or  . Destruct with  or .Destruct a text .Destruct an element .(Concats  s together.Construct a text . Construct an element . =Run a parser on an XML fragment. If the parser fails, then a )$ with an error message is returned.   "foo" p runs a  p inside a element node named "foo"D. This fails if such element does not exist at the current position.+Consumes the element from the parser state. “Return the value of the requested attribute, if defined. May return an empty string in case the attribute is defined but no value was given to it.-Consumes the attribute from the parser state. ’Returns all of the available element attributes. May return empty strings as values in case an attribute is defined but no value was given to it.QConsumes all of the remaining attributes for this element from the parser state.+Return a text node value (including CDATA).-Consumes the text node from the parser state.#Law: When two consecutive calls to k are made, the first call returns all of the available consecutive text, and the second call always fails.Parses a value that can be *..Consumes the raw string from the parser state.OSucceeds if all of the elements, attributes and text nodes have been consumed.Encodes a list of XML 1s to an UTF8-encoded and XML-escaped bytestring.&Post-order depth-first replacement of  and all of its children.This function works like fixp, but the given function is trying to find a fixpoint for the individual children nodes, not for the root node.=For example, the following function renames every node named "w" to "y", and every node named "y" to "z"*. It accomplishes this by first renaming "w" nodes to "x", and then, by using k$ recursively to further rename all "x"6 nodes (including the ones that were just created) to "y"8 in a post-order depth-first manner. After renaming an "x" node to "y", the recursion stops (i.e., k is not used), so our new "y"$ nodes won't be further renamed to "z"!. However, nodes that were named "y" initially will be renamed to "z".šIn our example we only replace one node with another, but a node can be replaced with zero or more nodes, depending on the length of the resulting list. foo ::  -> [] foo =  $ \k -> \case  "w" as cs -> let " e =   "x" as cs in k e  "x" as cs -> let " e =   "y" as cs in [e]  "y" as cs -> let " e =   "z" as cs in k e WARNING If you call k in every branch, then | will never terminate. Make sure the recursion stops at some point by simply returning a list of nodes instead of calling k.Monadic version of .+#The cursor if left where it starts.,,The cursor if left in the rightmost sibling.- Builds a > for navigating a tree. That is, a forest with a single root ..Retrieves a list of the Us at the same level as the current position of a cursor, including the current node./,Removes the node to the right and return it.0Inserts a list of new 's to the right of the current position. Backtracks. Backtracks. Constructs a .31 !2#$3456( Element' name. Attributes. Children.Returns 7J if the element name, or atribute names, or attribute values are invalid.,TODO: We just check for emptyness currently.8 9+,-./0:;<   &1 !2#$3456( 8 9+,-./0:;<=      !"#$%&'($)*$)+$),-$).$/0123456789:$%;<=>?@A xmlbf-0.2-7VJ7Pi7m2bDKv5seqhxM6oXmlbfToXmltoXmlParserFromXmlfromXmlNodeTextElementtextelement runParserpElementpAttrpAttrspTextpRead pEndOfInputencodedfdfM$fMonadPlusParser$fAlternativeParser$fMonadFailParser $fMonadParser$fApplicativeParser$fIsStringNode$fEqNode $fShowNode$fFunctorParserCursor_cursorCurrent _cursorLefts _cursorRights_cursorParentsbase Data.EitherRightSTopSRegGHC.Base Applicative AlternativeMonad normalizeString Text.ReadreadtraverschildrentraverseRightSiblingscursorFromNodecursorSiblingscursorRemoveRightcursorInsertManyRightSunParserElement'Text'LeftguardeisEof encodeUtf8 encodeXmlUtf8 xmlEscaped