Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
XML and perl
rossnoe
I need to create an xml file and be able to modify it in my tpl file. Basically everytime a dcr record is created I need to write some of the fields to an xml file. When someone updates the dcr I will need to update the xml file. Any ideas would be greatly appreciated?
Find more posts tagged with
Comments
chuckles
Not sure what you are having trouble with. You can put arbitrary Perl code into a TPL using <iw_perl> and then use some module like XML:
OM or XML:
imple to edit/update your XML file. I suggest you read the templating developer's guide and have a look here for ideas
http://search.cpan.org/modlist/String_Language_Text_Processing/XML
rossnoe
Thanks. I was wondering what kind of support exists in Teamsite to facilitate creating/modifying xml files. I've created and modified xml files extensively with vb and some scripting languages. I don't use perl much so I'm not sure where to begin there. I'll check the resources you mentioned. If anyone has any other resources or links feel free to pass them on.
Adam Stoller
Just a note of warning - you're probably going to need to figure out a way to handle file locking - so that you don't have two processes trying to update the same XML file at the same time.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
shanon
yep, i agree w/ fish... i would suggest taking the DB route if possible... if you must go XML, then file locking will certainly be required...
Shanon Levenherz
Mercer eBusiness Team
shanon.levenherz@mercer.com
http://www.mercerhr.com
Rohit
Thanks. It's important to keep that in mind. May go the database route if developing a file locking mechanism becomes and issue.