PDA

View Full Version : cannot get the username value


havey
07-20-2006, 10:38 PM
hi i have an xml fomatted like so:

<?xml...
<prop xmlns:xsi="http://www.w3.....
<code chainID="RK" companyID="DS" propertyID="1234">
<user username="test" password="test />
</code>
<rates>
<rate start=......
</prop>

the problem is that i cannot seem to get the username value. Any suggstions? this is what i have:


Set xmldoc = Server.CreateObject("Microsoft.XMLDOM")
xmldoc.async = False
xmldoc.load (Server.MapPath("onRes2.xml"))

strUsername = xmldoc.SelectSingleNode("/prop/code/user/@username").Value

response.write strUsername

havey
07-21-2006, 12:41 AM
got it figured:
Set objNode = objXML.SelectSingleNode("/property/code/user/@username")
If not objNode Is Nothing Then
strDayTemp = objNode.text
Set objNode = Nothing
End If

thanks!