Click here to Skip to main content
15,916,600 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: Binding an Xml file with a DropDown Control, URGENT!!!! Pin
Javier Lozano21-Jan-06 10:41
Javier Lozano21-Jan-06 10:41 
GeneralRe: Binding an Xml file with a DropDown Control, URGENT!!!! Pin
ajmal423-Jan-06 19:14
ajmal423-Jan-06 19:14 
GeneralRe: Binding an Xml file with a DropDown Control, URGENT!!!! Pin
naveen_sharma30-Jan-06 6:39
naveen_sharma30-Jan-06 6:39 
Questionrequire code using xsd file to validate xml file Pin
angel_yoyo19-Jan-06 14:48
angel_yoyo19-Jan-06 14:48 
Questionxml feed Pin
jphuphilly18-Jan-06 7:41
jphuphilly18-Jan-06 7:41 
AnswerRe: xml feed Pin
tarasn23-Jan-06 0:00
tarasn23-Jan-06 0:00 
QuestionXmlNamespaceManager.. Why? Pin
dmchappell18-Jan-06 5:44
dmchappell18-Jan-06 5:44 
AnswerRe: XmlNamespaceManager.. Why? Pin
Curtis Schlak.18-Jan-06 15:55
Curtis Schlak.18-Jan-06 15:55 
That's really a fair question and, unfortunately, I don't have a direct answer for you. However, I can tell you a couple of things about it....

Last year, I helped the Microsoft guys put together their Sarbanes-Oxley compliance solution. Internally, they had created the XnsDocument class, a namespace aware XmlDocument-like class that, when the document's content got loaded, parsed the namespaces and put them in the namespace manager.

On the other hand, having the Microsoft setup allows for you to hardcode your own prefixes so that you don't have to worry about the literal text in the document. Consider the following code. You have two XML packets whose namespace prefixes are different. However, the namespaces themselves are the same. So, you can define your own prefix and always make the call to SelectSingleNode/SelectNodes regardless of the namespace prefix.
string xml = @"<one xmlns:goo=""goo.com"" xmlns:foo=""foo.com""><foo:two /><goo:three /></one>";
XmlDocument doc = new XmlDocument();
doc.LoadXml( xml );
XmlNamespaceManager nm = new XmlNamespaceManager( doc.NameTable );
nm.AddNamespace( "floam", "goo.com" );
nm.AddNamespace( "bar", "foo.com" );
Console.WriteLine( doc.SelectSingleNode( "//bar:two", nm ).OuterXml );

xml = @"<one xmlns:mario=""goo.com"" xmlns:luigi=""foo.com""><mario:two /><luigi:three /></one>";
doc = new XmlDocument();
doc.LoadXml( xml );
nm = new XmlNamespaceManager( doc.NameTable );
nm.AddNamespace( "floam", "goo.com" );
nm.AddNamespace( "bar", "foo.com" );
Console.WriteLine( doc.SelectSingleNode( "//floam:two", nm ).OuterXml );


"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
GeneralRe: XmlNamespaceManager.. Why? Pin
dmchappell19-Jan-06 6:11
dmchappell19-Jan-06 6:11 
QuestionSQLXMLBULKLOAD Pin
mipooo17-Jan-06 19:21
mipooo17-Jan-06 19:21 
QuestionUsing XML/XSL to generate C++/C#/... structs/enums Pin
Andre xxxxxxx16-Jan-06 9:17
Andre xxxxxxx16-Jan-06 9:17 
AnswerRe: Using XML/XSL to generate C++/C#/... structs/enums Pin
Dustin Metzgar2-Mar-06 3:12
Dustin Metzgar2-Mar-06 3:12 
QuestionWhy won't this XML code work? URGENT HELP NEEDED!!! Pin
R0ssini12-Jan-06 11:50
R0ssini12-Jan-06 11:50 
AnswerRe: Why won't this XML code work? URGENT HELP NEEDED!!! Pin
R0ssini12-Jan-06 11:53
R0ssini12-Jan-06 11:53 
GeneralRe: Why won't this XML code work? URGENT HELP NEEDED!!! Pin
R0ssini12-Jan-06 11:56
R0ssini12-Jan-06 11:56 
GeneralRe: Why won't this XML code work? URGENT HELP NEEDED!!! Pin
R0ssini12-Jan-06 12:48
R0ssini12-Jan-06 12:48 
GeneralRe: Why won't this XML code work? URGENT HELP NEEDED!!! Pin
maheshfour30-Jan-06 0:58
maheshfour30-Jan-06 0:58 
AnswerRe: Why won't this XML code work? URGENT HELP NEEDED!!! Pin
Curtis Schlak.12-Jan-06 12:57
Curtis Schlak.12-Jan-06 12:57 
GeneralRe: Why won't this XML code work? URGENT HELP NEEDED!!! Pin
R0ssini12-Jan-06 13:03
R0ssini12-Jan-06 13:03 
GeneralRe: Why won't this XML code work? URGENT HELP NEEDED!!! Pin
Curtis Schlak.13-Jan-06 3:42
Curtis Schlak.13-Jan-06 3:42 
GeneralRe: Why won't this XML code work? URGENT HELP NEEDED!!! Pin
R0ssini13-Jan-06 14:48
R0ssini13-Jan-06 14:48 
GeneralRe: Why won't this XML code work? URGENT HELP NEEDED!!! Pin
Curtis Schlak.14-Jan-06 2:47
Curtis Schlak.14-Jan-06 2:47 
GeneralRe: Why won't this XML code work? URGENT HELP NEEDED!!! Pin
R0ssini12-Jan-06 13:45
R0ssini12-Jan-06 13:45 
GeneralHTML File Pin
R0ssini12-Jan-06 13:47
R0ssini12-Jan-06 13:47 
GeneralXML File Pin
R0ssini12-Jan-06 13:48
R0ssini12-Jan-06 13:48 

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.