Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the basics of XML

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Most people do not understand the knowledge points of this article "what are the basics of XML?", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "what are the basics of XML" article.

Extensible markup language (XML) provides a way to describe structured data. Unlike HTML tags, which 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 itself.

XML uses a set of tags to depict data elements. Each element encapsulates data that can be very simple or complex. You can define an unlimited set of XML tags. For example, you can define some XML tags to declare the data in the order, such as price, tax, shipping address, billing address, and so on. Because XML tags are used throughout and across units, data from a variety of different datastores will be easier to exchange and manipulate.

XML is a simple, platform-independent and widely adopted standard. The advantage of XML over HTML is that it separates the user interface from structured data. This separation of data from display makes it possible to integrate data from different sources. Customer information, orders, research results, bill payments, medical records, catalog data, and other information can be converted to XML.

XML and HTML

Here are a few key points to remember about the relationship between XML and HTML:

a.。 XML is not meant to replace HTML;. In fact, XML can be seen as a supplement to HTML. The goals of XML and HTML are different: the design goal of HTML is to display and focus on the appearance of the data, while the design goal of XML is to describe the data and focus on the content of the data.

b.。 Like HTML, XML does nothing. While the XML tag can be used to describe the structure of items such as an order, it does not contain any code that can be used to send or process the order and to ensure delivery to that order. Others must write code to actually perform these operations on data in XML format.

c.。 Unlike HTML, XML tags are defined by the author of the schema or document and are unlimited. HTML tags are predefined; HTML authors can only use tags supported by the current HTML standard.

The use of XML

XML is an extremely flexible way to transfer data. The following are all examples of situations where XML can be used:

a.。 General document

b.。 Structured records, such as appointment records or orders

c.。 Internet/Intranet Web applications for mobile data

d.。 The persistent format of an object with data, such as an object or an ActiveX control

e.。 Data records, such as the result set of a query

f.。 Meta-content of Web sites, such as Channel definition format (CDF)

g.。 A graphical display, such as the user interface of an application

h.。 Links between information and people on Web

i.。 C # code (can be in XML form); see the XML documentation for more information

j.。 The discovery document used to locate the available XML Web services; for more information, see XML Web services Discovery.

The following lists several advantages of XML over other formats when storing information:

a.。 XML formats are text-based, which makes them easier to read, record, and sometimes easier to debug.

b.。 XML documents can use many of the infrastructure that has been established for HTML, including the HTTP protocol and some browsers. HTTP allows XML to pass through the firewall.

c.。 XML analysis has been well defined and widely used, which makes it possible to retrieve information from XML documents in a variety of environments.

d.。 Applications can rely on XML parsers for some structural validation and data type checking (when using schemas).

e.。 XML is built on Unicode, making it easier to create international documents. However, XML is not suitable for all situations. XML documents tend to be more detailed than the binary format they replace. They take up more network bandwidth and storage space, or require more processor time to compress. XML parsing may be slower than analyzing highly optimized binary formats and may require more memory. However, careful application design can avoid some problems.

Validate XML documents

To verify that an XML document contains the required data and structure, you must associate an XML schema with the XML document. XML schemas are rules that define how elements and attributes are constructed to form XML documents. You can share schemas between units to make it easy to transfer and process shared data. For more information, see introduction to XML Architecture.

Display XML data

There are several ways to display (or provide) XML data.

There are also mechanisms for data binding that can be used with stylesheets to present XML data visually and to add interactivity.

Here are several ways to display XML:

a.。 XSLT-Extensible stylesheet language

b.。 CSS-cascading style sheet

c.。 Microsoft Internet Explorer

Q: then why are there so many large websites that use html instead of xml?

A:XML and HTML are essentially different, you said that large sites use HTML, if it is static data using HTML of course the fastest, but poor maintenance! XML CSS is generally used for site design, but XML CSS is more limited, so use XML XSLT.

Q: now I directly use xml to develop a website, and then upload it directly to the ordinary static space now provided. Can it be displayed?

A: there is no problem if you can assume that all users use (or at least install) IE6.

If users use other browsers, the conversion of XML- > HTML should be done on the server side, which is not supported in normal static space. You can choose an ASP or PHP space that supports XMLDOM. So the operating environment is different.

The above is the content of this article on "what are the basic knowledge of XML". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report