WebReference.com - Part 3 of Chapter 10 from Professional PHP4 XML, from Wrox Press Ltd (7/7) | WebReference

WebReference.com - Part 3 of Chapter 10 from Professional PHP4 XML, from Wrox Press Ltd (7/7)

To page 1To page 2To page 3To page 4To page 5To page 6current page
[previous]

Professional PHP4 XML, Chapter 10: Putting It Together

Other Querying Alternatives

There are other querying alternatives for XML such as XQL and XQuery. We didn't cover them in this chapter since there isn't a PHP implementation of these alternatives. As they evolve and become stable we may find PHP extensions that support them.

Chapter 14 has a short introduction to XQuery. The specification is available at http://www.w3.org/TR/xquery/.

Abstraction Again

Querying an XML document is the problem where more solutions can be applied - XQL, XQuery, XSLT, XPath, DOM, SAX, and others can be used to query a document. So it's useful to have a query class abstracting queries. Also, it is almost always good to separate what the application needs from how it is done.

Caching Strikes Back

As with transformations, we might cache query results to reuse the result if the same query is applied to an unchanged document. The same considerations we made about caching transformations apply here.

Choosing a Querying Strategy

With so many options, choosing a querying strategy can sometimes be hard. We recommend the following strategy:


To page 1To page 2To page 3To page 4To page 5To page 6current page
[previous]

Created: August 26, 2002
Revised: August 26, 2002

URL: http://webreference.com/programming/php/php4xml/chap10/3/7.html