When parsing an <img> element with a corresponding closing tag </img> the parser thinks there was no opening tag for the closing tag. This means to elements get generated as shown below.
*Text.XML.HXT.Core λ> let doc = readString [withParseHTML yes, withRemoveWS yes, withWarnings yes] "<img src=\"some/url\" alt=\"alt\"></img>"
*Text.XML.HXT.Core λ> children <- runX $ doc >>> getChildren
warning: ""<img src=\"some/url\" alt=\"alt\"></img>"" (line 1, column 36) no opening tag found for </img>
*Text.XML.HXT.Core λ> children
[NTree (XTag "img" [NTree (XAttr "src") [NTree (XText "some/url") []],NTree (XAttr "alt") [NTree (XText "alt") []]]) [],NTree (XTag "img" []) []]
When parsing an
<img>
element with a corresponding closing tag</img>
the parser thinks there was no opening tag for the closing tag. This means to elements get generated as shown below.I'm using hxt 9.3.1.16