| Processing XML with Perl | | Michel Rodriguez |
![]() Example: an HTML converter | | ![]() Example: Data Base Integration (cont'd) |
Example: Data Base Integration
many different types of integrationi possible:
- dumping tables (or queries on tables) in a document (use DBIx::XML_RDB)
- feeding a data base from XML document(s) (use XML::Rax or any stream processor and DBI)
- get data from a data base and fill parts of an XML document
- ...
Example: get data from a book database and include it in the XML document.
the book file:
<?xml version="1.0"?>
<html>
<head><title>XML::Twig Data Base Example (3)</title></head>
<body>
<h1>XML::Twig Data Base Example (3)</h1>
<p>I really liked <book field="name" code="P001"/>, (<book field="rating" code="P001"/> stars,
<book field="price" code="P001"/>), a much better deal than <book field="name" code="P002"/>.</p>
</body>
</html>
|
![]() Example: an HTML converter | | ![]() Example: Data Base Integration (cont'd) |


