系列之十:使用ie5浏览xml文件
使用ie5浏览xml文件
你可以使用ie5象浏览其他html文件一样浏览xml的文件
这有几种打开一个xml文档的方法
你可以单击一个超联结,在地址栏里面直接输入url
在目录里面双击一个xml文档等等
如果你使用ie5打开一个xml文档, ie5将显示这个
文档的使用展开方式显示根元素和子元素
一个加号(+)或减号(-)显示在一个xml元素的左边,
并且点击它们就可以展开或收拢整个树状结构
如果你仅仅是想查看xml源程序的话,你可以选择"view source"
当你打开一个无效的xml文件时,一个表示出错的xml文件将被
ie5打开,并且ie5在里面抱错
为了让大家更加熟悉什么是xml的文件,下面将给出一些例子,大家自己去享受把。
大家也可以从下面的例子中体会到xml是如何来描述数据的。
例子文件plant_catalog.xml(这是一个用来描述种植目录的xml数据文件)
<catalog>
<plant>
<common>bloodroot</common>
<botanical>sanguinaria canadensis</botanical>
<zone>4</zone>
<light>mostly shady</light>
<price>$2.44</price>
<availability>031599</availability>
</plant>
<plant>
<common>columbine</common>
<botanical>aquilegia canadensis</botanical>
<zone>3</zone>
<light>mostly shady</light>
<price>$9.37</price>
<availability>030699</availability>
</plant>
<plant>
<common>marsh marigold</common>
<botanical>caltha palustris</botanical>
<zone>4</zone>
<light>mostly sunny</light>
<price>$6.81</price>
<availability>051799</availability>
</plant>
<plant>
<common>cowslip</common>
<botanical>caltha palustris</botanical>
<zone>4</zone>
<light>mostly shady</light>
<price>$9.90</price>
<availability>030699</availability>
</plant>
<plant>
<common>dutchman's-breeches</common>
<botanical>diecentra cucullaria</botanical>
<zone>3</zone>
<light>mostly shady</light>
<price>$6.44</price>
<availability>012099</availability>
</plant>
<plant>
<common>ginger, wild</common>
<botanical>asarum canadense</botanical>
<zone>3</zone>
<light>mostly shady</light>
<price>$9.03</price>
<availability>041899</availability>
</plant>
<plant>
<common>hepatica</common>
<botanical>hepatica americana</botanical>
<zone>4</zone>
<light>mostly shady</light>
<price>$4.45</price>
<availability>012699</availability>
</plant>
<plant>
<common>liverleaf</common>
<botanical>hepatica americana</botanical>
<zone>4</zone>
<light>mostly shady</light>
<price>$3.99</price>
<availability>010299</availability>
</plant>
<plant>
<common>jack-in-the-pulpit</common>
<botanical>arisaema triphyllum</botanical>
<zone>4</zone>
<light>mostly shady</light>
<price>$3.23</price>
<availability>020199</availability>
</plant>
<plant>
<common>mayapple</common>
<botanical>podophyllum peltatum</botanical>
<zone>3</zone>
<light>mostly shady</light>
<price>$2.98</price>
<availability>060599</availability>
</plant>
<plant>
<common>phlox, woodland</common>
<botanical>phlox divaricata</botanical>
<zone>3</zone>
<light>sun or shade</light>
<price>$2.80</price>
<availability>012299</availability>
</plant>
<plant>
<common>phlox, blue</common>
<botanical>phlox divaricata</botanical>
<zone>3</zone>
<light>sun or shade</light>
<price>$5.59</price>
<availability>021699</availability>
</plant>
<plant>
<common>spring-beauty</common>
<botanical>claytonia virginica</botanical>
<zone>7</zone>
<light>mostly shady</light>
<price>$6.59</price>
<availability>020199</availability>
</plant>
<plant>
<common>trillium</common>
<botanical>trillium grandiflorum</botanical>
<zone>5</zone>
<light>sun or shade</light>
<price>$3.90</price>
<availability>042999</availability>
</plant>
<plant>
<common>wake robin</common>
<botanical>trillium grandiflorum</botanical>
<zone>5</zone>
<light>sun or shade</light>
<price>$3.20</price>
<availability>022199</availability>
</plant>
<plant>
<common>violet, dog-tooth</common>
<botanical>erythronium americanum</botanical>
<zone>4</zone>
<light>shade</light>
<price>$9.04</price>
<availability>020199</availability>
</plant>
<plant>
<common>trout lily</common>
<botanical>erythronium americanum</botanical>
<zone>4</zone>
<light>shade</light>
<price>$6.94</price>
<availability>032499</availability>
</plant>
<plant>
<common>adder's-tongue</common>
<botanical>erythronium americanum</botanical>
<zone>4</zone>
<light>shade</light>
<price>$9.58</price>
<availability>041399</availability>
</plant>
<plant>
<common>anemone</common>
<botanical>anemone blanda</botanical>
<zone>6</zone>
<light>mostly shady</light>
<price>$8.86</price>
<availability>122698</availability>
</plant>
<plant>
<common>grecian windflower</common>
<botanical>anemone blanda</botanical>
<zone>6</zone>
<light>mostly shady</light>
<price>$9.16</price>
<availability>071099</availability>
</plant>
<plant>
<common>bee balm</common>
<botanical>monarda didyma</botanical>
<zone>4</zone>
<light>shade</light>
<price>$4.59</price>
<availability>050399</availability>
</plant>
<plant>
<common>bergamont</common>
<botanical>monarda didyma</botanical>
<zone>4</zone>
<light>shade</light>
<price>$7.16</price>
<availability>042799</availability>
</plant>
<plant>
<common>black-eyed susan</common>
<botanical>rudbeckia hirta</botanical>
<zone>annual</zone>
<light>sunny</light>
<price>$9.80</price>
<availability>061899</availability>
</plant>
<plant>
<common>buttercup</common>
<botanical>ranunculus</botanical>
<zone>4</zone>
<light>shade</light>
<price>$2.57</price>
<availability>061099</availability>
</plant>
<plant>
<common>crowfoot</common>
<botanical>ranunculus</botanical>
<zone>4</zone>
<light>shade</light>
<price>$9.34</price>
<availability>040399</availability>
</plant>
<plant>
<common>butterfly weed</common>
<botanical>asclepias tuberosa</botanical>
<zone>annual</zone>
<light>sunny</light>
<price>$2.78</price>
<availability>063099</availability>
</plant>
<plant>
<common>cinquefoil</common>
<botanical>potentilla</botanical>
<zone>annual</zone>
<light>shade</light>
<price>$7.06</price>
<availability>052599</availability>
</plant>
<plant>
<common>primrose</common>
<botanical>oenothera</botanical>
<zone>3 - 5</zone>
<light>sunny</light>
<price>$6.56</price>
<availability>013099</availability>
</plant>
<plant>
<common>gentian</common>
<botanical>gentiana</botanical>
<zone>4</zone>
<light>sun or shade</light>
<price>$7.81</price>
<availability>051899</availability>
</plant>
<plant>
<common>blue gentian</common>
<botanical>gentiana</botanical>
<zone>4</zone>
<light>sun or shade</light>
<price>$8.56</price>
<availability>050299</availability>
</plant>
<plant>
<common>jacob's ladder</common>
<botanical>polemonium caeruleum</botanical>
<zone>annual</zone>
<light>shade</light>
<price>$9.26</price>
<availability>022199</availability>
</plant>
<plant>
<common>greek valerian</common>
<botanical>polemonium caeruleum</botanical>
<zone>annual</zone>
<light>shade</light>
<price>$4.36</price>
<availability>071499</availability>
</plant>
<plant>
<common>california poppy</common>
<botanical>eschscholzia californica</botanical>
<zone>annual</zone>
<light>sun</light>
<price>$7.89</price>
<availability>032799</availability>
</plant>
<plant>
<common>shooting star</common>
<botanical>dodecatheon</botanical>
<zone>annual</zone>
<light>mostly shady</light>
<price>$8.60</price>
<availability>051399</availability>
</plant>
<plant>
<common>snakeroot</common>
<botanical>cimicifuga</botanical>
<zone>annual</zone>
<light>shade</light>
<price>$5.63</price>
<availability>071199</availability>
</plant>
<plant>
<common>cardinal flower</common>
<botanical>lobelia cardinalis</botanical>
<zone>2</zone>
<light>shade</light>
<price>$3.02</price>
<availability>022299</availability>
</plant>
</catalog>