Click here to Skip to main content
15,888,984 members
Home / Discussions / C#
   

C#

 
GeneralRe: Strange TypeLoadException Pin
Anonymous5-May-04 7:47
Anonymous5-May-04 7:47 
GeneralRemoving event listeners on IHTMLDocument2 objects Pin
agking5-May-04 5:56
agking5-May-04 5:56 
GeneralDLL Help Pin
goldoche5-May-04 5:54
goldoche5-May-04 5:54 
GeneralRe: DLL Help Pin
Heath Stewart5-May-04 6:59
protectorHeath Stewart5-May-04 6:59 
GeneralXmlDocument, SOAP& Namespaces Pin
MrEyes5-May-04 5:40
MrEyes5-May-04 5:40 
GeneralRe: XmlDocument, SOAP& Namespaces Pin
Heath Stewart5-May-04 5:44
protectorHeath Stewart5-May-04 5:44 
GeneralRe: XmlDocument, SOAP& Namespaces Pin
MrEyes5-May-04 5:58
MrEyes5-May-04 5:58 
GeneralRe: XmlDocument, SOAP& Namespaces Pin
Heath Stewart5-May-04 7:10
protectorHeath Stewart5-May-04 7:10 
If you select a node using the XmlDocument instead of the DocumentElement, you must use a beginning "/" which uses a scope from the root element. The following sample works fine:
using System;
using System.Xml;

public class Test
{
  static void Main()
  {
    XmlDocument doc = new XmlDocument();
    doc.Load("Test.xml"); // Just a document with your data in my sample.

    XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc.NameTable);
    nsmgr.AddNamespace("soap", "http://schemas.xmlsoap.org/soap/envelope/");
    nsmgr.AddNamespace("l", "http://www.domain.com/EP/");

    XmlNode logonNode = doc.SelectSingleNode(
      "/soap:Envelope/soap:Body/l:Logon", nsmgr);
    if (logonNode != null)
    {
      foreach (XmlNode child in logonNode.ChildNodes)
        Console.WriteLine("{0}: {1}", child.Name, child.InnerText);
    }
  }
}


 

Microsoft MVP, Visual C#
My Articles
GeneraldataGridTextBoxColumn textBox Pin
blankg5-May-04 5:16
blankg5-May-04 5:16 
Generalc# Listbox help Pin
John Baird5-May-04 4:48
John Baird5-May-04 4:48 
GeneralRe: c# Listbox help Pin
Heath Stewart5-May-04 4:59
protectorHeath Stewart5-May-04 4:59 
GeneralRe: c# Listbox help Pin
John Baird5-May-04 9:21
John Baird5-May-04 9:21 
GeneralRe: c# Listbox help Pin
Heath Stewart5-May-04 9:31
protectorHeath Stewart5-May-04 9:31 
GeneralCreating & Using DLL's Pin
Lakshmikanthan5-May-04 4:42
Lakshmikanthan5-May-04 4:42 
GeneralRe: Creating & Using DLL's Pin
Heath Stewart5-May-04 4:55
protectorHeath Stewart5-May-04 4:55 
GeneralDiffgrams and Web Services Pin
MrJJKoolJ5-May-04 3:51
MrJJKoolJ5-May-04 3:51 
GeneralRe: Diffgrams and Web Services Pin
Heath Stewart5-May-04 4:13
protectorHeath Stewart5-May-04 4:13 
GeneralRe: Diffgrams and Web Services Pin
MrJJKoolJ5-May-04 5:08
MrJJKoolJ5-May-04 5:08 
GeneralRe: Diffgrams and Web Services Pin
Heath Stewart5-May-04 5:16
protectorHeath Stewart5-May-04 5:16 
GeneralRe: Diffgrams and Web Services Pin
MrJJKoolJ5-May-04 5:23
MrJJKoolJ5-May-04 5:23 
GeneralRe: Diffgrams and Web Services Pin
Heath Stewart5-May-04 5:25
protectorHeath Stewart5-May-04 5:25 
GeneralRe: Diffgrams and Web Services Pin
MrJJKoolJ5-May-04 5:51
MrJJKoolJ5-May-04 5:51 
GeneralRe: Diffgrams and Web Services Pin
Heath Stewart5-May-04 7:13
protectorHeath Stewart5-May-04 7:13 
Generalsharing new Instance of class across the application Pin
Adi Narayana5-May-04 3:08
Adi Narayana5-May-04 3:08 
GeneralRe: sharing new Instance of class across the application Pin
Stefan Troschuetz5-May-04 3:32
Stefan Troschuetz5-May-04 3:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.