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 inside an HTML document. This process is called binding. The easiest way is to include XML inside an HTML document. To do this, use the XML tag and document ID. This identifier is subsequently useful for displaying the document. And then you need to link the data in XML with an HTML document.

The example below creates a table that displays the data.

See the code:

  <html>
 <BODY>
 <h2> Hello XML </ h2>

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

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

And here is the result:

XML внутри HTML