DECLARE
  retval boolean;
BEGIN
  retval :=
    dbms_xdb.createresource('/public/book/books.xml',
'
<books>
<book isbn="0439139597" category="CHILDREN">
  <author>Rowling, J.K.</author>
  <title>Harry Potter and the Goblet of Fire</title>
  <price>25.95</price>
</book>
<book isbn="0439064864" category="CHILDREN">
  <author>Rowling, J.K.</author>
  <title>Harry Potter and the Chambers of Secrets</title>
  <price>17.95</price>
</book>
<book isbn="0439136350" category="CHILDREN">
  <author>Rowling, J.K.</author>
  <title>Harry Potter and the Prisonor of Azkaban</title>
  <price>19.95</price>
</book>
<book isbn="0345350499" category="FICTION">
  <author>Bradley, Marion</author>
  <title>The Mists of Avalon</title>
  <price>12.95</price>
</book>
<book isbn="0395851580" category="CHILDREN">
  <author>Marshall, James</author>
  <title>George and Martha: The Complete Stories of Two Best Friends</title>
  <price>25.00</price>
</book>
<book isbn="0375810609" category="CHILDREN">
  <author>Brunhoff, Jean De</author>
  <title>Bonjour Babar</title>
  <price>29.95</price>
</book>
<book isbn="0345337662" category="FICTION">
  <author>Rice, Anne</author>
  <title>Interview with a Vampire</title>
  <price>6.99</price>
</book>
<book isbn="0345377648" category="FICTION">
  <author>Rice, Anne</author>
  <title>Lasher</title>
  <price>14.00</price>
</book>
<book isbn="0345313860" category="FICTION">
  <author>Rice, Anne</author>
  <title>The Vampire LeStat</title>
  <price>6.99</price>
</book>
<book isbn="034538475X" category="FICTION">
  <author>Rice, Anne</author>
  <title>The Tale of the Body Thief</title>
  <price>6.99</price>
</book>
<book isbn="0201612585" category="COMPUTING">
  <author>Sunderraman, Raj</author>
  <title>Oracle8 Programming: A primer</title>
  <price>29.99</price>
</book>
<book isbn="0910146691" category="GENERAL">
  <author>Hart, Allen De</author>
  <title>North Carolina Hiking Trails</title>
  <price>14.95</price>
</book>
<book isbn="0887251714" category="GENERAL">
  <author>Cottrell, Jim</author>
  <title>Skiing Everyone</title>
  <price>10.00</price>
</book>
<book isbn="0030615372" category="GENERAL">
  <author>Colin M. Turnbull</author>
  <title>The Mbuti Pygmies</title>
  <price>15.00</price>
</book>
<book isbn="0201634422" category="COMPUTING">
  <author>Keshav, S.</author>
  <title>An Engineering Approach to Computer Networks</title>
  <price>49.95</price>
</book>
<book isbn="0534368018" category="COMPUTING">
  <author>Bronson, Gary</author>
  <title>A First Book of C++: From Here to There</title>
  <price>60.95</price>
</book>
<book isbn="1584500492" category="COMPUTING">
  <author>DeLoura, Mark</author>
  <title>Game Programming Gems</title>
  <price>69.95</price>
</book>
<book isbn="076454621X" category="COMPUTING">
  <author>Murdock, Kelly</author>
  <title>3D Studio Max R3</title>
  <price>49.99</price>
</book>
<book isbn="0136603904" category="COMPUTING">
  <author>Irvine, Kip</author>
  <title>Assembly Language for Intel-Based Computers</title>
  <price>72.95</price>
</book>
<book isbn="0805317554" category="COMPUTING">
  <author>Elmasri and Navathe</author>
  <title>Fundamentals of Database Systems</title>
  <price>75.95</price>
</book>
<book isbn="0471105597" category="SCIENCE">
  <author>Halliday, Resnick, and Walker</author>
  <title>Fundamentals of Physics Extended</title>
  <price>99.95</price>
</book>
<book isbn="0671032658" category="FICTION">
  <author>King, Stephen</author>
  <title>The Green Mile</title>
  <price>7.99</price>
</book>
<book isbn="0935112510" category="SPORTS">
  <author>Clarke, Greg</author>
  <title>Golf Rules Illustrated</title>
  <price>19.95</price>
</book>
<book isbn="039914563X" category="FICTION">
  <author>Clancy, Tom</author>
  <title>The Bear and the Dragon</title>
  <price>28.95</price>
</book>
<book isbn="0316769487" category="FICTION">
  <author>Salinger, J.D.</author>
  <title>Catcher in the Rye</title>
  <price>5.99</price>
</book>
<book isbn="0446310783" category="FICTION">
  <author>Lee, Harper</author>
  <title>To Kill a Mockingbird</title>
  <price>6.99</price>
</book>
<book isbn="0684801523" category="FICTION">
  <author>Fitzgerald, F. Scott</author>
  <title>Great Gatsby</title>
  <price>11.95</price>
</book>
<book isbn="0399501487" category="FICTION">
  <author>Golding, William</author>
  <title>Lord of the Flies: A Novel</title>
  <price>6.95</price>
</book>
<book isbn="0672314800" category="COMPUTING">
  <author>Taylor and Armstrong</author>
  <title>Sams Teach Yourself UNIX in 24 Hours</title>
  <price>19.99</price>
</book> 
<book isbn="0137566107" category="COMPUTING">
  <author>Abel, Peter</author>
  <title>IBM PC Assembly Language and Programming</title>
  <price>63.95</price>
</book> 
<book isbn="020165783X" category="COMPUTING">
  <author>Fowler with Scott</author>
  <title>UML Distilled, Second Edition</title>
  <price>29.95</price>
</book> 
<book isbn="0070121430" category="COMPUTING">
  <author>Cormen, Leiserson, and Rivest</author>
  <title>Introduction to Algorithms</title>
  <price>69.95</price>
</book> 
<book isbn="0134897250" category="COMPUTING">
  <author>Bruegge and Dutoit</author>
  <title>Object Oriented Software Engineering</title>
  <price>45.00</price>
</book>
<book isbn="042510107X" category="FICTION">
  <author>Clancy, Tom</author>
  <title>Red Storm Rising</title>
  <price>7.99</price>
</book> 
<book isbn="0425133540" category="FICTION">
  <author>Clancy, Tom</author>
  <title>The Sum of All Fears</title>
  <price>7.99</price>
</book> 
<book isbn="0425143325" category="FICTION">
  <author>Clancy, Tom</author>
  <title>Without Remorse</title>
  <price>7.99</price>
</book>
<book isbn="0425147584" category="FICTION">
  <author>Clancy, Tom</author>
  <title>Debt Of Honor</title>
  <price>7.99</price>
</book> 
<book isbn="0870212850" category="FICTION">
  <author>Clancy, Tom</author>
  <title>The Hunt For Red October</title>
  <price>27.95</price>
</book>  
<book isbn="0345384466" category="FICTION">
  <author>Rice, Anne</author>
  <title>The Witching Hour</title>
  <price>7.99</price>
</book> 
<book isbn="0812520610" category="FICTION">
  <author>Lumley, Brian</author>
  <title>Blood Brothers</title>
  <price>7.99</price>
</book> 
<book isbn="0812520629" category="FICTION">
  <author>Lumley, Brian</author>
  <title>The Last Aerie</title>
  <price>7.99</price>
</book> 
<book isbn="0385479565" category="SCIENCE">
  <author>Preston, Richard</author>
  <title>The Hot Zone</title>
  <price>7.99</price>
</book>
<book isbn="1864364432" category="SCIENCE">
  <author>Ashton, John</author>
  <title>Why 50 Scientists Choose to Believe in Creation</title>
  <price>14.95</price>
</book>
<book isbn="0849323754" category="SCIENCE">
  <author>Rashidi, Hooman</author>
  <title>Bioinformatics Basics</title>
  <price>69.95</price>
</book>
<book isbn="0688069711" category="SCIENCE">
  <author>Selden, Gary</author>
  <title>The Body Electric</title>
  <price>13.00</price>
</book>
<book isbn="0805057579" category="SCIENCE">
  <author>Bass, Thomas</author>
  <title>The Predictors</title>
  <price>15.00</price>
</book>
<book isbn="0688160999" category="SCIENCE">
  <author>Benyus, Janine</author>
  <title>Biomimicry : Innovation Inspired by Nature</title>
  <price>14.00</price>
</book>
<book isbn="0618056777" category="SCIENCE">
  <author>Goodall, Jane</author>
  <title>Through a Window</title>
  <price>14.00</price>
</book>
<book isbn="0262181916" category="SCIENCE">
  <author>Cajal, Santiago</author>
  <title>Advice for a Young Investigator</title>
  <price>21.23</price>
</book>
<book isbn="0935039031" category="TRAVEL">
  <author>Brown, Michael</author>
  <title>Streetwise Manhattan</title>
  <price>5.95</price>
</book>
<book isbn="0864426429" category="TRAVEL">
  <author>Grant, Kim</author>
  <title>Lonely Planet Boston</title>
  <price>15.99</price>
</book>
<book isbn="1566912296" category="TRAVEL">
  <author>Steves, Rick</author>
  <title>Rick Steve Italy 2001</title>
  <price>17.95</price>
</book>
<book isbn="0961549890" category="TRAVEL">
  <author>Horowitz, Lenore</author>
  <title>Kauai Underground Guide</title>
  <price>12.95</price>
</book>
<book isbn="0966625307" category="TRAVEL">
  <author>Polancy, Toni</author>
  <title>So You Want to Live in Hawaii</title>
  <price>19.95</price>
</book>
<book isbn="0789404257" category="TRAVEL">
  <author>Various</author>
  <title>Eyewitness Travel Guides: Italy</title>
  <price>29.95</price>
</book>
<book isbn="0767903854" category="TRAVEL">
  <author>Bryson, Bill</author>
  <title>In a Sunburned Country</title>
  <price>25.00</price>
</book>
<book isbn="0120848104" category="TRAVEL">
  <author>Beletsky, Les</author>
  <title>Costa Rica: The Ecotraveller Wildlife Guide</title>
  <price>30.00</price>
</book>
<book isbn="0684869519" category="TRAVEL">
  <author>Orange, Wendy</author>
  <title>Coming Home To Jerusalem: A Personal Journey</title>
  <price>25.00</price>
</book>
</books>
');
IF retval THEN
  dbms_output.put_line('Resource created');
ELSE
  dbms_output.put_line('Problem creating resource');
END IF;
  commit;
END;
/
show errors
