Hi Nipper -Thank you for your reply - 1) Is generateHTML an ipl file that is called as part of the workflow?? 2) does: "run iwpt_compile attach all files in @generatedFiles to WF parase DCR for images and attach them set ea's" represent one iteration through the loop?? SO @generateHTML is reinitialized each time through the loop?Thank you again for your replies.....Craig
Quick question - Inside my gneratefiles.ipl, which is a step in the workflow, I need to read/parse the DCR's (the files the user selected before hitting submit) attached to the workflow in order to get to the images value. What is the best way to read the dcr into an xml string that can then be manipulated via DCRNode? I am looking through all of the doc, but am hitting a deadend - can you give a simple example of this functionality?Again - thank you so much for the pointers - this has been a real education!!Thanks,Craig
Go to GearUp and you will get a lot more of this.Write a function and put it as a PM on you system. You will need it a great deal. It will be something like this:[html]sub _getXML{ my ($file) = @_; open (XML, "$file") || die "Cannot open $file for reading:$!"; { local $/ = undef; $xml = ; } close(XML); return $xml;}[/html]
That will return the XML to a variable (say $xml)then you can use a regex like this:[html]my @images = ( $xml =~ m|(.*)|ig);[/html]That is if all of your image tags are named Image (there can be many within various levels of containers.This would be faster than using DCRNode.
What is the difference on the reading of the XML file except I forgot to use a my xml declaration at the beginning of the module ?