vestigia-0.2.0: Where an execution depended on a secret.
Copyright(c) 2026 Jared Tobin
LicenseMIT
MaintainerJared Tobin <jared@ppad.tech>
Safe HaskellSafe-Inferred
LanguageHaskell2010

Vestigia.Xml

Description

A reader for the XML memcheck writes: elements and text, with the declaration, comments, and attributes skipped and the standard entities decoded. It is not a general XML parser, and refuses what it does not understand rather than guessing.

Synopsis

Documentation

data Node Source #

An element (its name and contents) or a run of text.

Constructors

Element !Text ![Node] 
Text !Text 

Instances

Instances details
Show Node Source # 
Instance details

Defined in Vestigia.Xml

Methods

showsPrec :: Int -> Node -> ShowS #

show :: Node -> String #

showList :: [Node] -> ShowS #

Eq Node Source # 
Instance details

Defined in Vestigia.Xml

Methods

(==) :: Node -> Node -> Bool #

(/=) :: Node -> Node -> Bool #

parseDocument :: Text -> Either String Node Source #

The document's root element.

>>> parseDocument "<?xml version=\"1.0\"?><a><b>x &amp; y</b></a>"
Right (Element "a" [Element "b" [Text "x & y"]])

children :: Text -> Node -> [Node] Source #

The child elements of a node with the given name.

child :: Text -> Node -> Maybe Node Source #

The first child element with the given name.

textOf :: Node -> Text Source #

The text a node holds, stripped.