The sample_docs table has three rows:
An example document, “bookstore.xml”.
An XML representation of the publishers table of the pubs2 database.
An XML representation of (selected columns of) the titles table of the pubs2 database.
The following script inserts the example “bookstore.xml” document into a row of the sample_docs table:
insert into sample_docs (name_doc, text_doc) values ( "bookstore", "<?xml version='1.0' standalone = 'no'?> <?PI_example Process Instruction ?> <!--example comment--> <bookstore specialty='novel'> <book style='autobiography'> <title>Seven Years in Trenton</title> <author> <first-name>Joe</first-name> <last-name>Bob</last-name> <award>Trenton Literary Review Honorable Mention</award> </author> <price>12</price> </book> <book style='textbook'> <title>History of Trenton</title> <author> <first-name>Mary</first-name> <last-name>Bob</last-name> <publication>Selected Short Stories of <first-name>Mary</first-name> <last-name>Bob</last-name> </publication> </author> <price>55</price> </book> <?PI_sample Process Instruction ?> <!--sample comment--> <magazine style='glossy' frequency='monthly'> <title>Tracking Trenton</title> <price>2.50</price> <subscription price='24' per='year'/> </magazine> <book style='novel' id='myfave'> <title>Trenton Today, Trenton Tomorrow</title> <author> <first-name>Toni</first-name> <last-name>Bob</last-name> <degree from='Trenton U'>B.A.</degree> <degree from='Harvard'>Ph.D.</degree> <award>Pulizer</award> <publication>Still in Trenton</publication> <publication>Trenton Forever</publication> </author> <price intl='canada' exchange='0.7'>6.50</price> <excerpt> <p>It was a dark and stormy night.</p> <p>But then all nights in Trenton seem dark and stormy to someone who has gone through what <emph>I</emph> have.</p> <definition-list> <term>Trenton</term> <definition>misery</definition> </definition-list> </excerpt> </book> <book style='leather' price='29.50' xmlns:my='http://www.placeholdernamehere.com/schema/'> <title>Who's Who in Trenton</title> <author>Robert Bob</author> </book> </bookstore>")
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |