cs186_sp08_mt1-12 -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Name: __________________________________ XML a. (4 pts) Provide the declaration of the eco tag in a DTD: eco _________________________________________ b. (4 pts) Write an XPath to give the name of species that live in the same region as a strictly vegetarian species. (Hint: only types of food are “animal” and “vegetable”). 12 <?xml version="1.0" encoding="utf-8"?> <eco> <region name=”no cal”?> <species name=”rabbit” size=”small” native=”midwest”> <eats> <vegetable>carrot</vegetable>
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: &lt;vegetable&gt;grass&lt;/vegetable&gt; &lt;/eats&gt; &lt;endangered&gt;never&lt;/endangered&gt; &lt;/species&gt; &lt;species name=fox size=small native=europe&gt; &lt;eats&gt;&lt;animal&gt;mouse&lt;/animal&gt;&lt;animal&gt;rabbit&lt;/animal&gt;&lt;/eat s&gt; &lt;endangered&gt;2000&lt;/endangered&gt; &lt;/species&gt; &lt;/region&gt; &lt;region name=utah&gt; &lt;/region&gt; &lt;location name=upper creek region no cal&gt; &lt;plant&gt;grass&lt;/plant&gt; &lt;plant&gt;tree&lt;/plant&gt; &lt;plant&gt;moss&lt;/plant&gt; &lt;/location&gt; &lt;location&gt; &lt;/location&gt; &lt;/eco&gt;...
View Full Document

This note was uploaded on 08/26/2009 for the course CS 186 taught by Professor Staff during the Spring '08 term at University of California, Berkeley.

Ask a homework question - tutors are online