I need to read xml file with PHP,but xml file have many record update. Can I read only 10 record last update ?
Thank you very much.
I need to read xml file with PHP,but xml file have many record update. Can I read only 10 record last update ?
Thank you very much.
 
    
    In this case, you should write your own reader function/class/whatever.
Pseudo-code (its a little kind of pythonic maybe):
stop_counter = 10 // 20, 30.... etc
file = open xml_file
put cursor in the begging of the file
xmlpart = ''
counter = 0
while (not end of file)
  line = read single line from file
  xmlpart += line
  if (end of xml entry AND ++counter == stop_counter) // we can tell it by closed tag in line
    break
And then you just parse this part of xml. Pretty easy.
