Hello and welcome to our community! Is this your first visit?
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
    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. #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,668 Times in 2,637 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'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


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