2 ms·
> never implement something yourself if you can take on another useless dependency instead. So...your argument is that XML parsing/decoding is useless/too easy
by paulddraper 6y ago
> never implement something yourself if you can take on another useless dependency instead.
So...your argument is that XML parsing/decoding is useless/too easy and every project should reimplement an XML parser/decoder?
If so, I have 0% trust in your judgement.
- ninkendo 6y agoThey're not doing arbitrary parsing, they just need the ability to un-escape XML characters for a particular case. I'd be shocked if (after all the abstraction) the `he` library didn't just have a single function which does that. I'd prefer just seeing how `he` does it and implementing it myself. Moreover, they're already using a `fast-xml-parser` for doing XML parsing. Presumably it doesn't have an unescape function, so they're taking on a dependency on another XML parser (and keeping the old one!) just to get the one function.
- paulddraper 6y agohe is for HTML(/XML) encoding. It's kinda dumb that fast-xml-parser doesn't full parse the XML and leave content+attribute values in raw forms. The docs for fast-xml-parser show how to combine it and he. Had they done that, they wouldn't have this bug that completely breaks the SQS client for me.