What is the main purpose of using XML on web pages?

What is the main purpose of using XML on web pages?

+4
source share
4 answers

XML, an extensible markup language, is a markup language designed to provide great flexibility in markup and the transfer of arbitrary data. On the Internet, XML is commonly used to transport data through pipes, API calls, and the like. XML is also often used for configuration files for web frameworks such as Spring.

+2
source

Well, XML and its related technologies have several advantages / benefits:

Plain XML itself is simply a text format for storing data. A well-formed XML specification criterion basically ensures that an XML document can always be parsed correctly. The XML document tag structure simplifies the analysis and access to content, and if you are interested in the semantic network, the search for meaning in the data is simplified. XML (or markup languages โ€‹โ€‹derived from it) is used quite a lot in data transfer, since it is an intermediate, platform-independent format.

An XML schema can be used to force the implementation of a specific structure and form in an XML document and, therefore, can be used to create custom markup languages.

XSL (or XML style sheets) can be used to create output from any XML document that references a style sheet, so when someone loads an XML file in their browser, it will display as XHTML or PDF or something else what you say is to.

+2
source

XHTML itself is XML, but I think this is not what you are asking for.

XML can be used to store data in a readable plain text format.

See the w3schools XML tutorial about XML for more details.

+1
source

XML - by name - extensible . Thus, in fact, this does not have a main goal. Perhaps you should take a look at Wikipedia List of XML Markup Languages ? Or the w3c XML Recommendation , which provides the following design goals for XML:

  • XML should be easily accessible over the Internet.
  • XML must support a wide range of applications.
  • XML must be compatible with SGML.
  • Easily write programs that process XML documents.
  • The number of additional functions in XML should be kept to an absolute minimum, ideally zero.
  • XML documents should be clear and understandable to humans.
  • XML design needs to be prepared quickly.
  • XML design should be formal and concise.
  • XML documents should be easy to create.
  • Sobriety in XML markup is minimal.
+1
source

Source: https://habr.com/ru/post/1309920/


All Articles