ansharma Posted November 8, 2011 Share Posted November 8, 2011 Hi all, i have a very large xml file containing 2000 child nodes. i am using DOMDocument to read xml data but it shows whole data at once, i want to fetch first 20 or 30 nodes first time and then rest leave for pagination. is there any way to do so. to read only first few records from xml file. Thanks in advance... Quote Link to comment https://forums.phpfreaks.com/topic/250706-pagination-for-xml-nodes/ Share on other sites More sharing options...
The Little Guy Posted November 8, 2011 Share Posted November 8, 2011 yes, you will want to look into simplexml_load_file, it will return an array of the nodes. I don't know how your xml is set up, so I can't really tell you how to do it, but hopefully this will help you. Quote Link to comment https://forums.phpfreaks.com/topic/250706-pagination-for-xml-nodes/#findComment-1286284 Share on other sites More sharing options...
ansharma Posted November 8, 2011 Author Share Posted November 8, 2011 Thanks The Little Guy it is very helpful Quote Link to comment https://forums.phpfreaks.com/topic/250706-pagination-for-xml-nodes/#findComment-1286296 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.