how to convert plain text to ezxml?

Author Message

zurgutt -

Wednesday 30 March 2011 4:47:14 am

I have plain text (email contents) that php script should import into ezxml. How to do it so that it would display roughly the same as result? I guess this basicly just means converting \n to paragraph breaks? Is there convenient functions for this?

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

Marko Žmak

Thursday 31 March 2011 2:02:07 am

As far as I know, there's no such helper function in eZP (not 100% sure though), but that can easily be done using the preg_replace() php function.

Also take a look at this useful tutorial:

  • http://share.ez.no/learn/ez-publish/creating-ez-publish-objects-in-php

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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 15:07:07
Script start
Timing: Jan 18 2025 15:07:07
Module start 'layout'
Timing: Jan 18 2025 15:07:07
Module start 'content'
Timing: Jan 18 2025 15:07:07
Module end 'content'
Timing: Jan 18 2025 15:07:07
Script end

Main resources:

Total runtime0.0149 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.0051 589.3516152.6250
Module start 'layout' 0.00510.0020 741.976639.4688
Module start 'content' 0.00710.0058 781.445389.4453
Module end 'content' 0.01300.0019 870.890630.2891
Script end 0.0148  901.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002315.4367140.0002
Check MTime0.00106.6826140.0001
Mysql Total
Database connection0.00074.939410.0007
Mysqli_queries0.002013.262630.0007
Looping result0.00000.121810.0000
Template Total0.001510.210.0015
Template load0.00095.787010.0009
Template processing0.00074.381910.0007
Override
Cache load0.00064.348210.0006
General
dbfile0.002114.187180.0003
String conversion0.00000.041740.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