Re: Processing mutiple files in multiple directories
On Thu, 2011-03-17 at 17:00 -0700, Mark wrote: > I am using XSLT 2.0. > > I have several hundred XML data files stored in a number of directories each > with subdirectories of their own that descend to various levels. From them, > I need to locate 137 specific files and make editing changes to each. I > believe I can write the template that can determine if a specific XML file > requires editing or not, and if so to then apply the editing change. If this happens often, I'd look into using XQuery with updates. If it's a one-off, or if you want to use XSLT :-), or if it's done often but the files are new or changed, maybe use lstoxml to make an XML document that reflects the directory structure, and process that. You may find it simpler to process all the files and then at the end, outside XSLT, move the new directory hierarchy into place. That way if something goes wrong you don't lose data. Or, you're much less likely to lose data :-) (especially with a journalling filesystem). Liam
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format