Click here to Skip to main content
15,890,506 members
Home / Discussions / C#
   

C#

 
AnswerRe: DirectDraw surfaces without DirectX Pin
CWIZO14-Feb-06 21:02
CWIZO14-Feb-06 21:02 
QuestionProblem With ToolBars Pin
Tyrus18214-Feb-06 16:26
Tyrus18214-Feb-06 16:26 
AnswerRe: Problem With ToolBars Pin
Joshua Quick14-Feb-06 17:34
Joshua Quick14-Feb-06 17:34 
QuestionTest a DIB for percentage of black pixels Pin
davidhart14-Feb-06 15:06
davidhart14-Feb-06 15:06 
Questionxml doc consumption with multiple namespaces -- corrected Pin
spin vector14-Feb-06 12:06
spin vector14-Feb-06 12:06 
AnswerRe: xml doc consumption with multiple namespaces Pin
Curtis Schlak.14-Feb-06 15:23
Curtis Schlak.14-Feb-06 15:23 
GeneralRe: xml doc consumption with multiple namespaces Pin
spin vector15-Feb-06 1:24
spin vector15-Feb-06 1:24 
GeneralRe: xml doc consumption with multiple namespaces Pin
Curtis Schlak.15-Feb-06 3:33
Curtis Schlak.15-Feb-06 3:33 
Your C# code must know the namespaces. The namespace prefixes are immaterial. The code that I submitted to you would work just as well if I made the following changes.
// Other stuff same as before
nm.AddNamespace("goobledygoobledygook", "foo");
XmlNode node = doc.SelectSingleNode("session/gateway/goobledygoobledygook:file", nm);
if(node != null)
  Console.WriteLine(node.OuterXml);
The prefixes are aliases, as you point out. However, to get to a node that belongs in another namespace, you will have to know to which namespace that node belongs. The file node, for example, lives in another namespace. Because of that, your C# code (and you!) will have to handle that.

If you don't want to deal with the namespaces, use a regular expression to remove all prefixes from the string representation (i.e., XML source) and put that into an XmlDocument.
GeneralRe: xml doc consumption with multiple namespaces Pin
spin vector15-Feb-06 10:36
spin vector15-Feb-06 10:36 
GeneralRe: xml doc consumption with multiple namespaces Pin
Curtis Schlak.15-Feb-06 15:23
Curtis Schlak.15-Feb-06 15:23 
Questionicon Pin
mostafa_h14-Feb-06 11:28
mostafa_h14-Feb-06 11:28 
AnswerRe: icon Pin
Andy Moore14-Feb-06 11:32
Andy Moore14-Feb-06 11:32 
GeneralRe: icon Pin
Expert Coming14-Feb-06 17:40
Expert Coming14-Feb-06 17:40 
GeneralRe: icon Pin
Andy Moore15-Feb-06 3:02
Andy Moore15-Feb-06 3:02 
GeneralRe: icon Pin
mostafa_h15-Feb-06 9:37
mostafa_h15-Feb-06 9:37 
QuestionPDF Pin
tabrez_0114-Feb-06 10:41
tabrez_0114-Feb-06 10:41 
QuestionArranging Toolbar window items in IE to a single row .. Pin
sreejnarayan14-Feb-06 10:37
sreejnarayan14-Feb-06 10:37 
QuestionUsing Remoting For Whole Application Pin
mk2014-Feb-06 10:00
mk2014-Feb-06 10:00 
AnswerRe: Using Remoting For Whole Application Pin
malharone14-Feb-06 10:24
malharone14-Feb-06 10:24 
QuestionOverriding DataGridViewColumnHeaderCell Pin
Wjousts14-Feb-06 9:48
Wjousts14-Feb-06 9:48 
QuestionQuestion on reflection Pin
malharone14-Feb-06 9:06
malharone14-Feb-06 9:06 
AnswerRe: Question on reflection Pin
leppie14-Feb-06 10:01
leppie14-Feb-06 10:01 
GeneralRe: Question on reflection Pin
malharone14-Feb-06 10:40
malharone14-Feb-06 10:40 
QuestionHow to Marshal a Native Struct Pin
Richard Andrew x6414-Feb-06 8:16
professionalRichard Andrew x6414-Feb-06 8:16 
AnswerRe: How to Marshal a Native Struct Pin
Richard Andrew x6414-Feb-06 8:27
professionalRichard Andrew x6414-Feb-06 8:27 

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.