XML question

Author Message

K C

Friday 16 September 2005 3:09:48 am

Hi,

I have 2 XML documents that I need to link with eachother.

The first thing I do is create a loop for every event

<events>
<event>
<eventid>111</eventid>
<placeid>5166</placeid>
...
<event>
<event>
...
</event>
</events>

When I have the placeid I create a loop to search the name in the place XML file (in the second file)

<places>
<place>
<placeid>3050</placeid>
<name>Placename1</nameNL>
</place>
<place>
<placeid>5156</placeid>
<name>Placename2</name>
</place>
...
</places>

But that takes a lot of time.

Is there a better solution to do this?

I use the ezXML class.

Best,

KC

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 19 2025 04:19:41
Script start
Timing: Jan 19 2025 04:19:41
Module start 'layout'
Timing: Jan 19 2025 04:19:41
Module start 'content'
Timing: Jan 19 2025 04:19:42
Module end 'content'
Timing: Jan 19 2025 04:19:42
Script end

Main resources:

Total runtime0.7459 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 589.0313152.6094
Module start 'layout' 0.00650.0029 741.640639.3984
Module start 'content' 0.00940.7350 781.0391402.9688
Module end 'content' 0.74440.0015 1,184.00788.2031
Script end 0.7459  1,192.2109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4243160.0002
Check MTime0.00140.1863160.0001
Mysql Total
Database connection0.00100.132210.0010
Mysqli_queries0.703594.3128460.0153
Looping result0.00050.0624440.0000
Template Total0.712695.520.3563
Template load0.00210.287320.0011
Template processing0.710595.246320.3552
Template load and register function0.00020.027110.0002
states
state_id_array0.00120.162810.0012
state_identifier_array0.00090.118220.0004
Override
Cache load0.00180.2363330.0001
Sytem overhead
Fetch class attribute can translate value0.00070.095610.0007
Fetch class attribute name0.00070.098710.0007
XML
Image XML parsing0.00010.015510.0001
class_abstraction
Instantiating content class attribute0.00000.000410.0000
General
dbfile0.00110.1450100.0001
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs