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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 22:24:06
Script start
Timing: Jan 18 2025 22:24:06
Module start 'layout'
Timing: Jan 18 2025 22:24:06
Module start 'content'
Timing: Jan 18 2025 22:24:06
Module end 'content'
Timing: Jan 18 2025 22:24:06
Script end

Main resources:

Total runtime0.0177 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 587.9141152.6250
Module start 'layout' 0.00610.0034 740.539139.4453
Module start 'content' 0.00940.0061 779.984489.4453
Module end 'content' 0.01560.0021 869.429734.3047
Script end 0.0177  903.7344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002614.6917140.0002
Check MTime0.00116.3522140.0001
Mysql Total
Database connection0.00116.212210.0011
Mysqli_queries0.002715.290930.0009
Looping result0.00000.101010.0000
Template Total0.00179.310.0017
Template load0.00094.868510.0009
Template processing0.00084.433610.0008
Override
Cache load0.00063.304010.0006
General
dbfile0.00147.630080.0002
String conversion0.00000.055240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs