private string RemoveTargetNamespace(string val) { string ts = targetNamespace; if ( ts.EndsWith("/")==false) { ts += "/"; } val = val.Replace(ts, ""); return val; }