Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Builder.com:
Extract XML Document Statistics
Jun 07, 2004 @ 12:24:24

Builder.com has a new article posted for anyone out there that has been frustrated with the lack of quality PHP scripts to generate statistics about the XML you're in the middle of parsing. Well, thankfully, someone in the PEAR loop thought about this and created the XML_Statistics package.

In this new Builder.com piece, the author explains what the class is all about and how you can use it to do quite a few things with the XML you've been presented, including: count the number of elements as a whole or that only match a certain pattern, tracking the number of attributes in the xml data, counting the number of character data in the document, and revealing the "depth" of the XML tree and how many elements are at each.

Using these examples, it's easy to see how having just a bit more information for your script to work with can really make a difference and cause less overhead for your pages...

tagged:

Link:


Trending Topics: