FileInfo FI = neues FileInfo (PathTextBox.Text);
XPathDocument xpdoc = neues XPathDocument (fi.FullName);
XslTransform componentTransform = neues XslTransform ();
componentTransform.Load (Path.Combine (di.FullName, „ComponentFile.xslt“));
Schnur outputComponentFile = Path.Combine (FI. Directory.FullName, Path.ChangeExtension (FI. Name, „xml“));
Kodierung utf8 = neues UTF8Encoding (falsch);
XmlTextWriter componentWriter = neues XmlTextWriter (outputComponentFile, utf8);
componentWriter.Formatting = Formatting.Indented;
componentWriter.WriteStartDocument ();
componentTransform.Transform (xpdoc, Null, componentWriter);
componentWriter.Close (); |