Quick Start tutorial on XML

Source: Internet
Author: User
"XML those things..." & amp; gt; follow "I" to learn XML... By: 0x584ADate: What is Chapter 1 XML in September 25, 2015? Quick start to XML 1. what is XML? First let's look at a piece of code XML (Extensible Markup Language) & amp; lt ;? Xmlversion & quot; 1. 0... what is Chapter 1 XML? Quick start to XML 1. what is XML? First, let's look at a piece of code.

XML(Extensible Markup Language)

     
     
     
     
     
 ]>
     
          
   
    
0x584A
           
   September 25, 2015 10:24:41        
   
    
Holle, world!
           
           
   <XML的那些事...> -> 跟随0x584A、学习XML..     
  
 

Let's take a look at the specific display effect after the browser is running:

The earliestHTMLAfter the popularity,W3CBecause HTML language is too limited to be organized, XML is introduced for the purposeReplacing HTML language.

Of course, it seems that the W3C plan is not successful.(However, OSS)

AlthoughXMLNot replacedHTMLHowever, its unique features extend to the present.

Advantages: 1. highly custom [Tags] 2. data flow standards in different languages 3. XML is used to describe data. In HTML, data is written in HTML tags. 4. XML is designed to describe data: What is data and how to store data. While HTML is used to display data: the focus is on how to display data and how to better display data.

XML:XML is a cross-platform tool that is independent of software and hardware and processes information (data operations and data transmission tools)

Come and share a joke:

Q: When should I use XML?

A: You can write XML in your resume ..

3. Quick Start XML

Based on the previous code, let's analyze it step by step.

 

The first statement is to declare that the XML version is1.0, UseUTF-8Character set.

The subsequent code is used for DTD constraints.

     
     
     
     
     
     
     
     
 ]>

Then someone asked:

What is DTD?

Let's look at the W3C explanation:

Document Type Definition (DTD) can define valid XML document building modules. It uses a series of legal elements to define the structure of a document.

Amount ..(In fact, it's just an asshole. it's the same as not saying it ...)

Okay, don't let it go. In fact, it sets limits on the XML elements and attributes that we write. The structure must comply with the DTD constraints.

Let's continue with the following code:

     
          
   
    
0x584A
           
   September 25, 2015 10:24:41        
   
    
Holle, world!
           
           
   <XML的那些事...> -> 跟随0x584A、学习XML..     
  
 

Have you found anything?

Yes, it is a tree structure. Let's take a look at the DTD constraints. First, the root node is defined.ClassAnd then definesPersonElement and
PersonThe element contains four elements.Name,Time,Msg,Data.

Here is a strange thing, which we callCDATA sectionOnly the text in the interval is ignored by the parser, so it outputs a special symbol as it is.<,>...

Now the quick start to XML is over. How much have you learned? In the next chapter, let's learn the syntax, elements, and attributes of XML.

The above is the detailed content of the Quick Start tutorial for XML. For more information, see other related articles in the first PHP community!

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.