RysChwith
10-14-2004, 11:53 AM
The ASP page I'm working on keeps throwing this error: "Object doesn't support this property or method"
The line it references is this: "While xmlNode <> NULL". I have no idea why this line would be throwing this error, as there is no property or method being called.
The full sub:
Sub buildBox( name )
Dim xmlNode 'used to get a particular node
For Each xmlItem In xmlNodes
Set xmlNode = xmlItem.firstChild
While xmlNode <> NULL
If xmlNode.name = name Then
Response.Write "<option"
If Request( "submit" ) Then
If xmlNode.text = Request( name ) Then
Response.Write " selected"
End If
End If
Response.Write ">" & xmlNode.text & "</option>" & vbNewline
End If
xmlNode = xmlNode.nextSibling
Wend
Next
End Sub
The purpose of this sub is to read in the elements of an XML file and build select boxes from all the elements of a given name (there can be multiple entries per record with this name). xmlNodes is declared elsewhere on the page, and is an array that contains all the XML nodes from the document.
Oh, and if I remove the word "Set" from the declaration, than that line shows as the error (same error).
Any thoughts?
Rys
The line it references is this: "While xmlNode <> NULL". I have no idea why this line would be throwing this error, as there is no property or method being called.
The full sub:
Sub buildBox( name )
Dim xmlNode 'used to get a particular node
For Each xmlItem In xmlNodes
Set xmlNode = xmlItem.firstChild
While xmlNode <> NULL
If xmlNode.name = name Then
Response.Write "<option"
If Request( "submit" ) Then
If xmlNode.text = Request( name ) Then
Response.Write " selected"
End If
End If
Response.Write ">" & xmlNode.text & "</option>" & vbNewline
End If
xmlNode = xmlNode.nextSibling
Wend
Next
End Sub
The purpose of this sub is to read in the elements of an XML file and build select boxes from all the elements of a given name (there can be multiple entries per record with this name). xmlNodes is declared elsewhere on the page, and is an array that contains all the XML nodes from the document.
Oh, and if I remove the word "Set" from the declaration, than that line shows as the error (same error).
Any thoughts?
Rys