So what I'm doing is using an XML document to determine the order in which some SQL scripts should run when updating the database.
XML follows this format
<ScriptRules> <Database databaseName = "string"> <Folder folderPath = "string" executeAllFiles = boolean> <file order="first or last">"Filename"</file> </Folder> </Database> </ScriptRules>
Thus, a class that executes all sql files in the database looks at this when its connection changes and executes files from folders depending on what the configuration file told it to.
Now my question is this:
Let's say that I have a document with four Database nodes, and each of them has n number of Folder nodes inside with a set of file nodes inside this.
Is it possible to assume that if inside the For Each loop over the Database nodes that I received in XElement using database.Elements("Database") , they will be pulled in the order in which they appear in the xml file? (same for file nodes)
As far as I could tell, this is true, but I just wanted to check before starting to use this in production databases.
msarchet
source share