This page has been robot translated, sorry for typos if any. Original content here.

XML inside HTML

One practical way to use XML is to use XML within an HTML document. This process is called binding. The easiest way to include XML inside an HTML document. This is done using the XML tag and the document ID. This identifier will later be useful for displaying the document. And then you need to link the data in XML with the HTML document.

In the example below, a table is created that displays the data.

We are looking at the code:

 <h2> Hello XML </ h2>

	 <XML ID = "xmlSteps">
	 <? xml version = "1.0"?>
			 <name> Step1 </ name>
		 </ step>
			 <name> Step2 </ name>
		 </ step>
			 <name> Step3 </ name>
		 </ step>
	 </ steps>
	 </ XML>

 <table datasrc = "# xmlSteps">
	 <td> <div datafld = "name"> </ div> </ td>
 </ tr>
 </ table>

And here is the result:

XML внутри HTML