|
-
Feb 20th, 2002, 07:25 AM
#1
Thread Starter
Hyperactive Member
Empty NodeList
Why is it that the following NodeList gets 'created' properly, but doesn't have the single node I'd expect (i.e. why is NodeList.length = 0 and not = 1)
VB Code:
Private Sub Form_Load()
Dim oDOM As New DOMDocument40
Dim oDOMFrag As IXMLDOMDocumentFragment
Dim oNodeList As IXMLDOMNodeList
Dim oNode As IXMLDOMNode
Dim oDocEl As IXMLDOMElement
Dim oElem As IXMLDOMElement
Dim oSel As IXMLDOMSelection
Dim bRet As Boolean
Dim lLen As Long
oDOM.async = True
bRet = oDOM.loadXML("<LogicalPair True=""Active"" False=""Inactive"">Active :: Inactive</LogicalPair>")
If (bRet) Then
Set oDocEl = oDOM.documentElement
Set oNodeList = oDocEl.getElementsByTagName("LogicalPair")
lLen = oNodeList.length
Set oNode = oNodeList.Item(0)
End If
End Sub
      
Dan
Outside of a dog, a book is a man's best friend.
Inside of a dog, it's too dark to read.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|