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)
convert from xml to xml
kellyrmilligan
I need to write a conversion script to scan through approx 300 dcr's, in different directories, and convert them into a new dcr format, aka using a different datacapture.cfg file. I am thinking that I should use teamsite::xmlparser, go through one file at a time, one node at a time, take the value, and convert each node in the file and put it into a new one in a new set of directories with the same file name. does this sound about right?
Kelly
Find more posts tagged with
Comments
Michael
One thing to remember will be to set the EA on your new file to the new DCT -- the TeamSite/Templating/DCR/Type attribute.
Cheers
Michael
MattP
yes it does. It is a fair amount of work. Depending on your requirements and specific situation, you could also use a tpl to convert your existing dcr into the new format. Applying the EA still applies.
Matt
Matthew Petitjean
BOC Group
Murray Hill, NJ 07974 USA
kellyrmilligan
do you have an example of the tpl solution, that sounds like it might be easier than the perl script...
thanks
Kelly
MattP
no I was crazy enough to do it in perl. The tpl should be pretty straight forward. Handle it just like any other. Write your new dct, then replace the blank areas with iw_value tags.
Matt
Matthew Petitjean
BOC Group
Murray Hill, NJ 07974 USA