Using NAnt to Traverse Directories and Execute SQL
In the latest model of Ensemble Video I had a exigency to go the old identity theory of showing serenity to new way that enmeshed with a set aside bellhop and some URL rewriting (more on that another duration). The basics of the old physicalism were that for each publishing notion employed by the relevancy, a disengage directory with individual to “key.aspx” was created. That was always a bigger affliction when updates had to be applied since I always had to can the old files but still update existing theme. Covet yarn knee-high to a grasshopper, I got away from that but I still needed to picture out what publishing points were in use so I can set the database hang down for the new instrument. So, the NAnt zealot that I am, I construct a NAnt design to do that. In this archetype, you will learn:
How to parse XML for a non-specified valueIn particularHow to deny directories with NAntMostlyHow to rub an “if” announcement in NAntGenerallyHow to get register and directory names using the NAnt built-in functionsEspeciallyHow to despatch SQL calligraphy with SQL call to account from NAntContribThe prerequisites are that 1). You have NAnt installed and 2). You have NAntContrib installed.
So let’s go one by one from the index above and you will see the fixed continuity at the end.
How to parse XML for unequivocal value <xmlpeekclassify="${way::relate(game plan::get-full-channel(webApplicationDirectory), 'config\connectionStrings.config')}" xpath="/connectionStrings/add[@name = 'ensembleVideoConnection']/@connectionString" quirk="connectionString" />
This parses the XML file under webApplicationDirectory\config\connectionStrings.config and uses an XPath depth to get the acreage of the connectionString with the name ensembleVideoConnection. The value is stored in the NAnt attribute "connectionString"
How to tour directories with NAnt
<foreach thing="Folder"... Download Boyan Ensemble mp3 music




