all groups > dotnet xml > may 2005 >
You're in the

dotnet xml

group:

Inserting Processing Instruction


Re: Inserting Processing Instruction Martin Honnen
5/27/2005 12:00:00 AM
dotnet xml:


[quoted text, click to view]


[quoted text, click to view]

If you have a DOM XmlDocument then you can do it alike the following (C#
pseudo code)
XmlProcessingInstruction pi =
xmlDocument.CreateProcessingInstruction("xml-stylesheet",
"type=\"text/xsl\" href=\"whatever.xsl\"");
xmlDocument.InsertBefore(pi, xmlDocument.DocumentElement);

--

Martin Honnen --- MVP XML
Inserting Processing Instruction ledder77 NO[at]SPAM hotmail.com
5/27/2005 8:14:21 AM
Hi,
I need to find a way to insert a processing instruction to an xml
document after all the other nodes have been correctly added. That's
because I get an xml from a method that I can't modify and I need to
add a processing instruction in order to render the xml using a custom
xsl stylesheet.
Can anyone help me?
Thanks in advance
Francesco
Re: Inserting Processing Instruction ledder77 NO[at]SPAM hotmail.com
5/27/2005 8:54:30 AM
It worked fine!
thanks a lot
Francesco
AddThis Social Bookmark Button