As of May 31, 2023, we have updated our Code of Conduct.

Hot answers tagged

245 votes
Accepted

Why is XML called a "language" exactly?

The real answer is XML has an L in the name because a guy named Raymond Lorie was among the designers of the first "markup language" at IBM in the 1970'ies. The developers had to find a name for the ...
JacquesB's user avatar
  • 56.8k
180 votes

Why is XML called a "language" exactly?

Because it is a language. A markup language, not a programming language. Notice that natural human languages like English and Spanish don't "do" anything either. In fact, technically C++ and Java and ...
Ixrec's user avatar
  • 27.6k
103 votes

Why is XML called a "language" exactly?

Let Σ be a non-empty, finite set of symbols, called an alphabet. Then Σ* is the countable infinite set of finite words that can be formed by concatenating zero or more symbols from Σ....
5gon12eder's user avatar
  • 6,936
36 votes
Accepted

Why is XML type safe?

Because of the XML Schema Definition (XSD). With XML, you can have an additional file which describes the schema. It indicates, for example, that the element /a/b is an array and contains from 1 to ...
Arseni Mourzenko's user avatar
31 votes

Why is XML called a "language" exactly?

In computer science, formal language is just a set of strings, usually infinite and often described using rules (two common versions of those rules are regular expressions and formal grammars). Note ...
svick's user avatar
  • 9,979
20 votes

Why is XML type safe?

XML can be type safe, since it it possible with XSD schemas to declare the data type of elements. A document validated against a XSD schema is guaranteed to conform to the expected types. But a XML ...
JacquesB's user avatar
  • 56.8k
15 votes
Accepted

What are advantages of XML over S-expressions(-ish) notation?

We know the designers of XML were familiar with S-expressions, since XML is based on SGML, and SGML has a style sheet language, DSSSL, which uses S-expression syntax (and scheme as embedded scripting ...
JacquesB's user avatar
  • 56.8k
12 votes

Why is XML called a "language" exactly?

A language is a method of conveying information. A programming language is a method of conveying algorithms. A markup language like XML is a language for conveying data.
Philipp's user avatar
  • 23.1k
11 votes

Why use XML in Android?

Its because its simpler - tools can be written to manipulate a XML document far easier than understand java code, so the layout can be created and modified by a simple tool that does not need to also ...
gbjbaanb's user avatar
  • 48.3k
11 votes

How to parse XML files too big to fit in memory

Streaming API (such as SAX see https://docs.oracle.com/javase/tutorial/jaxp/sax/) vs DOM api's. Former one process tags as they occur, while the latter represents the entire DOM model in memory. See ...
YoYo's user avatar
  • 576
10 votes

Differences between XML and JSON for data exchange

XML and JSON are both capable of transmitting the same data, but which is better depends mostly on what you want to do with it. This does touch on existing tooling, but you're not likely to be hand ...
Morgen's user avatar
  • 1,071
10 votes

What are advantages of XML over S-expressions(-ish) notation?

Personally, I think the best part about XML is the well-defined schema capabilities, rather than its syntax. The schema mechanism allows users to publish their document format to share what they ...
Erik Eidt's user avatar
  • 33k
9 votes
Accepted

Should I have a separate XML settings file for my application?

Most likely, you want a separate file. App.config is for application configuration, whereas what you are specifying is data. Your data store could eventually become a database or json, or whatever ...
Magus's user avatar
  • 545
9 votes
Accepted

Large file / data transfer in a Microservice Architecture

Does anyone know how the rainbow unicorns (Netflix, Amazon, Google, etc.) handle large files / data exchange between their services? Unfortunately I do not know how they deal with such problems. The ...
Thomas Junk's user avatar
  • 9,367
8 votes
Accepted

How do I deal with the following technical issue?

1) Where your manager is right Your manager wants a flexible architecture. To accomplish this, you have to design our code, that it is easily composed of pluggable components. What according to ...
Thomas Junk's user avatar
  • 9,367
8 votes
Accepted

Writing a valid test case for validating XMLs

To validate an XML file, you first need an XML Schema Definition (XSD) that describes the structure of a valid XML document. You can find the specification for XSD files at W3C. Going into how to ...
Adam Zuckerman's user avatar
7 votes

What is the best data model to represent mathematical range (in database, xml, json...)?

If you're working solely with integer ranges, you're probably over-thinking the problem. All you need to store is the lower bound and the upper bound, and use a fixed rule about whether the bounds are ...
Jonathan Eunice's user avatar
7 votes

Differences between XML and JSON for data exchange

XML is an eXtensible Markup Language. That's important to understand: It's designed to be essentially like HTML--a document markup language--but a bit more formalized. Problem is, document markup ...
Mason Wheeler's user avatar
7 votes
Accepted

How do different file types generally store data?

The reason there are many different file formats is that there are many different goals for the way data is formatted. Some of these are in opposition to each other and some are orthogonal to each ...
JimmyJames's user avatar
  • 24.9k
6 votes

Transforming XML to JSON in C++

From the comments... if everything else you have is C++ then the best answer is to write it in C++, building a mish-mash of different bits of programming languages is a right PitA to maintain and ...
gbjbaanb's user avatar
  • 48.3k
6 votes
Accepted

Why do we need namespaces when making XML serialization?

Simple answer: you don't. If you're serializing data as XML then you have to agree the details of the XML vocabulary with the consumers of the data. Perhaps you define it yourself, perhaps your ...
Michael Kay's user avatar
  • 3,360
6 votes

In what way is an XML database different from (is not specialization of) a graph database?

The terms XML database and graph database describe the use cases of each kind of database. The XML database is intended to store and search XML documents. Graph databases is intended to represent a ...
Samuel's user avatar
  • 9,107
6 votes

Why not program our video text terminals/terminal emulators to use something JSON or XML on the backend instead of ANSI escape sequences?

Your question is sort of like saying assembly is difficult to work with, so computers should use higher level languages instead. The ANSI format is the right level of abstraction for working with ...
Karl Bielefeldt's user avatar
5 votes
Accepted

Reading Element Names vs Reading Element Attributes: Speed

In the first case, you'll have to either create a lookup or to loop through the tags to find a specific tag. In the second case, .NET Framework does that for you when processing the XML file. For ...
Arseni Mourzenko's user avatar
5 votes

Differences between XML and JSON for data exchange

It's a bit of apples and Oranges. They are both used for the same task yes, but they are distinctively different. XML is Extensible Markup Language. The main benefit of it is that it can cary meta ...
JackLeo's user avatar
  • 1,977
5 votes

Would you use Byte Arrays or XML if size was not an issue?

It is certainly possible that the JPEG and PNG people might have used XML-based headers if file size were not an issue. Using text would make it more obvious what all the fields mean and so forth. ...
Nicol Bolas's user avatar
  • 11.8k
5 votes

How to handle custom metadata in XML?

Besides the fact it is a very bad idea to parse XML by regular expressions, I try to answer your questions: Was XML designed to handle custom metadata? XML is designed to handle all kind of data ...
Doc Brown's user avatar
  • 196k
5 votes
Accepted

When to use 'nillable' in XML schemas

nillable is in the spec because the XML Schema WG had a number of members who saw the world in SQL terms and wanted an explicit equivalent to SQL's null values. It's totally unnecessary in my view: ...
Michael Kay's user avatar
  • 3,360
5 votes
Accepted

How to maintain XML/JSON serialization tests?

Tests of the kind you describe are brittle. As you've correctly pointed out, small changes are likely to break a significant number of the existing tests. But that is by design; tests like these are ...
Robert Harvey's user avatar
4 votes

Large file / data transfer in a Microservice Architecture

If the ID returned by your document store is the way to reference documents throughout the system, then it makes sense for all services to accept that 'Document ID' on their API when the service needs ...
Bart van Ingen Schenau's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible