1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
|
Cabal-Version: >= 1.6
Name: hexpat
Version: 0.20.13
Synopsis: XML parser/formatter based on expat
Description:
This package provides a general purpose Haskell XML library using Expat to
do its parsing (<http://expat.sourceforge.net/> - a fast stream-oriented XML
parser written in C). It is extensible to any string type, with @String@,
@ByteString@ and @Text@ provided out of the box.
.
Basic usage: Parsing a tree (/Tree/), formatting a tree (/Format/).
Other features: Helpers for processing XML trees (/Proc/), trees annotated with
XML source location (/Annotated/), extended XML trees with comments,
processing instructions, etc (/Extended/), XML cursors (/Cursor/),
SAX-style parse (/SAX/), and access to the low-level interface in case speed
is paramount (/Internal.IO/).
.
The design goals are speed, speed, speed, interface simplicity and modularity.
.
For introduction and examples, see the /Text.XML.Expat.Tree/ module. For benchmarks,
<http://haskell.org/haskellwiki/Hexpat/>
.
If you want to do interactive I\/O, an obvious option is to use lazy parsing
with one of the lazy I\/O functions such as hGetContents. However, this can be
problematic in some applications because it doesn't handle I\/O errors properly
and can give no guarantee of timely resource cleanup. Because of the generalized
list, Hexpat is designed to allow for chunked I/O, but as of this writing I haven't
done a nice integration with enumerator and friends.
.
/IO/ is filed under /Internal/ because it's low-level and most users won't want
it. The other /Internal/ modules are re-exported by /Annotated/, /Tree/ and /Extended/,
so you won't need to import them directly.
.
If you have trouble building on Windows, you can try the bundle flag. This will
make it build from the source of libexpat bundled inside the hexpat package:
cabal install -f bundle hexpat
.
Credits to Iavor Diatchki and the @xml@ (XML.Light) package for /Proc/ and /Cursor/.
Thanks to the many contributors.
.
ChangeLog: 0.15 changes intended to fix a (rare) \"error: a C finalizer called back into Haskell.\"
that seemed only to happen only on ghc6.12.X; 0.15.1 Fix broken Annotated parse;
0.16 switch from mtl to transformers; 0.17 fix mapNodeContainer & rename some things.;
0.18 rename defaultEncoding to overrideEncoding. 0.18.3 formatG and indent were demanding list
items more than once (inefficient in chunked processing); 0.19 add Extended.hs;
0.19.1 fix a memory leak introduced in 0.19, delegate parsing to bound thread
if unbound (see note above); 0.19.2 include expat source code so \'cabal install\' just works
on Linux, Mac and Windows (thanks Jacob Stanley); 0.19.3 fix misconfiguration of expat
which broke entity parsing; 0.19.4 bump version constraint for text; 0.19.5 bump text
to < 0.12 and fix text-0.10.0.1 breakage; 0.19.6 dependency breakage with List;
0.19.7 ghc-7.2.1 compatibility; 0.19.8 fix space leak on lazy parse under ghc-7.2.1;
0.19.9 fix formatting of > character + improve performance; 0.19.10 ghc-7.4.x compatibility;
0.20.1 fix an unfortunate crash when used in parallel processing and greatly improve
performance; 0.20.2 make parseSaxG lazier; 0.20.3 minor build issues; 0.20.4 remove
dependency on extensible-exceptions; 0.20.5 bump text upper bound; 0.20.6 bump text again
to include 1.1.x.x; 0.20.7 bump text again for 1.2.x.x; 0.20.8 bump utf8-string dep;
0.20.9 bump deepseq dep/ghc-7.10 compatibility.; 0.20.10 increase dependency upper bounds;
0.20.11 update to libexpat-2.2.1 which includes several security fixes;
0.20.12 use the system libexpat by default, but provide a bundle flag to allow a bundled
copy of expat to be used, which might make life easier on Windows: cabal install -f bundle
hexpat; 0.20.13 Fix some mistakes made in 0.20.12 cabal file.
Category: XML
License: BSD3
License-File: LICENSE
Author:
Stephen Blackheath [blackh] (the primary author),
Doug Beardsley,
Gregory Collins,
Evan Martin (who started the project),
Matthew Pocock [drdozer],
Kevin Jardine,
Jacob Stanley,
Simon Hengel
Maintainer: Stephen Blackheath <hexpat2.stephen@blacksapphire.com>
Copyright:
(c) 2009 Doug Beardsley <mightybyte@gmail.com>,
(c) 2009-2012 Stephen Blackheath <http://blacksapphire.com/antispam/>,
(c) 2009 Gregory Collins,
(c) 2008 Evan Martin <martine@danga.com>,
(c) 2009 Matthew Pocock <matthew.pocock@ncl.ac.uk>,
(c) 2007-2009 Galois Inc.,
(c) 2010 Kevin Jardine,
(c) 2012 Simon Hengel
Homepage: http://haskell.org/haskellwiki/Hexpat/
Extra-Source-Files:
test/hexpat-tests.cabal,
test/test.xml,
test/suite/TestSuite.hs,
test/suite/Text/XML/Expat/Proc/Tests.hs,
test/suite/Text/XML/Expat/UnitTests.hs,
test/suite/Text/XML/Expat/Tests.hs,
test/suite/Text/XML/Expat/Cursor/Tests.hs,
test/suite/Text/XML/Expat/ParallelTest.hs,
test/suite/Text/XML/Expat/ParseFormat.hs,
test/thread-leak/build.sh,
test/thread-leak/callme.c,
test/thread-leak/cleak.c,
test/thread-leak/clean.sh,
test/thread-leak/thread-leak.hs,
test/hexpat-leak/instant-message.llsd,
test/hexpat-leak/Parse.hs,
test/hexpat-leak/run.sh,
test/hexpat-leak/build.sh
test/readRoads.hs,
test/ROADS.xml,
cbits/winconfig.h,
cbits/xmltok.h
cbits/winconfig.h
cbits/xmltok_ns.c
cbits/internal.h
cbits/utf8tab.h
cbits/siphash.h
cbits/latin1tab.h
cbits/xmltok.h
cbits/expat.h
cbits/xmltok.c
cbits/iasciitab.h
cbits/asciitab.h
cbits/README
cbits/xmlparse.c
cbits/xmltok_impl.h
cbits/xmltok_impl.c
cbits/xmlrole.c
cbits/xmlrole.h
cbits/expat_external.h
cbits/ascii.h
cbits/nametab.h
Build-Type: Simple
Stability: beta
source-repository head
type: git
location: https://github.com/the-real-blackh/hexpat
Flag bundle {
Description: Use bundled libexpat
Default: False
}
Library
Build-Depends:
base >= 3 && < 5,
bytestring,
transformers,
text >= 0.5.0.0 && < 1.3 || >= 2 && < 2.2,
utf8-string >= 0.3 && < 1.1,
deepseq >= 1.1.0.0 && < 1.5.0.0,
containers,
List >= 0.4.2 && < 0.7
Exposed-Modules:
Text.XML.Expat.Annotated,
Text.XML.Expat.Cursor,
Text.XML.Expat.Extended,
Text.XML.Expat.Format,
Text.XML.Expat.Proc,
Text.XML.Expat.SAX,
Text.XML.Expat.Tree,
Text.XML.Expat.Internal.DocumentClass,
Text.XML.Expat.Internal.IO,
Text.XML.Expat.Internal.Namespaced,
Text.XML.Expat.Internal.NodeClass,
Text.XML.Expat.Internal.Qualified
ghc-options: -Wall -fno-warn-name-shadowing
if flag(bundle) {
include-dirs: cbits
c-sources:
cbits/xmlparse.c,
cbits/xmlrole.c,
cbits/xmltok.c,
cbits/xmltok_impl.c,
cbits/xmltok_ns.c,
Text/XML/Expat/Internal/Glue.c
cc-options: -DHAVE_MEMMOVE -DXML_NS -DXML_DTD
}
else {
c-sources:
Text/XML/Expat/Internal/Glue.c
extra-libraries: expat
}
|