开发者

Paging an XML file with PHP

I need to page an XML dataset in PHP.

The website I'm running is not high-vo开发者_如何学运维lume 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?


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


  • Define how many items are visible on a page
  • Count all items in your dataset
  • Select the actual offset from your dataset
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜