I haven't been able to access the DOM at all. I've read the FAQ on Adam Lock's web site and it says I should be able to do some basic DOM stuff. (I want to extract text nodes from the document). The following is a small example that doesn't work. The Document Object if barely working.

This VB code:

    Dim doc As Object
    Dim strCat As String
    Dim nLen As Integer

    ' Moz is the name of the Mozilla control
    Moz.Navigate2 (edURL.Text)
    Set doc = Moz.Document
    strCat = Moz.LocationURL '    this returns the URL corectly
    nLen = doc.links.length

The last line doesn't work. 'doc' is initialized as an Object/IHTMLDocument2 but every property is contains returns an error. For example, if I put a watch on the following variables:

For 'doc'

body : <Application-defined or object-defined error> : IHTMLElement
bgColor : "" : Variant/String
links : <Application-defined or object-defined error> : IHTMLElementCollection


If I put a watch on 'Moz.Document', I get different, but still non functional results for most properties.

body : <Application-defined or object-defined error> : IHTMLElement
bgColor : "#ffffff" : Variant/String
links :  : IHTMLElementCollection/IHTMLElementCollection
links.length : <Automation error> : Long


The same code with the IE control works flawlessly. Are my to assume the it's my nightly distribution of the control that is buggy or is it something I'm not doing right?


Thanks
Alexandre Leduc





Reply via email to