Click to See Complete Forum and Search --> : Need a script (Windows) to apply xsl file to xml file and output a new xml file.


xslnewbie
05-21-2009, 04:20 PM
I'm not sure which forum this should go in, so please forgive me if I put it in the wrong place.

I'm an ABSOLUTE newbie with this stuff and I've fumbled my way through creating an xsl file to pick out the elements in an original xml file just the way I like it. .. YAY!

BUT NOW . . I really thought this would be the easy part . .

I need to automate this somehow. I need a script or something that I can use that will take an xml file, apply my xsl file to it and output a new xml file.

I've looked at so many types of scripting engines that last 2 days, I'm just getting myself completely frustrated!

Any help would be greatly appreciated and save my sanity!
THANKS

Charles
05-21-2009, 05:21 PM
I like Xalan (http://xml.apache.org/xalan-j/) but it can be a little tricky to get up and running. Another option is Saxon (http://saxon.sourceforge.net/) and both are available for free. There is also a way to build something using the Windows scripting host and MSXML but that's too annoying.

xslnewbie
05-22-2009, 05:04 PM
After monkeying around for another day and a half I did FINALLY get Xalan-Java working.

I had to screw around with my environment variables all day. I finally changed my home directory in Active Directory since I kept getting thrown back to my public folder on our fileserver. . . Ugh!

I fumbled, once again through this process but did finally end up with a new compiled Java app! My very first one! I'm so excited!!!!!

Now, my final challenge is. . . can I schedule this somehow to run as a Windows scheduled task?

Again . . THANK YOU SO MUCH FOR YOUR INPUT!!!!

Charles
05-23-2009, 08:27 AM
I warned you about Xalan. But you didn't have to compile one, there is already a command line version there for downloading.

To schedule in Windows open up the Control Panel and go to Scheduled Tasks.