Forums / Developer / XML displays in Imported text

XML displays in Imported text

Author Message

Dominik Pich

Wednesday 24 March 2004 1:03:39 am

I wrote an import script to import any datatype - works even.
For text I use the text2xml class provided in the docs.
all seems well BUT

when I use
{$node.data_map.description.data_text}
I get
xmlns:xhtml=&apos;http://ez.no/namespaces/ezpublish3/xhtml/&apos; ><paragraph>Am Zuckerhut</paragraph></s xmlns:xhtml=&apos;http://ez.no/namespaces/ezpublish3/xhtml/&apos; > Am Zuckerhut

The xml is faulty AND therefore visible!
Any idea what to do!?

Paul Forsyth

Wednesday 24 March 2004 1:21:02 am

'data_text' contains the raw xml. use this to render the text as html:

{$node.data_map.description.content.output.output_text}

paul

Dominik Pich

Wednesday 24 March 2004 2:19:12 am

thank you :)

zurgutt -

Monday 24 October 2005 12:53:16 pm

I just had very similar problem with my xml import script, the output after import looked like

xmlns:xhtml='http://ez.no/namespaces/ezpublish3/xhtml/' ><paragraph><p>Some content here.</p></paragraph></sxmlns:xhtml='http://ez.no/namespaces/ezpublish3/xhtml/' >

Strangely enough that import code worked ok right up to version 3.6.0, the problem appeared in 3.6.2

The solution was a wild guess: in the beginning of text2xml code there is a section tag added around html data thus:

$inputData = "<section xmlns:image='http://ez.no/namespaces/ezpublish3/image/'
xmlns:xhtml='http://ez.no/namespaces/ezpublish3/xhtml/' >";

The error will disappear if the tag is written on one line, without linebreak in it.

Certified eZ developer looking for projects.
zurgutt at gg.ee