I am posting this as an idea - although I can't get it do do quite what you want. I have written an EventHandler to manipulate the XML recieved by XMLSpy (and all clients including the CME at this point)
using System;
using System.Text;
using System.Xml;
using Tridion.ContentManager.Extensibility.Events;
using Tridion.ContentManager.Extensibility;
using Tridion.ContentManager.ContentManagement;
using System.IO;
namespace UrbanCherry.Net.SDLTridion.EventHandlers
{
[TcmExtension("AppendAuthenticHeaders")]
public class AppendAuthenticHeaders : TcmExtension
{
public AppendAuthenticHeaders()
{
Subscribe();
}
public void Subscribe()
{
EventSystem.Subscribe<Component, LoadEventArgs>(AppendAuthenticHeader, EventPhases.Processed);
}
private void AppendAuthenticHeader(Component source, LoadEventArgs args, EventPhases phase)
{
if (source.ComponentType != ComponentType.Multimedia)
{
XmlDocument newXml = new XmlDocument();
newXml.LoadXml("<?altova_sps C:\\Users\\src\\sps\\2012\\spsfile.sps?>" + source.Content.OuterXml);
source.Content = newXml.DocumentElement;
}
}
}
}
I tried manipulating the output (by replacing a string), and it does show up in XMLSpy via WebDAV. The problem I have is that adding the processing instruction falls outside of the DocumentElement, so never makes it into the new XML.
So I know this does not solve your challenge - but perhaps someone else knows of an event which would allow you to append the instruction when the XML is loaded via the WebDAV cartridge in a similar manner.
Hope someone else can help you close this - I will dig a little more if I have time