Module documentation for 22.214.171.124
This package provides parsing and rendering functions for XML. It is based on the datatypes found in the xml-types package. This package is broken up into the following modules:
Text.XML: DOM-based parsing and rendering. This is the most commonly used module.
Text.XML.Cursor: A wrapper around
Text.XMLwhich allows bidirectional traversing of the DOM, similar to XPath. (Note: Text.XML.Cursor.Generic is the same concept, but will work with any node representation.)
Text.XML.Unresolved: A slight modification to
Text.XMLwhich does not require all entities to be resolved at parsing. The datatypes are slightly more complicated here, and therefore this module is only recommended when you need to deal directly with raw entities.
Text.XML.Stream.Parse: Streaming parser, including some streaming parser combinators.
Text.XML.Stream.Render: Streaming renderer.
- Remove deprecated functions (
ignoreContentnow cover entities
- Align behaviour of
- Use doctest to validate code examples from documentation
- Upgrade to conduit 1.3.0
ParseSettingsto specify how illegal characters references should be decoded
- Fix compatibility with GHC 8.4.1 #121
psDecodeEntitiesis no longer passed numeric character references (e.g.,
A) and the predefined XML entities (
<, etc). They are now handled by the parser. Both of these construct classes only have one spec-compliant interpretation and this behaviour must always be present, so it makes no sense to force user code to re-implement the parsing logic.
- In prior versions of xml-conduit, hexadecimal character references with a leading
&0x20;were accepted. This was not in compliance with the XML specification and it has been corrected.
- xml-conduit now rejects some (but not all) invalid-according-to-spec entities during parsing: specifically, entities with a leading
#that are not character references are no longer allowed and will be parse errors.
- Dropped the dependency on
data-default-class, reducing the transitive dependency load. For most users, this will not be a breaking change, but it does mean that importing
Text.XML.Conduitwill no longer bring various instances for
Defaultinto scope. This will break code that relies on those instances and does not otherwise see them. To fix this, import
data-defaultor one of the more specific instance-providing packages directly (e.g.,
- New render setting,
rsXMLDeclaration; setting it to
Falseomits the XML declaration.
tagfunction no longer throws an exception when attributes don’t match #93
many_combinator to avoid building results in memory #94
- Turn some functions from
Consumer Event m ato
ConduitM Event o m ato allow yielding values
takeAnyTreeContent, that only consumes one tree
NameMatchertype to refactor tag parsers
- Add a couple of
take*functions to stream events rather than parse them
ignore*functions to comply with naming convention
- Compatibility with blaze-markup-0.8.0.0 #95
- Parse XML encoding case-insensitively
- Remove extra EOL when printing XmlException
- Handle CDATA in takeAllTreesContent #88
- Improve XmlException definition and usage
- Add ‘takeAllTreesContent’ function
- Improvements for using xml-conduit for streaming XML protocols #85
- transformers dep bump
- Remove unneeded ImpredicativeTypes
- Support for iso-8859-1 #63
- Add functions to ignore subtrees & result-streaming (yield) parsers #58
- Drop system-filepath
- Reuse ‘MonadThrow’ and ‘force’ for ‘AttrParser’ #52
- Added helper functions to render XML elements #48
- ‘parseText’ becomes ‘parseText’/‘parseTextPos’, depending on the output type #47
- Allow blaze-builder 0.4
- Doc fix #44
Support monad-control 1.0