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 ...
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 ...
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 Σ....
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 ...
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 ...
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 ...
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 ...
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.
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
...
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 ...
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: ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
xml × 256java × 38
c# × 25
database × 24
json × 24
html × 19
design × 18
parsing × 15
xslt × 13
.net × 11
c++ × 10
php × 9
object-oriented × 8
javascript × 8
serialization × 8
schema × 7
programming-practices × 6
data-structures × 6
asp.net × 6
android × 6
data × 6
sql-server × 6
configuration × 6
xhtml × 6
database-design × 5