Tuesday 14 October 2008 5:02:40 pm
I am importing some data, and everything works well, with the exception of content with links in it. I am utilizing the following code to import ezxmltext.
$contentObjectID = $attribute->attribute( "contentobject_id" );
$parser = new eZSimplifiedXMLInputParser( $contentObjectID, false, 0, false );
$data = str_replace( "\r", '', $data );
$data = str_replace( "\n", '', $data );
$data = str_replace( "\t", ' ', $data );
$document = $parser->process( $data );
if ( !is_object( $document ) )
{
if($report)
{
echo 'Error in xml parsing';
}
return false;
}
$domString = eZXMLTextType::domString( $document );
$attribute->setAttribute( 'data_text', $domString );
$attribute->store();
When links are included in the $data variable it extracts the link and in the database I get the following:
<link url_id="27"> LINK TEXT REMOVED </link>
But in the link table there is no link with the id 27. Am I missing something?
|