Thanks for reply; my code goes like this
docMessage is input XML Document; it has 2 namespaces
docOut is output XML document
XmlNamespaceManager nsmanager = new
XmlNamespaceManager(docMessage.NameTable);
nsmanager.AddNamespace("ns1", "http://Authorisation.ContextSchema");
nsmanager.AddNamespace("ns0", "http://Authorisation.RequestSchema");
nsmanager.AddNamespace("", "http://Authorisation.ContextSchema");
XmlNode nodeContext =
docMessage.SelectSingleNode("//ns1:Context",nsmanager);
if (nodeContext != null)
{
docOut.InnerXml =
docMessage.SelectSingleNode("//ns1:Context",nsmanager).OuterXml;
//This is to remove namespace added by namespace manager
docOut.InnerXml = docOut.InnerXml.Replace("
xmlns=\"x-schema:#Schema1\"","");
}