The language of XML is used in both Sencha touch and SAP UI5. In Sencha touch, it is used just like JSON for data transfer, and in SAP UI5 it is used as a view template. Let's take a closer look at the XML language.
An overview of XML is explained online: XML is an abbreviation for Extensible Markup Language (extensible Markup Language), where markup (Markup) is a critical part. You can create content and then mark it with qualifying tags, making each word, phrase, or block a recognizable, categorical piece of information. The file that you create, or the document instance, consists of elements (tags) and content. Elements help to better understand the document when it is read from the printout or processed in electronic form. The more descriptive the element, the easier it is to identify the parts of the document. Since the advent of tags, tagged content has an advantage, that is, when a computer system is missing, it is still possible to print out data by means of a markup understanding.
At the beginning of the XML document, we typically make the necessary declarations:
<?xml version= "1.0" encoding= "UTF-8" >
Here are some basic configuration information, including the XML version, encoding method, and so on. The declaration must be placed in the header of the XML file.
In XML we can customize the label content, which is related to what we want to create. Take a piece of code in Sencha touch as an example:
<BOOK><ID>1</ID><IMAGE_URL>IMAGE/HTML51.JPG</IMAGE_URL><BOOK_NAME>HTML5 Guide </book_name><author>tom</author><description>a Good Book</description></book >
This code, through the book tag, defines what we want to create, with each tag defining the attributes it contains. These tags are custom-defined. Note that the spelling of the tag start and end tag words should be exactly the same, including case, or the processing system will be treated as two files.
Like in HTML, we can set properties for custom tags, such as:
<book_name date= >HTML5 Guide </book_name>
Editing a good XML document is actually a bunch of data in the form of strings. As for how we use it, it is used in view or data, and can be called according to our requirements. Most languages support a uniform standard for XML.
Introduction to XML Basic knowledge