A simple way to transform a client XML request into a format for use by the listening service.public Stream TransformRequest(Stream clientRequest){
formattedRequest = new MemoryStream();
XPathDocument myXPathDoc = new XPathDocument(clientRequest);
XslCompiledTransform myXslTrans = new XslCompiledTransform(); myXslTrans.Load(this.XsltPath); XmlTextWriter myWriter = new XmlTextWriter(formattedRequest, null); myXslTrans.Transform(myXPathDoc, null, myWriter); formattedRequest.Seek(0, SeekOrigin.Begin);
return formattedRequest;
}