Search

When using EntryManager->fetch() to grab entry data as Entry objects, how can I put them into either an XMLElement or DOMDocument object so that I can use Xpath on them in PHP?

I would have used Nick's SymQL which does this by default, but it's not handling multiple where values in this case.

You need to create this yourself. EntryManager returns an array of Entry objects so you need to loop over and build XMLElement objects, like:

https://github.com/nickdunn/symql/blob/master/lib/class.symql.php#L322-343

I would have used Nick's SymQL which does this by default, but it's not handling multiple where values in this case.

Shame, sounds like this is a blocking bug :-/

Great - thanks for the example, Nick.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details