作者petrushka (不放过自己)
看板C_Sharp
标题Re: [问题] XmlTextWriter 一问
时间Thu Aug 14 11:18:35 2008
你要使用的是WriterProcessingInstruction() Method
其实你查看XmlTextWriter的Help就找到范例了
以下是撷取的范例
e.g.
//Write the XML delcaration.
writer.WriteStartDocument();
//Write the ProcessingInstruction node.
String PItext="type='text/xsl' href='book.xsl'";
writer.WriteProcessingInstruction("xml-stylesheet", PItext);
由<? ?>所包含的是Processing Instruction, 这是XML的相关规格你本身应该要知道才是
知道它是什麽东西, 自然可以很快地找到对应的Method
※ 引述《ireullin (raison detre)》之铭言:
: 请问一下在 XmlTextWriter 中
: 如何写入如下面第二行中决定读取xsl档的标签
: <?xml version="1.0" encoding="big5" ?>
: <?xml-stylesheet type="text/xsl" href="test.xsl" ?>
: 我使用了 WriteStartDocument
: 但是他只有写出
: <?xml version="1.0" encoding="big5" ?>
: 请各位提示一下该用哪个method
: 因为我试了几个都不行
--
对於已经无法拥有的
唯一能做的是
不要忘记
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.125.251.225
※ 编辑: petrushka 来自: 140.125.251.225 (08/14 11:18)