68
Aiei
5y

People bashing JS and PHP while I wonder why XML still exist.

Comments
  • 12
    JSON > XML
  • 6
    XML is just JSON predecessor ¯\_( ツ)_/¯
  • 11
    Because companies won’t kill SOAP 😬
  • 14
    There are many things that can't be done with JSON but easily with XML. Haven't used those things yet.
  • 4
    XML lays the foundation for HTML...
  • 13
    Maybe we should suggest that html6 should rely on json 🤔
  • 3
    As my teacher once said: to learn HTML5 you need to learn HTML4.*
    Following that logic everyone should first learn XML
  • 7
    Ask any Android dev :P
  • 2
    @py2js exactly, people just bash xml, or write that json is better, without even know... Like everything depends on the scenario
  • 0
    I hate SOAP. Only had the displeasure of interacting with it about 2 or 3 times in the last 9 years and I dread ever having to again. It keeps me up at night. Lol
  • 1
    @C0D4 Your telling me, someone just created a new API and it was all in SOAP....
  • 1
    @gpn273 🤢whhhhhyyyuyyuyyyyyyy!!!!!!!!
  • 1
    @C0D4 Currently at protest to use it! I think the developers only know SOAP and aren't willing to use REST and JSON.
  • 4
    @C0D4 it's ironic that it is called SOAP when it is the filthiest thing in the world.
  • 0
    Because history repeats itself?

    Look at LISP. It started as a practical mathematical notation for computer programs, influenced by the notation of Alonzo Church's lambda calculus. ^1

    In other words a formal language to express stuff. XML is a formal language to express stuff.

    ^1 https://en.wikipedia.org/wiki/...
  • 5
    Json is not ideal cause:

    - no multiline strings

    - lack of comments

    - lack of official scheme validation (json-scheme is independent, W3C guards both xml and xsd)

    - has to use double quotes which are problematic to integrate with other languages which also use them (bash for example)

    - items in objects are unordered which can cause problems when you re-generate on same data and suddenly diff is so much bigger as it should be. It was not designed for people to use directly.

    - no XPath search (also made officially by W3C)

    - value of object is one of 'value', 'text', 'name', 'title' or any other freely chosen by developer. XML always uses just "value"
  • 0
    @alkuzad What's that last thing? What do you mean that the value is one of ...?
  • 1
    @alkuzad just don't tell to the json experts here, they think that json is better than xml for everything because is newer
  • 1
    @ScriptCoded json uses object with key-value assignment. XML uses tags which have both key value assignments (called tag parameters) and value (HTML example: anchor text is value and destination is src tag param).
  • 2
    @dontbeevil dont tell them they can use newer yaml and use old json inside ;p
  • 0
  • 0
    Because even if you stop using it, the concept will not disapear from existance, therefore it cannot "not exist anymore"
  • 3
    Another thing is that XML is trivial to parse, JSON isn't. Trivial XML parser can be written in bash with few lines of code. More advanced tools provide full SAX/StAX streaming and...
    There is a universal way to represent XML as in-memory object (DOM), for json, it isn't.
Add Comment