Extensible Markup Language (XML) is a markup language used to mark electronic files to make them structural. It can be used to mark data and define data types. It is a source language that allows users to define their own markup language. XML is a subset of the standard universal markup language (SGML) that is ideal for web transport. XML provides a unified approach to describe and exchange structured data independent of an application or vendor.
Format Features
XML is different from databases such as Access, Oracle and SQL Server. Databases provide stronger data storage and analysis capabilities, such as: data indexing, sorting, searching, correlation consistency, etc. XML is just to display data. In fact, the biggest difference between XML and other data expressions is that it is extremely simple. This is a bit trivial, but it is this that makes XML unique.
The difference between XML and HTML is: XML is used to store data, and it focuses on the data itself. HTML is used to define data, focusing on the display mode of the data.
The simplicity of XML makes it easy to read and write data in any application, which makes XML quickly the only common language for data exchange. Although different application software also supports other data exchange formats, they will support XML soon, which means that the program can be more easily combined with the information generated by Windows, Mac OS, Linux and other platforms, and then it can be easily loaded into the program and analyzed it, and output the results in XML format.
In order to make SGML appear user-friendly, XML redefined some internal values and parameters of SGML, and removed a large number of rarely used functions. These complicated functions make SGML appear complicated when designing websites. XML retains the structured function of SGML, so that website designers can define their own document types. XML has also introduced a new document type, so that developers do not have to define document types.
Simple syntax
SGML is often used to define document type definitions (DTDs) for HTML, and it is also often used to write XML DTDs. The problem with SGML is that it allows some weird syntax to appear, which makes creating HTML parsers a big problem:
1 Some starting tags do not allow end tags, such as <img> tags in HTML. An error will appear if the end tag is included.
2 Some starting tags can optionally appear in end tags or implicit end tags.
3 Some starting tags require that the end tags must appear, such as the <script> tag in HTML.
4 Tags can be nested in any order. Even if the end tag does not appear in reverse order of the start tag, for example, this is a sample string is correct.
5 Some properties require that values must be included, such as the src feature in <img src="">.
6 Some features do not require that there must be values, such as the nowrap feature in it.
7 It is OK to define whether double quotes are added on both sides of the feature, so <img src=""> and <img src=> are allowed.
These problems make it a difficult task to build a parser for SGML language. The difficulty in determining when to apply the above rules has led to the stagnation of the definition of the SGML language. Taking these problems as the starting point, XML has gradually entered our vision.
XML removes the random syntax of SGML that has previously troubled many developers. In XML, the following syntax is used:
1 Any starting tag must have an end tag.
2 Another simplified syntax can be used, which can represent both the start and end tags in one tag. This syntax is to follow a slash (/) immediately before it is larger than the symbol, such as <tag/>. The XML parser will translate it into <tag></tag>.
3 The tags must be nested in the appropriate order, so the end tags must match the starting tag in mirror order, for example this is a samplestring. This is like treating the start and end tags as left and right brackets in mathematics: the outer brackets cannot be closed until all inner brackets are closed.
4 All characteristics must have values.
5 All attributes must be double quoted around the value.
These rules make it much easier to develop an XML parser, and also eliminate the work spent in parsing SGML on judging when and where to apply those strange grammatical rules. In just the first six years after XML emerged, many different languages were derived, including MathML, SVG, RDF, RSS, SOAP, XSLT, XSL-FO, and HTML was also improved to XHTML.
Because XML is formulated by W3C, the standardization of XML is undertaken by W3C's XML Working Group, which is composed of experts from various places and industries. They exchange opinions on XML standards through email and put forward their own opinions (/TR/WD-xml). Because XML is a public format, (it is not exclusive to any company), you don't have to worry that XML technology will become a profit tool for a few companies. XML is not a language that depends on a specific browser.
Opening method: Use notepad, editplus and other text tool software to open it. Multiple users save configuration files or web pages in English. Mobile reading websites are mostly developed based on XML, and multi-user web page production related data storage, etc.
Now teach you how and software to open XML files.
Haha, in fact, the easiest thing is to open it with the EXCEL table. .
You can also use Netscape 6 to open XML documents, and you can also use the right-click to select "View Source File"
When you open an XML document with Netscape 6,
The browser will display the root element and child elements with colored code.
How to open a file in Excel
When opening an XML file in Excel, you will be prompted to select one of the following methods to import XML data: as an XML list
As a read-only workbook
Using the XML Source task pane
Open the file as an XML list
When an XML source is opened, Excel looks for tags for XML stylesheets (XSL). XSL describes how the data is displayed. If the corresponding tag exists, Excel will prompt you to choose whether to apply the stylesheet. If you choose to apply XSL, XSL will indicate how the data is displayed; in this case, the rest of the information in this section of this article will no longer apply.
If you do not have an XSL tag, you will receive the following message:
The specified XML source does not have a reference schema. Excel creates a schema based on XML source data.
Excel then imports data from the XML source. If XML data contains duplicate fields within one element, Excel distributes the data across multiple rows. Each row contains a unique dataset. This may cause small datasets in XML to appear as many rows in Excel.
Open a file as a read-only workbook
If you select to open the XML source document as a read-only workbook, the first token of the element will be used as the title and placed in cell A1. The remaining marks are sorted alphabetically and placed in the second row. When opening the above weather report example as a read-only workbook, the data in it will be arranged into the following column title list: /area/city
/area/country
/area/region
/area/state
/date
/measurements/h-index
/measurements/humidity
/measurements/skies
/measurements/temperature
/measurements/uv-index
/measurements isibility
/measurements/wind/direction
/measurements/wind/windspeed
/time
If there is a data set, the data for each column is placed on the third row of the spreadsheet. If XML data contains duplicate fields within one element, Excel distributes the data across multiple rows. Each row contains a unique dataset. This may cause small datasets in XML to appear as many rows in Excel.
Using the XML Source task pane
The schema of the XML data file is displayed in the XML Source task pane. You can then drag schema elements into the worksheet to map those elements to the worksheet.
If an XML data file that does not reference the schema is opened, Excel infers the schema of the XML data file.
Format Features
XML is different from databases such as Access, Oracle and SQL Server. Databases provide stronger data storage and analysis capabilities, such as: data indexing, sorting, searching, correlation consistency, etc. XML is just to display data. In fact, the biggest difference between XML and other data expressions is that it is extremely simple. This is a bit trivial, but it is this that makes XML unique.
The difference between XML and HTML is: XML is used to store data, and it focuses on the data itself. HTML is used to define data, focusing on the display mode of the data.
The simplicity of XML makes it easy to read and write data in any application, which makes XML quickly the only common language for data exchange. Although different application software also supports other data exchange formats, they will support XML soon, which means that the program can be more easily combined with the information generated by Windows, Mac OS, Linux and other platforms, and then it can be easily loaded into the program and analyzed it, and output the results in XML format.
In order to make SGML appear user-friendly, XML redefined some internal values and parameters of SGML, and removed a large number of rarely used functions. These complicated functions make SGML appear complicated when designing websites. XML retains the structured function of SGML, so that website designers can define their own document types. XML has also introduced a new document type, so that developers do not have to define document types.
Simple syntax
SGML is often used to define document type definitions (DTDs) for HTML, and it is also often used to write XML DTDs. The problem with SGML is that it allows some weird syntax to appear, which makes creating HTML parsers a big problem:
1 Some starting tags do not allow end tags, such as <img> tags in HTML. An error will appear if the end tag is included.
2 Some starting tags can optionally appear in end tags or implicit end tags.
3 Some starting tags require that the end tags must appear, such as the <script> tag in HTML.
4 Tags can be nested in any order. Even if the end tag does not appear in reverse order of the start tag, for example, this is a sample string is correct.
5 Some properties require that values must be included, such as the src feature in <img src="">.
6 Some features do not require that there must be values, such as the nowrap feature in it.
7 It is OK to define whether double quotes are added on both sides of the feature, so <img src=""> and <img src=> are allowed.
These problems make it a difficult task to build a parser for SGML language. The difficulty in determining when to apply the above rules has led to the stagnation of the definition of the SGML language. Taking these problems as the starting point, XML has gradually entered our vision.
XML removes the random syntax of SGML that has previously troubled many developers. In XML, the following syntax is used:
1 Any starting tag must have an end tag.
2 Another simplified syntax can be used, which can represent both the start and end tags in one tag. This syntax is to follow a slash (/) immediately before it is larger than the symbol, such as <tag/>. The XML parser will translate it into <tag></tag>.
3 The tags must be nested in the appropriate order, so the end tags must match the starting tag in mirror order, for example this is a samplestring. This is like treating the start and end tags as left and right brackets in mathematics: the outer brackets cannot be closed until all inner brackets are closed.
4 All characteristics must have values.
5 All attributes must be double quoted around the value.
These rules make it much easier to develop an XML parser, and also eliminate the work spent in parsing SGML on judging when and where to apply those strange grammatical rules. In just the first six years after XML emerged, many different languages were derived, including MathML, SVG, RDF, RSS, SOAP, XSLT, XSL-FO, and HTML was also improved to XHTML.
Because XML is formulated by W3C, the standardization of XML is undertaken by W3C's XML Working Group, which is composed of experts from various places and industries. They exchange opinions on XML standards through email and put forward their own opinions (/TR/WD-xml). Because XML is a public format, (it is not exclusive to any company), you don't have to worry that XML technology will become a profit tool for a few companies. XML is not a language that depends on a specific browser.
Opening method: Use notepad, editplus and other text tool software to open it. Multiple users save configuration files or web pages in English. Mobile reading websites are mostly developed based on XML, and multi-user web page production related data storage, etc.
Now teach you how and software to open XML files.
Haha, in fact, the easiest thing is to open it with the EXCEL table. .
You can also use Netscape 6 to open XML documents, and you can also use the right-click to select "View Source File"
When you open an XML document with Netscape 6,
The browser will display the root element and child elements with colored code.
How to open a file in Excel
When opening an XML file in Excel, you will be prompted to select one of the following methods to import XML data: as an XML list
As a read-only workbook
Using the XML Source task pane
Open the file as an XML list
When an XML source is opened, Excel looks for tags for XML stylesheets (XSL). XSL describes how the data is displayed. If the corresponding tag exists, Excel will prompt you to choose whether to apply the stylesheet. If you choose to apply XSL, XSL will indicate how the data is displayed; in this case, the rest of the information in this section of this article will no longer apply.
If you do not have an XSL tag, you will receive the following message:
The specified XML source does not have a reference schema. Excel creates a schema based on XML source data.
Excel then imports data from the XML source. If XML data contains duplicate fields within one element, Excel distributes the data across multiple rows. Each row contains a unique dataset. This may cause small datasets in XML to appear as many rows in Excel.
Open a file as a read-only workbook
If you select to open the XML source document as a read-only workbook, the first token of the element will be used as the title and placed in cell A1. The remaining marks are sorted alphabetically and placed in the second row. When opening the above weather report example as a read-only workbook, the data in it will be arranged into the following column title list: /area/city
/area/country
/area/region
/area/state
/date
/measurements/h-index
/measurements/humidity
/measurements/skies
/measurements/temperature
/measurements/uv-index
/measurements isibility
/measurements/wind/direction
/measurements/wind/windspeed
/time
If there is a data set, the data for each column is placed on the third row of the spreadsheet. If XML data contains duplicate fields within one element, Excel distributes the data across multiple rows. Each row contains a unique dataset. This may cause small datasets in XML to appear as many rows in Excel.
Using the XML Source task pane
The schema of the XML data file is displayed in the XML Source task pane. You can then drag schema elements into the worksheet to map those elements to the worksheet.
If an XML data file that does not reference the schema is opened, Excel infers the schema of the XML data file.