Monday 11 December 2006 7:37:41 am
eZXML is driving me nuts. I'm trying to import our old site's content to eZ publish. I wrote a script to do that, anyhow eZSimplifiedXMLInputParser is not working properly and it's causing Fatal errors on some input. I tried to pass the HTML through tidy to fix the markup, things got better but still it's not working properly, maybe I should file this as a bug, here's the code snippet:
$parser = new eZSimplifiedXMLInputParser( $objectID );
$parser->setParseLineBreaks( true );
//example HTML
$body = '<a target="new" href="http://site.com" >Stock Exchange</a>';
$document = $parser->process($body);
This is causing PHP to exit with the following error: <b>Fatal error: Call to a member function on a non-object in D:\htdocs\mena\bin\php\text2xml.php on line 69</b> All I need is to convert HTML to ezXML, is there any script? I tried a few posted here and there, none worked
|