C#插入xml头和解析的xslt

//加上xml头
            objXml.InsertBefore(objXml.CreateProcessingInstruction("xml", "version=\"1.0\" encoding=\"utf-8\""), objXml.DocumentElement);
            //插入解析的xslt
            objXml.InsertBefore(objXml.CreateProcessingInstruction("xml-stylesheet", "type=\"text/xsl\" href=\"xslt/index.xsl\""), objXml.DocumentElement);  
            objXml.Save(SystemFramework.Config.WWWRoot + "index.xml");

你可能感兴趣的:(xml)