I have to construct an XML document which has a SOAP envelope like so:
&
Try this
XNamespace soap = "http://schemas.xmlsoap.org/soap/envelope/"; XElement element = new XElement(soap + "Envelope", new XAttribute(XNamespace.Xmlns + "SOAP-ENV", soap), new XElement(soap + "Body"));