ocramz / xeno

Fast Haskell XML parser
Other
120 stars 33 forks source link

`validate` accepts un-paired tags #14

Closed ocramz closed 6 years ago

ocramz commented 6 years ago
λ> isRight $ Text.XML.Hexml.parse "<b>"
False
λ> Xeno.SAX.validate "<b>"
True
chrisdone commented 6 years ago

That's a SAX parser, so it doesn't look at hierarchy, it only validates lexical correctness.

<b> is valid, but e.g. <b would not validate.

Try the DOM module.

qrilka commented 6 years ago

So I guess it's worth a note in haddocks