Jump to content

Querying XML files using xquery


jvmills

Recommended Posts

Hi not sure if this is the right section for this post, but I couldn't see an XML section. Anyway here goes:

 

I need to create a small php application that queries an xml file. I thought I had found the solution to this problem with xquery lite, however this implementation is no longer supported in PHP 5+ as I understand.

 

XQuery is exactly the tool I think I need, I just cannot seem to find a PHP implementation of it. I need to avoid solutions such as xml databases or anything that requires the hosting machine to install any additional software or change server config since this app is supposed to be a simple "webkit" that can run on any machine running PHP 5 without the need to fiddle about with server configuration. The idea is to just upload the xml file along with search and results php pages and bingo the hosting site has a simple search and results facility based on the data in the xml file.

 

Have tried xpath but had issues due possibly to the fact we use a namespace in our xml file, and the syntax never seemed to return the correct structure. Also we were unsure as to how we can build queries eg " select x from y where z = 1" etc. Hence would prefer to use xquery.

 

Hope I'm making sense. And I hope someone can point me in the right direction. Any help would be greatly appreciated as we have scratched our heads for a few weeks now!!!!

 

Thanks Jamie

Link to comment
https://forums.phpfreaks.com/topic/63864-querying-xml-files-using-xquery/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.