Link to home
Start Free TrialLog in
Avatar of czekmany
czekmany

asked on

XML DOM access

I wrote an ActiveX controller to manipulate the html pages in the browser. I can access the html DOM, but now i wannt to acess the XMLDOM to be able to use Xpath expressions to manipulate the page. So the question: can I access the XMLDOM of the page in the browser like i did it wiht the htmlDOM:

IHTMLDocument2* GetpDoc()
{
     IOleClientSite *pClientSite = NULL;
     pClientSite = GetClientSite();
     IOleContainer* pDocDisp = NULL;
     pClientSite->GetContainer(&pDocDisp);
     IHTMLDocument2* pDoc = NULL;
     pDocDisp->QueryInterface(IID_IHTMLDocument2, (void**)&pDoc);
     
        return pDoc;
}
This way i have the pointer to the html document (actually not the DOM, but doesnt matter).

Avatar of BorlandMan
BorlandMan


I don't think you can get at this information through an HTMLDocument. You can parse xmldocuments using the MsXML parser.

hth,
J
ASKER CERTIFIED SOLUTION
Avatar of Polymorphic
Polymorphic

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial