Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8102475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:15:06+00:00 2026-06-05T23:15:06+00:00

Does anyone know when XML should be used instead of JSON and why? Thanks

  • 0

Does anyone know when XML should be used instead of JSON and why?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T23:15:07+00:00Added an answer on June 5, 2026 at 11:15 pm

    XML – pros

    1. More strict – can be supplied along with Document Type Definition (DTD) which would allow you to analyze if provided XML data is syntactically correct
    2. Namespaces – can help to mix data from various resources (for instance you can use namespaces from Spring Core and Spring Security, which helps to read and understand markup)
    3. Can be navigated with XPath – helps to speed up looking for something deeply nested within markup
    4. Huge sets of data can be parsed via lightweight processor like SAX parser
    5. Used in some protocols (like SOAP) which could enforce using XML over JSON
    6. Longer around the block – some older libraries can/use
    7. Nice tools support (like native usage in Scala or IDE support)

    XML – cons

    1. Hard to read when it’s getting really big – harder to maintain
    2. Comes with an overhead from all unnecessary tags (like <some_long_tag_name>...</some_long_tag_name> ecountered x1000 times in one file) which can have huge impact on network bandwith and disk usage

    JSON – pros

    1. Easier to read by humans

    2. Native support in web browsers thanks to JavaScript

    JSON – cons

    1. Doesn’t contain type definition ("some_object" : "10" // String or Int?)

    2. Lack of some sort of DTD (how can you tell that “some_object” is required?)

    These are just major ones. Honestly one could write a book about it, so I don’t wonder whay are people downgrading this question… However I found appropriate to help you out a little.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how to merge two xml files in or two xmllist objects
Does anyone know of a clojure library to build sitemap.xml files? If no such
Possible Duplicate: Why XML-Serializable class need a parameterless constructor Does anyone know if it
Does anyone know of an app that would generate an xml file filled out
Does anyone have/make/sell an error tolerant XML reader for .NET? Yeah, I know, XML
Does any one know what is the exact usage of xmlns in HTML, XML
Does anyone know if there is a way to generate different code in the
Does anyone know of a free tool, similar to what is built into Visual
Does anyone know why UsernameExists wont return True. I must have my syntax messed
Does anyone know of a mechanism in Sybase ASA 9 / Sybase SQL Anywhere

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.