Adding, Removing, and Restructuring Information
If you define the reports to be generated from your relational databases, you can arrange the data as you like: leave data out, compute new data based on existing ones (for example, an average), and so on.
The same goes for XML coded data. You can add, remove, and rearrange your data.
For example, take the data in Listing 14.4.
|
Listing 14.4 books.xml-An XML File for Restructuring Ideas
|
1: <?xml version="1.0"?> 2: <books> 3: <book> 4: <title>Teach Yourself C++ in 21 Days, Second Edition 5: </title> 6: <author>Jesse Liberty 7: </author> 8: <description>This book teaches you the basics of object-oriented programming with C++ and is completely revised to ANSI standards. It can be used with any C++ compiler. 9: </description> 10: <ISBN>0-672-31070-8 11: </ISBN> 12: <pages>700 13: </pages> 14: <targetgroup>Beginning - Intermediate 15: </targetgroup> 16: <price unit="USA">29.99 17: </price> 18: </book> 19: <book> 20: ... 21: </book> 22: </books>
You can do the following things with this listing:
- • Leave out the targetgroup information
- • Add a second price element in "Canadian dollar"
- • Add a list with all book titles or with all authors
- • Put the ISBN number after the price