?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文档作者“创造”和“发明”的,那么我们不可能知道一个table>标记是指HTML中的表格还是一个木桌子。 在没有任何额外的信息指示如何显示数据的情况下,IE浏览器一般以树状视图的形式显示XML数据。 在下面的及格小节中,我们将描述一些解决XML文档显示问题的方案,包括CSS, XSL, JavaScript,和XML数据岛。