I got the instance of WebNavigation using CreateInstanceByContractID method of 
nsIComponentManager.
Then I called LoadURI(...) method


r = docShell->LoadURI((const PRUnichar *) "http://www.yahoo.com";, nsIWebNavigation::LOAD_FLAGS_NONE, nsnull, nsnull, nsnull);


    nsCOMPtr<nsIDOMDocument> dom;
    docShell->GetDocument(getter_AddRefs(dom));

    nsCOMPtr<nsIDOMElement> domElement;
    dom->GetDocumentElement(getter_AddRefs(domElement));

Then I did a recursive loop to get all the nodes. I am getting only HEAD and 
BODY tag in the loop. Getting ChildNodes
of BODY node returns nsIDOMNodeList of size 0.

  Good question is can I get a sample code which is instantiating a 
nsIWebNavigation object and then using that to
load a web page, print the content of web page?

Thanx,
-- baliga


Boris Zbarsky wrote:
Yogish Baliga wrote:

I used nsIWebNavigation interface of "@mozilla.org/webshell;1" component. Using this interface is not
working.


It should work.  What doesn't work about it?

-Boris
_______________________________________________
mozilla-embedding mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-embedding

_______________________________________________
mozilla-embedding mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to