Let me get this straight. 1st run through: temp.xml does not exist, we go into the first section.
2nd run through: temp.xml exists from the previous transformation, we go into the 2nd section.
You call this function twice, with different values for xsltInput.
Instead of in the first section
Code: ( text )
-
xslt.Transform(@"c:\student.xml",@"c:\output.xml")
-
File.Copy(@"c:\output.xml", @"c:\temp.xml");
-
File.Delete(@"c:\output.xml");
Why not just:
Code: ( text )
-
xslt.Transform(@"c:\student.xml",@"c:\temp.xml")
We already know the file doesn't exist.
---
2nd run through. Why are we copying the result back to temp.xml? Don't we want it in C:\output.xml now?