Friday 30 July 2004 3:40:38 am
include_once( "kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmlinput.php" );
$simplifiedXMLInput = new eZSimplifiedXMLInput( $dumpdata, null, null );
$address = "<line>bjoern dieding</line><line>asdasdasd</line><line>Germany</line>";
$bodyData = "<section xmlns:image='http://ez.no/namespaces/ezpublish3/image/' xmlns:xhtml='http://ez.no/namespaces/ezpublish3/xhtml/' xmlns:custom='http://ez.no/namespaces/ezpublish3/custom/' >";
$bodyData .= "<paragraph>";
$bodyData .= $address;
$bodyData .= "</paragraph>";
$bodyData .= "</section>";
$Data = $simplifiedXMLInput->convertInput( $bodyData );
$xml = $Data[0]->toString();
var_dump($xml);
$data_map['address']->setAttribute( 'data_text', $xml );
$data_map['address']->store();
What is the best way to turn any type text into the content of a xml text field? I don't wanna have all the tags in my code! Any ideas?
Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/
|