Closed sportograf closed 6 years ago
Sorry, for the late reply. I don't get notify when an issue open. Thanks for reporting! I'll look over it this weekend.
Sorry, I looked it over the weekend, but realized it's not an easy fix. I will try again this weekend.
I also run on this bug, it crashes when processing an XML like this:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>/</loc>
</url>
<url>
<loc>/faqs</loc>
</url>
<url>
<loc>/about</loc>
</url>
<!--
<url>
<loc>/commented-out-should-not-be-included</loc>
</url>
-->
</urlset>
Same error as above, posting this so we have more examples.
I've replaced Quinn by Friendly (XML parser on top of Floki) and it works fine for the example in my comment above.
@sportograf I updated to 1.0.1. It is ignoring the comments for now. I have to figure out how to handle comments in the future. Sorry for the trouble. Lolz I have to agree with @jaimeiniesta I would choose another library, maybe Floki itself. I'm just not on top of these things, so if what you need is time sensitive, I would use another library.
@jaimeiniesta thanks for sample xml and the link to Friendly. Sorry for the trouble.
Hey @nhu313 thanks for that! Not saying that Friendly is better than Quinn, it just works fine for my use case and didn't crash with comments :)
@jaimeiniesta no problem. I totally understand. If I have to choose a library, I would definitely choose one that works too 😆 and definitely one with a maintainer that is quick with bug fixes 😄
I'm leaving this open until I fix the comments thing.
Added the code to parse comments in pr #9 . thank you for reporting the issue @sportograf. Have a great week!
Hi,
first thanks for this cool engine. I've tried the following and it crashes
Quinn.parse("<head><title short_name = \"yah\">Yahoo</title><title:content>Bing</title:content><!-- foo --></head>"
with:
thanks guido