Iterative Processing
In working with XML data, you are likely to run into documents that contain a repeating structure. For example, a document that represents a database recordset might contain a repeating collection of <record> elements. Generically, that document might look something like Listing 4.7.
Listing 4.7. An XML Document Instance Containing <record> Elements Representing Records in a Database Table
<?xml version=”1.0” ?> <recordSet> <record num=”001”> <field1>data for field 1</field1> <field2> data for field 2</field2> <field3> data for field 3</field3> <record num=”002”> <field1>data for field 1</field1> <field2> data for field 2</field2> <field3> data for field 3</field3> <record num=”003”> <field1>data for field 1</field1> <field2> ... |
Get Special Edition Using XSLT now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.