Do you know XML? What is it used for?

王林
Release: 2019-08-26 13:25:08
forward
5962 people have browsed it

What is

?

XML,Extensible Markup Language, extensible markup language. The suffix of the file is: .xml. Just like HTML is for displaying data, XML is for transmitting and storing data.

It is said that java is a professional language for operating XML.

What is it used for?

In order to facilitate data sharing and communication between different applications and different platforms.

Do you know XML? What is it used for?

The specific functions are:

(1) It can be used as a simple database to store and retrieve data;

( 2) Transmit files in the agreed format;

(3) Make software configuration files. [Configuration file: a file that saves software settings]

XML’s older brother——HTML

Do you know XML? What is it used for?

XML was born to improve the flaws and limitations of HTML.

The differences in usage are as follows:

Do you know XML? What is it used for?

XML’s best friend——JSON

JSON,Javascript Object Notation, js object notation. The function is also to store and exchange text information.

Comparison of the two: JSON is smaller, faster, easier to parse, so, and more popular than XML.

The scope of both: JSON is suitable for simple value transfer, and XML is suitable for a wider range.

XML data structure - tree structure

Do you know XML? What is it used for?

How it is implemented specifically, readers can refer to the code in the example below to understand at a glance.

It is worth noting that just like a book has only one root, XML can only have one root element.

Mind Map

Do you know XML? What is it used for?

##ExampleCode in the

.xml file:

  liuwei8809@163.com 
hellokitty@163.com
about loving I love you forever! 2008-11-12
Copy after login

Code in the .xsd file:

             
Copy after login

Achieved effect:

Do you know XML? What is it used for?

For more related questions, please visit the PHP Chinese website:XML Video Tutorial

The above is the detailed content of Do you know XML? What is it used for?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
xml
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!