cloocher / xmlhasher

Fast XML to Ruby Hash converter
MIT License
40 stars 20 forks source link

CDATA parsing as nil #4

Closed JonMidhir closed 5 years ago

JonMidhir commented 7 years ago

When I do this

XmlHasher.parse("<title><![CDATA[Midhir uploaded a photo.]]></title>")

I get this:

{:title=>nil} 

Is this expected behaviour or a quirk of parsing CDATA? Removing the CDATA gives me the correct result:

XmlHasher.parse("<title>Midhir uploaded a photo.</title>")
 => {:title=>"Midhir uploaded a photo."} 

Perhaps it's a quirk of Ox rather than XmlHasher. I can look into it in enough time but just wondering if it's a known issue.

cloocher commented 5 years ago

merged your pull request with CDATA parsing