Click here to Skip to main content
15,895,777 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Why is XML? Pin
Mycroft Holmes12-Jan-21 11:51
professionalMycroft Holmes12-Jan-21 11:51 
JokeRe: Why is XML? Pin
Daniel Pfeffer12-Jan-21 21:08
professionalDaniel Pfeffer12-Jan-21 21:08 
GeneralRe: Why is XML? Pin
hevisko12-Jan-21 19:53
hevisko12-Jan-21 19:53 
GeneralRe: Why is XML? PinPopular
Member 1036240612-Jan-21 19:56
Member 1036240612-Jan-21 19:56 
GeneralRe: Why is XML? Pin
Chris Maunder13-Jan-21 3:41
cofounderChris Maunder13-Jan-21 3:41 
GeneralRe: Why is XML? Pin
Sr_Dogmeat13-Jan-21 5:07
professionalSr_Dogmeat13-Jan-21 5:07 
GeneralRe: Why is XML? Pin
UsernamesAreHard12-Jan-21 19:57
UsernamesAreHard12-Jan-21 19:57 
GeneralRe: Why is XML? Pin
Member 1495125812-Jan-21 20:26
Member 1495125812-Jan-21 20:26 
I have been using XML for data transmission and for data specification since 2000. What I like most of XML and XSD is that I can define several namespaces for different fields, this way, whenever I get a tag (e.g. <price>), it has implicity the scope of such tag, there are no doubt whether the <price> belongs to a scope or to another because it comes with its namespace (e.g. <price> can be "books" or "pencils"). If you define good XSD files, the XML will be parsed and be XSD-compliant with any language (C#, Java, Python...), serializing the XML documents into objects and viceversa.

[There are other great things of XML that I really like, but it is not the aim of this discussion.]

When I have to deal with personal data or some data regarding "money" (bills, business, purchases...) I always use XSD because I want to map the correct data into the correct field. For other, not sensible, data I use JSON.

Important note: Beware of namespaces, the most common error when parsing is when namespaces are in-lined. Some XML are produced badly and the receiver launches weird errors that make developers eventually hate XML. I think that it can be the reason for your intolerance this morning Laugh | :laugh:

For data transmission, if the bandwidth is a problem, you can use EXI (Efficient XML Interchange (EXI) Format 1.0 (Second Edition)), which is better than compressing (gzip) JSON. But make sure that sender and receiver can manage EXI.

To sum up, JSON is very easy, but I still prefer XML/XSD for important data or data that must be signed, verified or checked.
GeneralRe: Why is XML? Pin
xlg12-Jan-21 20:39
xlg12-Jan-21 20:39 
GeneralRe: Why is XML? Pin
Kiriander12-Jan-21 21:05
Kiriander12-Jan-21 21:05 
GeneralRe: Why is XML? Pin
Mathieu Cartoixa12-Jan-21 21:26
Mathieu Cartoixa12-Jan-21 21:26 
GeneralRe: Why is XML? Pin
LesCooper12-Jan-21 21:38
LesCooper12-Jan-21 21:38 
GeneralRe: Why is XML? Pin
Steve Naidamast13-Jan-21 4:45
professionalSteve Naidamast13-Jan-21 4:45 
GeneralRe: Why is XML? Pin
Joseph T. Adams13-Jan-21 5:04
Joseph T. Adams13-Jan-21 5:04 
GeneralRe: Why is XML? Pin
Steve Naidamast13-Jan-21 5:26
professionalSteve Naidamast13-Jan-21 5:26 
GeneralRe: Why is XML? Pin
Joseph T. Adams13-Jan-21 5:31
Joseph T. Adams13-Jan-21 5:31 
GeneralRe: Why is XML? Pin
Sr_Dogmeat13-Jan-21 4:50
professionalSr_Dogmeat13-Jan-21 4:50 
GeneralRe: Why is XML? Pin
dandy7213-Jan-21 5:11
dandy7213-Jan-21 5:11 
GeneralRe: Why is XML? Pin
Chris Maunder13-Jan-21 6:16
cofounderChris Maunder13-Jan-21 6:16 
GeneralRe: Why is XML? Pin
dandy7213-Jan-21 8:38
dandy7213-Jan-21 8:38 
GeneralRe: Why is XML? Pin
davercadman13-Jan-21 5:19
davercadman13-Jan-21 5:19 
GeneralMy Professor Said Pin
michaelbarb13-Jan-21 5:30
michaelbarb13-Jan-21 5:30 
GeneralRe: My Professor Said Pin
Chris Maunder13-Jan-21 6:15
cofounderChris Maunder13-Jan-21 6:15 
GeneralRe: My Professor Said Pin
dandy7213-Jan-21 8:52
dandy7213-Jan-21 8:52 
GeneralRe: My Professor Said Pin
michaelbarb13-Jan-21 10:09
michaelbarb13-Jan-21 10:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.