ocramz / xeno

Fast Haskell XML parser
Other
120 stars 33 forks source link

Add support for parsing names and attributes in namespaces. #3

Closed Rembane closed 7 years ago

Rembane commented 7 years ago

I need namespace support when I'm parsing xml files. This pull request adds it.

The term support is maybe a too strong word in this context, the program doesn't actually handle namespaces, they are just funny names with colons in them, on the other hand the parser doesn't crash if it encounters a colon in an attribute or name.

Rembane commented 7 years ago

I added measurements, and weirdly enough the parsing is faster with namespace support than without, so I guess this change doesn't introduce too many regressions.

Rembane commented 7 years ago

I added a test, I hope I didn't mess up the structure of the test code too much. Does it look good or should I move around stuff a bit?

chrisdone commented 7 years ago

Looks good to me! Thanks for the measurements. If there was a speed change, it's barely noticeable in the data.