Reputation: 1
I am working with an xml document I need to manipulate it add elements delete element retrieve data etc...
I am using DOMDocument but better suggestions was to use XQuery, I want a way to use XQuery inside symfony any suggestions ? I tried using DOMDocument and heard about Crawler that I don't fully understand if it makes possible to use XQuery
Upvotes: 0
Views: 36
Reputation: 563
I think the simple answer is NO.
Your question is a bit misleading. If you do not want to install a separate package, then xquery would have to be supported by php. xquery 1.0 and xpath 2.0 share the same data model, operators and functions See: W3Schools
PHP only supports xpath 1.0. A request to implement xpath 2.0 was denied See: Bug Report
There may be some community projects, but I could not find any.
However, you can look into the XPathDom class from php. It supports xpath 1.0. Maybe that will make your task easier.
Upvotes: 0