Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Xpath or SAX for this specific project

    I am working on a project where keywords (submitted from a website) will query a large XML document for matching criteria (for shopping products), then retrieve and return all the relevant search results (much like Google Shopping). There may be 100’s of search results returned, with 20 search results per page.

    Using PHP for the API call, would XPATH or SAX be better with regard to page loading speed and memory efficiency.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    With hundreds of entries, SAX sounds like the route to go to me. DOM could handle this, but it would depend on the size of each entry to whether the memory would be a burden. Newer versions of PHP default to 128MB of memory, which is a far cry from the 8MB we used to get. So I would expect that the processing would be the bigger drag than the memory.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •