How to use XML and YAML

Source: Internet
Author: User
What is YAML? What are its advantages and disadvantages over XML? Under what circumstances will YAML be used? How to use YAML? Here is a simple summary. Recently, I have processed some configuration files and encountered files in YAML format. because I have never touched files in this format before, I am still familiar with XML. So what is YAML? What are its advantages and disadvantages over XML? Under what circumstances will YAML be used? How to use YAML? Here is a simple summary. Let's start with XML.

I believe that XML is well known. The following are some conceptual things I have extracted from the internet. you can take a look at them. I will not talk about it here. More basic usage.
XML Overview:
Extensible Markup Language (XML) is used to mark electronic files so that they have a structured Markup Language. it can be used to mark data and define data types, is a source language that allows you to define your own markup language. XML is a subset of the standard general Markup Language (SGML) and is suitable for Web transmission. XML provides a unified way to describe and exchange structured data independent of applications or vendors.
Format features:
Different from databases such as Access, Oracle, and SQL Server, XML provides powerful data storage and analysis capabilities, such as data indexing, sorting, searching, and consistency, XML only stores data. In fact, the biggest difference between XML and other data forms is that it is extremely simple, which seems a little small, but it makes XML different.
The difference between XML and HTML is that XML is designed to transmit and store data, and its focus is on data content. HTML is designed to display data, with focus on the appearance of data. HTML is designed to display information, while XML is designed to transmit information.
Differences between XML and HTML syntax: not all HTML tags need to appear in pairs. XML requires that all tags must appear in pairs. HTML tags are case-insensitive and XML is sensitive to size, it is case sensitive.
Read/write:
I am familiar with XML reading and writing in two ways. one is to obtain XML values through JavaScript, and the other is to read XML values using PHP. For the compilation of XML, you can refer to the manual. the XML format is relatively free and you can customize tags. However, there is a principle that it should be intuitive. The following examples are provided for testing. if you have any questions, you can contact us.

Note. xml

 
   
  
   John
    
  
   George
    
  
   Don't forget the meeting!
  
 

Xml_test.html
JavaScript

  

To:
From:
Message:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.