O'Reilly logo

Special Edition Using XSLT by Michael Floyd

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Processing Database Records

In our example, the product data came from a static file written by a human being. Sometimes, XML will be generated on the fly from the contents of a database or the results of an algorithm. The result of a database query will be either a single database row, as shown in Listing 6.11, or a list of records (perhaps the results of a search), as shown in Listing 6.12.

Listing 6.11. A Database Record in XML
<?xml version=”1.0” ?> 
<person> 
  <name>Alaric B. Snell</name> 
  <email>alaric@alaric-snell.com</email> 
  <url>http://www.alaric-snell.com/</url> 
</person> 
Listing 6.12. A Database Query Result in XML
 <?xml version=”1.0” ?> <results> <person> <name>Alaric B. Snell</name> <email>alaric@alaric-snell.com</email> <url>http://www.alaric-snell.com/</url> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required