wraxml: Lazy wrapper to HaXML, HXT, TagSoup via custom XML tree structure
This is a wrapper to HaXML and HXT (Haskell XML Toolbox).
It's my work-around for the unfortunate situation that both toolboxes
have different functionality,
none is the superset of the other.
Both of them rely on data structures, which look unnatural to me.
Additionally they provide combinator functions that are actually weakly typed,
they are all of type (a -> [a])
,
instead of being differentiated into (a -> Bool)
, (a -> a)
and (a -> [a])
.
HXT is even weaker in type safety than HaXML
since it allows complete XML trees even in attribute values.
I didn't want to write another XML toolbox with parsers, HTML support and so on,
however in the meantime I came close to it.
I decided to do some wrapping in order to use as much as possible functionality from HaXML and HXT. I provide my own XML tree data structure with according operations. Conversions between HaXML or HXT trees and my own ones are implemented. So I can use the parser and pretty printer of both HaXML and HXT while processing trees the way I find more natural. TagSoups can also be converted to XML trees. All conversions are lazy.
I have a special XML string structure. (Text.XML.WraXML.String) XML strings consist of ASCII characters and XML references. My XML tree is built on top of a very general tree structure, which distinguishs between leafs and inner branches. (Data.Tree.BranchLeafLabel) Each element of a tree is labeled with some information. Branches are then used for tags, leafs for XML strings and special tags, and the labels for pointers to positions in the source file. (Text.XML.WraXML.Tree)
Modules
[Index] [Quick Jump]
- Data
- Text
Flags
Automatic Flags
Name | Description | Default |
---|---|---|
buildexamples | Build example executables | Disabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- wraxml-0.5.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.3, 0.4, 0.4.0.1, 0.4.2, 0.4.3, 0.4.3.1, 0.4.4, 0.4.4.1, 0.4.4.2, 0.4.4.3, 0.4.4.4, 0.5 |
---|---|
Dependencies | base (>=3 && <5), containers (>=0.1 && <0.8), data-accessor (>=0.2 && <0.3), explicit-exception (>=0.1.3 && <0.3), HaXml (>=1.23 && <1.26), hxt (>=9.3 && <9.4), hxt-unicode (>=9.0.1 && <9.1), polyparse (>=1.2 && <1.14), tagchup (>=0.4 && <0.5), tagsoup (>=0.8 && <0.15), transformers (>=0.2 && <0.7), utility-ht (>=0.0.12 && <0.1), wraxml, xml-basic (>=0.1 && <0.2) [details] |
License | GPL-3.0-only |
Author | Henning Thielemann <haskell@henning-thielemann.de> |
Maintainer | Henning Thielemann <haskell@henning-thielemann.de> |
Revised | Revision 1 made by HenningThielemann at 2024-10-26T18:12:39Z |
Category | XML |
Home page | http://code.haskell.org/~thielema/wraxml/ |
Source repo | head: darcs get http://code.haskell.org/~thielema/wraxml/ this: darcs get http://code.haskell.org/~thielema/wraxml/ --tag 0.5 |
Uploaded | by HenningThielemann at 2023-09-30T10:03:56Z |
Distributions | LTSHaskell:0.5, NixOS:0.5, Stackage:0.5 |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Executables | escape-tidy-html |
Downloads | 6019 total (20 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Last success reported on 2023-09-30 [all 1 reports] |