The Extensible Markup Language (XML) provides a method to describe structured data. Unlike HTML tags that are mainly used to control the display and appearance of data, XML tags are used to define the structure and data type of the data. XML uses a group of tags to depict data elements. Each element may encapsulate very simple or complex data. You can define a group of methods to describe structured data without the Extensible Markup Language (XML. Unlike HTML tags that are mainly used to control the display and appearance of data, XML tags are used to define the structure and data type of the data. XML uses a group of tags to depict data elements. Each element may encapsulate very simple or complex data. You can define a group
The Extensible Markup Language (XML) provides a method to describe structured data. Unlike HTML tags that are mainly used to control the display and appearance of data, XML tags are used to define the structure and data type of the data.
XML uses a group of tags to depict data elements. Each element may encapsulate very simple or complex data. You can define an unlimited set of XML tags. For example, you can define XML tags to declare order data, such as price, tax, shipping address, Bill address, and so on. Because XML tags are used across the entire unit and across units, data from different data storage areas is easier to exchange and operate.
XML is a simple, platform-independent and widely used standard. Compared with HTML, XML separates user interfaces from structured data. This separation of data and display makes it possible to integrate data from different sources. Customer information, orders, research results, bill payments, medical records, directory data, and other information can all be converted to XML.
XML and HTML
The following are the key points to remember about the relationship between XML and HTML:
A. XML does not need to replace HTML. XML can be regarded as a supplement to HTML. The goals of XML are different from those of HTML: HTML is designed to display data and concentrate on data appearance, while XML is designed to describe data and concentrate on data content.
B. similar to HTML, XML does not perform any operations. Although the XML tag can be used to describe the structure of an item such as an order, it does not contain any code that can be used to send or process the order and to ensure delivery by that order. Others must write code to actually perform these operations on data in XML format.
C. Unlike HTML, XML markup is defined by the author of the architecture or document and is unrestricted. HTML tags are predefined. HTML authors can only use tags supported by the current HTML standard.
XML is an extremely flexible way to transmit data. The following are examples of XML usage:
A. common document
B. structured records, such as appointment records or orders
C. Internet/Intranet Web applications for mobile data
D. objects with data, such as objects or ActiveX controls in persistent format
E. data records, such as the query result set
F .. metadata of the Web site, such as "Channel Definition Format" (CDF)
G .. graphic display, such as the application user interface
H .. link between information and people on the Web
I. C # code (in XML format). For more information, see the XML documentation.
J. used to locate the discovery documentation for available XML Web services. For more information, see XML Web services discovery.
The following lists some advantages of XML over other formats when storing information:
A. XML format is text-based, which makes it easier to read, record, and debug.
B. XML documents can use a lot of infrastructure that has been created for HTML, including HTTP protocol and some browsers. HTTP allows XML transmission through the firewall.
C. XML analysis has been well defined and widely used, making it possible to retrieve information from XML documents in various environments.
D. The application can rely on the XML analyzer for some structure verification and data type check (when using the architecture ).
E. XML is based on Unicode, making it easier to create international documents. However, XML is not suitable for all situations. XML documents are often more detailed than the binary format they are replaced. They occupy more network bandwidth and storage space, or require more processor time for compression. XML analysis may be slower than analysis in a highly optimized binary format and may require more memory. However, careful application design can avoid some problems.
Verify the XML document
To verify that an XML document contains the required data and structure, you must associate an XML schema with an XML document. XML architecture defines how to construct elements and attributes to form XML document rules. You can share the architecture between units to make it easy to transmit and process shared data. For more information, see XML Architecture introduction.
Show XML data
There are several ways to display (or provide) XML data.
The data binding mechanism can also be used with the style sheet to display XML data visually and add interactivity.
The following are several ways to display XML:
A. XSLT-extensible style sheet language
B. CSS-Cascading Style Sheets
C. Microsoft Internet Explorer
For more information, see the MSDN Online XML Developer Center Web site (http://msdn.microsoft.com/xml/default.asp ).
If you are familiar with HTML, you can learn how to create XML documents and only require them to be valid and conform to the standard format. For more information about XML, see the xml sdk and the MSDN Online XML Developer Center Web site.
For more information, see the XML specification (http://www.w3.org/XML/) of the World Wide Web Federation (W3C ).
Q: Why are there many large websites still using html instead of xml?
A: XML and HTML are actually different. you said that HTML is used for large websites. if static data is used for HTML, the speed is certainly the fastest, but the maintenance is poor! Generally, xml css is used for site design. However, xml css has many limitations. use xml xslt.
Q: Can I directly use xml to develop a website and then directly upload it to the normal static space provided now?
A: If you can assume that all users are using (or at least installed) IE6, there is no problem.
If you are using other browsers, you should convert the XML-> HTML on the server side, which is not supported by normal static space. You can select an ASP or PHP space that supports XMLDOM. Therefore, the running environment is different.
The above is the basic knowledge of XML for beginners-learn more about the role of XML. For more information, see other related articles in the first PHP community!