What causes nodeValue to be None?
Im trying to connect to facebook, my lack xml experiance with python is letting me down. Can anyone explain the following?
Gives the following:
Im trying to connect to facebook, my lack xml experiance with python is letting me down. Can anyone explain the following?
Code:
def getReply(self, params): req = urllib.urlopen(facebook.getURL(params)) tokenXML = req.read() req.close() print 'Raw data: ', tokenXML return tokenXML tokenXML = parseString(facebook.getReply(params)) token = tokenXML.getElementsByTagName('auth_createToken_response')[0] print 'toString: ', token print 'nodeValue: ', token.nodeValue
Code:
C:\Users\simon\Documents\Flash\air\fb++\server>server.py Raw data: <?xml version="1.0" encoding="UTF-8"?> <auth_createToken_response xmlns="http://api.facebook.com/1.0/" xmlns: xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="ht tp://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd">9 ea0d6592e0f761255e549fbd180443a</auth_createToken_response> toString: <DOM Element: auth_createToken_response at 0x2335328> nodeValue: None
Comment