Loading XML from CPP

"jmp" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xml
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
Right...

 I've got my facts wrong. This code works fine with Mozilla 1.4.2 and 1.7.2.

 However, and this is why I got confused: I have put this code into an XPCOM Compoment. If the XPCOM component is loaded from a XUL dialog: everything is cool... but if this is loaded from a JS started with xpcshell, then it doesn't quite work anymore. Actually, the document loading work, but I cannot query anything using nsIDOMXPathEvaluator...

 any ideas ???

 Thanks

  

   nntp://news.mozilla.org/netscape.public.dev.xml/<[email protected]>

 Hi,
 
 What is the best/recommended way of loading XML from a cpp mozilla application?
 
 {
 NS_DEFINE_CID(kXMLDocumentCID, NS_XMLDOCUMENT_CID);
 nsCOMPtr<nsIDOMXMLDocument> pXMLDoc;
 do_CreateInstance(kXMLDocumentCID, &rv);
 pXMLDoc->SetAsync( false );
 PRBool retval = false;
 NS_NAMED_LITERAL_STRING(url , "http://mysite/myxml" );
 pXMLDoc->Load( url , &retval );
 }
 
 Seems to work, but then when I use the nsCOMPtr<nsIDOMXPathEvaluator> to query the XML node, I always get an empty result set(stepped down to no document owner....) So i assume this is not the way to do it anymore (used to work with Mozilla 1.4.2, but not with mozilla 1.7.2).
 
 What is the best/recommented practice to do this ?
 
 Thanks
 
 JM
 
 
 
 
 
 [netscape.public.dev.xml]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.