In Microsoft Internet Explorer5.0, you can use XML elements to create data islands, and the data island is an XML data referenced by the HTML page, and XML data can be included in an HTML file or within an external file.
With the XML element, we can prevent us to write a script, if the user is forbidden to execute the script due to security, the
Inline XML
Inline XML is included between marks and XML>, for example:
XML Version = "1.0"?>
Dragon Women Name>
180 heiGHT>
tree>
heroes Yang over Name>
178 heiGHT>
tree>
trees>
Xml>
Quote XML file
Use the tag to reference the external XML file, the src property can reference the local file, or you can specify a URL, the URL points to the outside server, and the data can be integrated from several different servers. The SRC attribute of the following example references the local XML file.
xml>
The file XMLData.xml contains XML data.
The following example references the XML file on a remote server:
XML Version = "1.0"?>
1/1/99 date>
104 room location>
meetings>
2/1/99 date>
34 room location>
meetings>
3/1/99 date>
20 room location>
meetings>
meetings>
Xml>
div> td>
div> td>
div> td>
TR>
TABLE>
Body>
Html>
Tag
Using the DataSRC attribute reference line XML, the DatasRC property is actually achieved by adding # to the front of the ID attribute of the XML element to be processed. Since the TD element cannot bind the data, it is necessary to find an element that can bind data. In the above example, we bind to the XML element to display with the DADAFLD attribute of the DIV element, for example: datafld = "date" The value in in the XML element is bound to DIV.
When the XML element is read by the browser, a different line is created for each Meeting> tag.
Steps to create an XML application:
1. Create a new XML document
2. Paste the following code to your XML document.
XML Version = "1.0" encoding = "GB2312"?>
China Country Name>
1.2 billion population>
Beijing Capital>
RMB ¥ currency>
Country Information>
United States Country Name>
120,000 population>
Washington Capital>
Meiyuan $ Currency>
Country Information>
Germany Country Name>
9 million population>
Berlin Capital>
Mark currency>
Country Information>
World National Introduction>
3. You can add any more entries in the World National Introduction.
4. Use the data island to access the data in XML.
To apply an XML document in your HTML document, add XML data island to the page
xml>
The above code: Turn the XML file "XML_Application.xml" to the so-called "XMLAPP" data island.
Async = "false" properties effect: Make sure that any HTML processing [Resolution] is previously transferred to XML data. 5. Bind the XML file to the HTML page.
Bind XML Data to Table (HTML), in the table data, add data source properties, and add data items to the data field in the property:
National Information TH>
Population TH>
Capital TH>
Currency TH>
THEAD>
span> td>
span> td>
span> td>
span> td>
TR>
TABLE>
6. Bind XML data to HTML without a table:
To display XML data, Table is not a must, you can use the DataSource and DataField properties to bind data using DataSource and DataField property.