• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 243
  • Last Modified:

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).

0
czekmany
Asked:
czekmany
1 Solution
 
BorlandManCommented:

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

hth,
J
0
 
PolymorphicCommented:
if the html as xml data island you can get the XMLDom for that
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now