Home  >  Article  >  Backend Development  >  Courseware source code sharing of Chuanzhi Podcast 2017 xml video tutorial

Courseware source code sharing of Chuanzhi Podcast 2017 xml video tutorial

黄舟
黄舟Original
2017-12-04 11:21:225879browse

"Chuanzhi Podcast 2017 XML Video Tutorial" is generally used for data storage and communication between various languages ​​and applications. The function of XML is to express the structural relationship between data. This structural relationship is very important. XML provides programmers with a more versatile and organized way to store, access, and modify data.

Courseware source code sharing of Chuanzhi Podcast 2017 xml video tutorial

Course playback address: http://www.php.cn/course/580.html

The teacher’s teaching style:

The lectures are friendly and natural, unpretentious, not pretentious, nor deliberately exaggerated, but talk eloquently and carefully, and the relationship between teachers and students is In an atmosphere of equality, collaboration, and harmony, silent emotional exchanges are carried out, and the desire and exploration of knowledge are integrated into simple and real teaching situations. Students gain knowledge through quiet thinking and silent approval

The more difficult point in this video is the namespace:

XML element names are not fixed. When two different documents use the same name to describe two different Naming conflicts will occur when elements of a type are used, or when the same tag represents content with two different meanings.

Solution to the problem: Namespace (Namespace). For each set of DTD for a specific application, give it a unique logo to represent it. If you use elements defined in the DTD in XML, you need to change the DTD logo Used in conjunction with the element name and attributes, it is equivalent to indicating where the element comes from, so that it will not be confused with other elements of the same name (somewhat similar to the function of packages in Java, giving it a full name). In XML, a ready-made, globally unique "domain name" is used as the Namespace, that is, the URL is used as the Namespace of XML.

Namespaces allow us to combine different element and attribute definitions in a document and indicate where the definitions of these elements and attributes come from.

The syntax of the namespace is as follows:

 xmlns:[prefix]=”[url of name]”

where "xmlns:" is a required attribute. "prefix" is an alias of the namespace, and its value cannot be xml.

<sample xmlns:ins=”http://www.lsmx.net.ac”>
   <ins:batch-list>
   <ins:batch>Evening Batch</ins:batch>
</ins:batch-list>
     </sample>

It is worth noting that batch-list, batch and other tags must be defined in "http://www.lsmx.net.ac", and the alias is ins. Note that the namespace must be declared before use, and don't forget ":" when using it.

First, the default Namespace xmlns=”[url of namespace]”

Second, the namespace of the parent element is specified. If the child element wants to use its own namespace, it can be specified in the child element Namespace alias.

Third, attributes can also have their own namespace.

Here we also recommend downloading source code resources: http://www.php.cn/xiazai/learn/2115

1.XML supporting notes + related resources

The above is the detailed content of Courseware source code sharing of Chuanzhi Podcast 2017 xml video tutorial. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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