Closed jcornaz closed 4 years ago
Hi @jcornaz , thank you for raising this (the documentation should be clearer), but it also has an easy fix, i.e. setting the OverloadedStrings
language extension.
In GHCi, you can do it with the :set
macro
> :set -XOverloadedStrings
The decision to use ByteStrings was due I think to the fact that much XML is exchanged as payloads of HTTP responses, or parsed from file. Converting to Text or String in those settings incurs extra cost.
Hello,
If I run the example from the documentation:
parse "<p key='val' x=\"foo\" k=\"\"><a><hr/>hi</a><b>sup</b>hi</p>"
II get:
Obviously the documentation uses
String
where in factByteString
are required.Can you please update the documentation?
By the way, can you take the opportunity to document the rationale behind using
ByteString
rather thanText
? As far as I know XML documents are textuals, not binary.