我需要在创建它时将以下代码添加到XML文件的开头:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="colors.xslt"?>
Run Code Online (Sandbox Code Playgroud)
我确定有一种方法,但我还没有找到它.我正在使用C#.谢谢
Rub*_*ias 18
XmlDocument.CreateProcessingInstruction方法
public static void Main()
{
var doc = new XmlDocument();
doc.AppendChild(doc.CreateProcessingInstruction(
"xml-stylesheet",
"type='text/xsl' href='colors.xslt'"));
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7387 次 |
| 最近记录: |