tags:

views:

46

answers:

2

I need to page an XML dataset in PHP.

The website I'm running is not high-volume so an implementation that would query the whole XML serialized file for each page is ok, but I'd be interested in hearing also approaches that do it right from the start (maybe slicing the file in many smaller files).

What are some approaches to do this in PHP?

A: 
  • Define how many items are visible on a page
  • Count all items in your dataset
  • Select the actual offset from your dataset
fabrik
+2  A: 

My personal preference is simplexml_load_string since it makes handeling XML so much more easier using SimpleXMLElement than using DOMDocument

Kristoffer S Hansen
Very cice approach
L. De Leo