chapter 3: XML be Used

How can XML actually be used in the real world?

I will explain it like we are sitting together and I’m showing you different real-life situations where XML appears, why people chose it, what it’s doing there, and how it behaves in each case.

We’ll go through practical usage scenarios with examples, real names of formats/systems, and honest pros/cons.

1. Configuration Files (Very Common Use)

Where you see it: Many programs, servers, tools, IDEs, frameworks, build systems, etc. store their settings in XML.

Why XML?

  • Human readable & editable
  • Hierarchical structure fits configuration very well
  • Many programming languages have excellent built-in XML parsers
  • Comments are supported → very useful in config files

Real examples you have probably seen:

XML
XML

Other common places:

  • Maven pom.xml
  • Gradle (older versions used XML)
  • Spring applicationContext.xml / dispatcher-servlet.xml
  • Hibernate hibernate.cfg.xml
  • Android AndroidManifest.xml
  • Java EE / Jakarta EE deployment descriptors (web.xml, ejb-jar.xml, etc.)

2. Data Exchange Between Different Systems (Classic XML Strength)

Main idea: Two companies / departments / applications written in completely different technologies need to send structured data to each other.

Very common real cases:

  • Bank ↔ Company (salary payments, invoices)
  • Government systems ↔ Businesses (GST returns, e-invoicing in India)
  • ERP system ↔ Accounting software
  • Hospital management system ↔ Lab system
  • Supplier ↔ Retailer (purchase orders, delivery notes)

Real Indian example – e-Invoicing (very widely used since 2020–2021)

The Indian government (GSTN) defined very strict XML schema for electronic invoices.

XML

(Notice the namespaces – cbc:, cac: → this is UBL – Universal Business Language standard)

3. Industry & Domain-Specific Standards (Huge XML Usage Area)

Many industries created very detailed XML standards that are still alive in 2025–2026.

Domain Important XML formats / standards Still widely used?
Finance FIXML, FpML, ISO 20022 (parts), XBRL Yes
Healthcare HL7 CDA, FHIR (XML version), DICOM SR Very much
Publishing / Books DocBook, DITA, EPUB (older versions), JATS Yes
Government / Legal NIEM (US), UBL, e-CODEX, many national e-Gov formats Very strong
Office Documents Microsoft Office Open XML (.docx, .xlsx, .pptx are ZIP + XML) Everywhere
Vector Graphics SVG (Scalable Vector Graphics) Very strong
Syndication / News RSS 2.0, Atom 1.0 Still used
Web Services (older) SOAP + WSDL + XML payloads Declining but alive

Example – very small RSS feed (still used by many blogs, news sites, podcasts)

XML

4. File Formats That Are Actually XML Under the Hood

Many files you use every day are XML inside:

File type What it really is You can open with text editor and see XML
.docx ZIP file containing many XML files Yes
.xlsx ZIP + XML (spreadsheetML) Yes
.pptx ZIP + XML Yes
.odt, .ods OpenDocument format (very XML-heavy) Yes
.svg Pure XML Yes
.drawio / .dio diagrams.net draw.io files Yes
.ui (Qt) Qt Designer UI files Yes

5. When XML is Still Chosen Over JSON (2025–2026 reality)

People still pick XML instead of JSON when:

  • Need very strict validation (XSD schema)
  • Need namespaces (multiple vocabularies in one document)
  • Industry/government mandates XML (e-invoice, HL7, UBL, ISO 20022…)
  • Need comments inside the data file
  • Need mixed content (text + tags mixed – common in publishing)
  • Dealing with very old systems that only understand XML
  • Processing very large documents with streaming parsers (StAX, SAX)

JSON is usually simpler and more compact — but XML is better when strict rules, namespaces, or legacy systems are involved.

Quick Summary – Where You Will Most Likely Meet XML Today

  1. Configuration files (Maven, Spring, Tomcat, Android manifest…)
  2. Enterprise data exchange (invoices, orders, GST e-invoice, banking)
  3. Industry standards (healthcare HL7, finance ISO 20022, publishing DocBook/DITA)
  4. Office documents (.docx, .xlsx, .pptx are secretly XML)
  5. Legacy SOAP web services (many banks, governments, insurance still use them)
  6. SVG graphics, RSS/Atom feeds, some configuration formats

Would you like to go deeper into any of these real usage areas?

  • How real e-invoicing XML looks in India (with full example)
  • What namespaces really do and why they matter
  • Difference between XML used in config vs XML used in data exchange
  • How companies validate XML (XSD, Schematron)
  • SOAP vs REST – why SOAP is XML-heavy
  • Modern alternatives and when people moved away from XML

Just tell me which direction interests you most! 😊

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *