[Xerte] Re: export function failure in XOT, no zip generated

Paul Swanson Paul.Swanson at harlandfs.com
Wed Aug 22 15:34:12 BST 2012


I think it would need to be a preg_replace. Might be difficult to come up with a regex that didn't replace legitimate entities.

Laurent, glad it's working for you.

Paul Swanson
Internal Business Systems Analyst
Internal Business Intelligence
Harland Financial Solutions
(800) 274-7280 Ext. 2462
Paul.Swanson at harlandfs.com

-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Pat Lockley
Sent: Tuesday, August 21, 2012 4:26 PM
To: Xerte discussion list
Subject: [Xerte] Re: export function failure in XOT, no zip generated

Am not sure if we shouldn't string replace on the xml string?

On Tue, Aug 21, 2012 at 5:14 PM, Paul Swanson
<Paul.Swanson at harlandfs.com> wrote:
> The HTML entity for the & character is & or & -- you might try either of those. Sometimes it's just easier to use ' and '.
>
> Paul Swanson
> -----Original Message-----
> From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Laurent MATHIEU
> Sent: Tuesday, August 21, 2012 8:59 AM
> To: Xerte discussion list
> Subject: [Xerte] Re: export function failure in XOT, no zip generated
>
> Hi Pat,
>
> Thanks, this indeed helped in shedding some light on the error.
> I have made a few more tests and it seems that the export function doesn't like the '&' character. If you have such character in your XOT project's content, the export may fails with this kind of error:
>
> Warning: simplexml_load_file(): file:///C:/xampp/htdocs/xertetoolkits/USER-FILES/5-guest2-Nottingham/template.xml:1: parser error : EntityRef: expecting ';' in C:\xampp\htdocs\xertetoolkits\website_code\php\xmlInspector.php on line 26
>
> Warning: simplexml_load_file(): <li> Stratégiques : <i>ERP, R&D, CRM, …</i></li> in C:\xampp\htdocs\xertetoolkits\website_code\php\xmlInspector.php on line 26
>
> Warning: simplexml_load_file(): ^ in C:\xampp\htdocs\xertetoolkits\website_code\php\xmlInspector.php on line 26
>
> Fatal error: Call to a member function xpath() on a non-object in C:\xampp\htdocs\xertetoolkits\website_code\php\xmlInspector.php on line 28
>
>
> In the above example, I used the term "R&D". Any solution to avoid this symptom when using the character in question?
>
> Much appreciate your help on this.
>
> Thanks and regards,
> /L
>



More information about the Xerte mailing list