?xml version="1.0" encoding="ISO-8859-1" ?> - !-- Edited with XML Spy v4.2 --> - breakfast_menu> - food> name>Belgian Waffles/name> price>$5.95/price> description>two of our famous Belgian Waffles with plenty of real maple syrup/description> calories>650/calories> /food> - food> name>Strawberry Belgian Waffles/name> price>$7.95/price> description>light Belgian waffles covered with strawberries and whipped cream/description> calories>900/calories> /food> - food> name>Berry-Berry Belgian Waffles/name> price>$8.95/price> description>light Belgian waffles covered with an assortment of fresh berries and whipped cream/description> calories>900/calories> /food> - food> name>French Toast/name> price>$4.50/price> description>thick slices made from our homemade sourdough bread/description> calories>600/calories> /food> - food> name>Homestyle Breakfast/name> price>$6.95/price> description>two eggs, bacon or sausage, toast, and our ever-popular hash browns/description> calories>950/calories> /food> /breakfast_menu> 為什么XML在瀏覽器中的顯示是這個樣子呢? 單純的XML文檔并不包含如何顯示數據的信息。 既然XML標記是由XML文檔作者“創(chuàng)造”和“發(fā)明”的,那么我們不可能知道一個table>標記是指HTML中的表格還是一個木桌子。 在沒有任何額外的信息指示如何顯示數據的情況下,IE瀏覽器一般以樹狀視圖的形式顯示XML數據。 在下面的及格小節(jié)中,我們將描述一些解決XML文檔顯示問題的方案,包括CSS, XSL, JavaScript,和XML數據島。