5 ms·
Part of me is with you. But even in established languages I've had trouble finding an appropriate xml parser and had to tweak them way more than I thought nece
by pfranz 9y ago
Part of me is with you. But even in established languages I've had trouble finding an appropriate xml parser and had to tweak them way more than I thought necessary. I haven't (yet) had that problem with JSON.
I think with something like feeds there's the possible benefit of becoming a 'hello world' for frameworks. Many frameworks have you write a simple blogging engine or twitter copycat. I don't think I've ever seen that for a feed reader/publisher. People have said that Twitter clients were an interesting playground for new UI concepts and paradigms because the basics were so simple (back when their API keys were less restrictive). Maybe this could be that?
- deleted 9y ago[deleted]
- mindcrime 9y agoBut even in established languages I've had trouble finding an appropriate xml parser and had to tweak them way more than I thought necessary. I haven't (yet) had that problem with JSON. Maybe it's just that I work mostly with JVM languages (Java, Groovy, etc.) but I haven't had any problems with handling XML - including Atom - in years. But I admit that other platforms might not have the same degree of support.
- pfranz 9y agoMost of my experience is from Python. Each time I use it I have to look at the docs for etree (a library that ships with Python). We would hit performance and feature support issues with etree and tried lxml but had binary compatibility issues between our environments. The Hitchhiker's Guide to Python[1] (a popular reference for Python) recommends untangle[2] and xmltodict[3], neither of which I've used. I feel like in other languages I've used had similar brittleness when dealing with xml. I might be biased because working with xml in an editor it's difficult to validate visually or grok in general when used in practice. [1] http://python-guide-pt-br.readthedocs.io/en/latest/scenarios/xml/ http://python-guide-pt-br.readthedocs.io/en/latest/scenarios... [2] https://untangle.readthedocs.io/en/latest/ https://untangle.readthedocs.io/en/latest/ [3] https://github.com/martinblech/xmltodict https://github.com/martinblech/xmltodict
- abritinthebay 9y ago> Maybe it's just that I work mostly with JVM languages (Java, Groovy, etc.) but I haven't had any problems with handling XML Yeah, no surprise. XML may as well be a native data-type in most core JVM languages. It's not the case everywhere else however.
- dabeeeenster 9y agoWhat language are you using that doesn't have a working XML parser? REALLY?
- mattmanser 9y agoHe said appropriate XML parser. All languages have XML parsers, it's more that a lot suck, they might have weird concepts you have to use, or are constantly tripping you up with namespaces, or make it really hard to write xpath queries.
- josteink 9y ago> or are constantly tripping you up with namespaces You mean requires that you understand the XML format you are working with? Oh noes! Namespaces exist, just about everywhere in the world of programming, and they do so for a reason. <bar /> is not the same as <foo:bar /> just like http://bar.com http://bar.com is not the same as http://bar.foo.com http://bar.foo.com. If that's putting the bar high, I really think I may be suffering a huge disconnect from the rest of my peers in terms of expected capabilities. Just because JSON doesn't have namespacing-capabilities at all, doesn't make it a worthless feature. It's actually what gives you the eXtensibility in XML. As a developer I expect you to understand that. (And I wonder how long time it will take before the JS-world re-implements this XML-wheel, while again doing so with a worse implementation)
- jancsika 9y ago> (And I wonder how long time it will take before the JS-world re-implements this XML-wheel, while again doing so with a worse implementation) I'm going to guess never. I'm also going to guess that there isn't a single flamewar in the entire history of JSON where someone was trying to figure out how to implement anything close to XML namespaces in JSON. And by "close", I mean something that would require changes to JSON parsers and/or downstream APIs to accommodate potentially bipartite keys.
- josteink 9y ago