Insert/update objects from an XML file

Author Message

Jason Filby

Friday 12 September 2003 1:46:01 pm

Hi, I need some help with insert/update of objects from an XML file.

Basically, the XML file will contain the objects to be inserted/updated, such as this:

<component name="kernel32.dll">
<function name="abc" implemented=true></function>
<function name="def" implemented=true></function>
</component>

The first time the XML file is parsed, it should create all the objects. "Component" and "function" specify the class in this example, with the rest of the attributes being data attributes for the class.

Subsequent runs would update objects that already existing in the ez db, or insert new ones if not found.

I have two questions conerning this:
· how much of the required functionality already exists, and where?
· any advice!

Thanks
Jason

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 31 2025 06:00:33
Script start
Timing: Jan 31 2025 06:00:33
Module start 'layout'
Timing: Jan 31 2025 06:00:33
Module start 'content'
Timing: Jan 31 2025 06:00:33
Module end 'content'
Timing: Jan 31 2025 06:00:33
Script end

Main resources:

Total runtime0.0161 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.0060 588.2500151.2266
Module start 'layout' 0.00600.0032 739.476636.6641
Module start 'content' 0.00920.0056 776.140686.0313
Module end 'content' 0.01480.0013 862.171929.9922
Script end 0.0161  892.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002213.8379140.0002
Check MTime0.00106.4801140.0001
Mysql Total
Database connection0.00116.728710.0011
Mysqli_queries0.003622.467130.0012
Looping result0.00000.074010.0000
Template Total0.00095.710.0009
Template load0.00074.363510.0007
Template processing0.00021.346910.0002
Override
Cache load0.00053.035810.0005
General
dbfile0.002515.717680.0003
String conversion0.00000.042940.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