Dan Olsen
python at dan-olsen.net
Thu Jun 24 15:13:15 EDT 2004
That's a typo I used from xml.dom.minidom import parse, parseString I can get it to work if you just run it under python on my local machine. It's when I run it under mod_python I get the error: AttributeError: 'module' object has no attribute 'parse' Any other ideas of what could be wrong? Dan Manfred Stienstra declared on 06/24/2004 02:07 PM: >On Thu, 2004-06-24 at 00:42, Dan Olsen wrote: > > >>from mod_python import apache >>import xml.dom.minidom >>import urllib >> >>def crazy(req, url): >> sock = urllib.urlopen( url ) >> indata = sock.read() >> sock.close() >> dom = parse(indata) >> return "<html>PASS</html>" >> >> > > > >>Can anyone help me figure out what I am doing wrong? I have tried >>tweaking the code a little bit but with no luck. Is there some >>documentation out there that I can read about mod_python and parsing XML? >> >> > >The function parse is not defined. You probably want something like >xml.dom.minidom.parseString(indata). > >Manfred > >_______________________________________________ >Mod_python mailing list >Mod_python at modpython.org >http://mailman.modpython.org/mailman/listinfo/mod_python > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://modpython.org/pipermail/mod_python/attachments/20040624/027b1f9f/attachment.html
|