Search

Your XML Importer, in /workspace/xml-importers/xml-importer.your-importer-name.php

The timeout doesn't make a different.

The problem is the hosting. As I upload the xml-file to another server it works. Partly solved now but still try to figure out what the reason is.

Perhaps they have an older version of LibXML installed?

The problem is in the path.

I'll make a simple test script with simplexml_load_file. When I use an url request to the xml-file it gives a parser error: Document is empty.

When I load the file with the absolute (server)path (dirname(__FILE__)."/workspace/funda/voorbeeld.wonen.xml") the file parses. But the same path doesn't work with the XML importer.

allow_url_fopen is on in the php.ini

EDIT the ISP did an upgrade to php 5.3.3 for the libxml and also disabled the allowurlfopen. The upgrade of libxml doesn't change the behaviour of the xml.

After upgrading to Symphony 2.3, the backend fails with a fatal error. It can’t find the Manager class that XMLImporterManager extends—this seems to have been deprecated?

After upgrading to Symphony 2.3

Yeah, I don't think XML Importer has been updated to work with 2.3 yet.

Will this extension be updated for Symphony 2.3?

Nick will be working on it today.

The unstable branch has a number of commits that should make it work, or come very close to working on 2.3.

I'm testing the unstable branch on Symphony 2.3 and saving an importer fails with this generic error:

An error occurred while processing this form.

I'm trying to import a Twitter feed. The Symphony log reveals an xpath validation error:

18 May 2012 17:31 > Warning: GenericErrorHandler 2 - DOMXPath::evaluate(): Invalid expression in file /Users/nilshoerrmann/Sites/Webseiten/durchgedreht24.de/extensions/xmlimporter/extension.driver.php on line 241

My xpath is quite simple //status or /statuses/status – which are both correct in my eyes but which both seem to fail.

I'm a bit stumped right now. Does anyone know what might be wrong here?

Try dumping out $expression around line 241 where the error occurs. Perhaps it is becoming malformed after entering it to the XML Importer config.

No, that doesn't seem to be an issue. The string looks just fine.

Reading through this thread validation seems to be a problem in some environments. There are no namespaces involved so this still doesn't make much sense …

I think the comments on php.net offer a solution, see https://github.com/symphonists/xmlimporter/issues/7.

Can /name() be used with the xml importer?

For example: I've like to to determine the kind of book. xml:

<bookstore>
 <novel>
  <title>A Book title</title>
   <author>The Author</Author>
  </novel>
 <comic>
   <title>A Comic title</title>
   <author> The Author</author>
</bookstore>

x-path:

bookstore/novel/name() | bookstore/comic/name()

Result: novel, comic

yes. :o)

How :-)

I get an 'error while processing this form' if my Xpath Expression contains name()

My Xpath is

Wonen/Appartement/name() | Wonen/Woonhuis/name() | OverigOG/name() | Bouwgrond/name()

The xml is attached

Attachments:
voorbeeld.wonen.xml

Can you post a screenshot of how your Importer is set up, preferably the part with the path, namespaces and fields...

Attached the screenshot

Attachments:
Symphony – XML Importers – Funda wonen.png

Thanks for the pic, your xpath is using node() not name() is that intentional?

The node() is because it otherwise gives the error.

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