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)
Trying to access DCR XML thru TPL
sabih
I have the following code using which I am trying to access the XML of DCR from the TPL file. I am trying to read the XML in one variable and then parse it later for future usage with in the TPL. I am however keep on getting "Could not process template" error.
$filename = iwpt_get_dcr_name("basename").".dcr";
$complete_path = "/ICT/main/Agent_Website/WORKAREA/Interactive_Marketing/templatedata/CTAs/Brand_CTA/data/";
$dcrfilename = $complete_path.$filename;
Use TeamSite::XMLparser;
open(DCR, "$dcrfilename") or die("$! Cannot open DCR");
local $/=undef;
my $xml = <DCR>;
close DCR;
my $parser = TeamSite::XMLparser->new();
my $rootnode = $parser->parse($xml);
my $job_status=$rootnode->value("Content");
Find more posts tagged with
Comments
gzevin
fix syntax errors first. 'Use' should be in lower case
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
Adam Stoller
Also - learn to properly scope the setting of $/ so that it doesn't affect anything other than what you want it to affect, and re-read the documentation regarding iwpt_get_dcr_name() - you're doing a lot of extra work there for (as far as I can see) no very good reason.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com