Forums / Developer / XHTML to XMLData
Sébastien Morel
Tuesday 13 February 2007 7:42:25 am
Hello,
How transform a XHTML content to an XMLData content for the data_text field ?
I have generated a export XHTML of a attribute ezxmltext but I would to reimport this content in an Exponential.
But I can't convert my XHTML in XMLData for eZ. I try this :
$parser = new eZSimplifiedXMLInputParser( null, false, 0, false ); $attributeValue = str_replace( "\r", '', $buffer ); $attributeValue = str_replace( "\n", '', $buffer ); $attributeValue = str_replace( "\t", ' ', $buffer ); $document = $parser->process( $attributeValue ); $description = eZXMLTextType::domString( $document ); $attribute->setAttribute( 'data_text', $description ); $attribute->store();
In my XHTML content I have a h5 tag and after the import the h5 isn't convert in "header" tag..
Thanks for your help
Séb
-- eZ c'est plus fort que toi ! http://www.ez-france.org http://blog.plopix.net @Novactive (http://www.novactive.com)