This document lists 10 PEAR packages of specific interest to developers working in the XML and Web services area.
Developers
working with XML will be pleased to hear that PEAR,
the PHP
Extension and Application Repository, has a number of packages that can
significantly simplify XML parsing and processing. These packages provide a
robust, well-tested code base, and also save you the time and effort you would
otherwise spend in “rolling your own” code. You can’t beat the price
either…they’re free!
This
document will list ten PEAR packages of specific interest to developers working
in the XML and Web services realm. Take a look, and try them
out…you never know, you might find something that solves a problem you’re
currently facing!
Note: You can install PEAR
packages directly from the Web, by following these instructions.
Table A
Package Name
|
Description
|
URL
|
XML_Tree |
This
package lets you dynamically create XML document trees even if you don’t have
DOM-XML support in your PHP build. Built-in class methods allow you to define
tree nodes, set attributes, manipulate node content, and save the resulting
output to a file or variable.
Use this package to dynamically create XML
documents in PHP builds without DOM-XML support, or as a simpler alternative
to PHP’s DOM-XML API.
|
XML_Tree |
XML_RSS |
This
package is designed to parse RSS documents. It extracts information from an RSS
feed as PHP data structures, which can be processed and formatted for
display.
Use this package to integrate RSS feeds from other
sites into your Web pages.
|
XML_RSS |
XML_RPC |
This
package provides a framework for building XML-RPC clients and servers, and
accessing remote XML services.
Use this package in server mode to create an
XML-based RPC service, or in client mode to execute an XML-RPC method call
and process the results.
|
XML_RPC |
XML_SVG |
This
package provides routines to convert standard JPEG or GIF images to an SVG
representation.
Use this package to quickly create XML SVG
representations of regular image files.
|
XML_SVG |
XML_Serializer |
This
package lets you serialize PHP data structures (like nested arrays or
objects) into XML for greater compatibility with other languages. You can
also use the supplied deserializer to reverse the
process and turn XML data into a PHP object.
Use this package to efficiently convert data
between PHP and XML, or if your PHP build does not natively support the SimpleXML extension.
|
XML_Serializer |
SOAP |
This
package provides a framework for creating SOAP clients and servers, and
creating, transmitting, receiving and processing SOAP
messages and responses.
Use this package to interact with SOAP-based Web
services, to create SOAP messages, or to build SOAP servers.
|
SOAP |
Services_Amazon |
This
package provides an interface to Amazon.com’s
Electronic Commerce Service (ECS), allowing you to obtain listings, search
for products, access wish lists and user accounts, and create Amazon.com
shopping carts.
Use this package to create an online store built on
Amazon.com’s e-commerce catalog and infrastructure.
|
Services_Amazon |
Services_Google |
This
package provides an interface to the Google.com Web Services API. You can use
this API to perform and process Google searches, check spellings and access
pages in the Google.com cache.
Use this package to add Google.com search
capabilities to your site, or to create a search engine that uses the
Google.com database.
|
Services_Google |
Services_Weather |
This
package provides a single interface to various online weather services. It
can retrieve the current weather (and in some cases, temperature and future
forecasts) for any geographical location.
Use this package to create weather tickers or tool
bars, by dynamically retrieving the current weather and temperature in any
user-specified location.
|
Services_Weather |
XML_Beautifier |
This
package rewrites XML data files to make them more readable, by adding
formatting, indentation and line breaks. A number of options are available to
control the appearance of the output file.
Use this package to “beautify”
unformatted XML data for greater readability and ease of use.
|
XML_Beautifier |