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(I ID_IHTMLDo cument2, (void**)&pDoc);
return pDoc;
}
This way i have the pointer to the html document (actually not the DOM, but doesnt matter).
IHTMLDocument2* GetpDoc()
{
IOleClientSite *pClientSite = NULL;
pClientSite = GetClientSite();
IOleContainer* pDocDisp = NULL;
pClientSite->GetContainer(
IHTMLDocument2* pDoc = NULL;
pDocDisp->QueryInterface(I
return pDoc;
}
This way i have the pointer to the html document (actually not the DOM, but doesnt matter).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't think you can get at this information through an HTMLDocument. You can parse xmldocuments using the MsXML parser.
hth,
J