Re: How to Convert IO Stream to XML Document

2010-09-11 Thread naugiedoggie
On Sep 10, 12:20 pm, jakecjacobson jakecjacob...@gmail.com wrote: I am trying to build a Python script that reads a Sitemap file and push the URLs to a Google Search Appliance.  I am able to fetch the XML document and parse it with regular expressions but I want to move to using native XML

How to Convert IO Stream to XML Document

2010-09-10 Thread jakecjacobson
I am trying to build a Python script that reads a Sitemap file and push the URLs to a Google Search Appliance. I am able to fetch the XML document and parse it with regular expressions but I want to move to using native XML tools to do this. The problem I am getting is if I use

Re: How to Convert IO Stream to XML Document

2010-09-10 Thread Nitin Pawar
try using parse from string ... and try minidom.parse(StringIO.StingIO(string)).documentElement On Fri, Sep 10, 2010 at 9:50 PM, jakecjacobson jakecjacob...@gmail.comwrote: I am trying to build a Python script that reads a Sitemap file and push the URLs to a Google Search Appliance. I am

Re: How to Convert IO Stream to XML Document

2010-09-10 Thread Stefan Behnel
jakecjacobson, 10.09.2010 18:20: response = urllib2.urlopen(request) pageguts = response.read() xmldoc = minidom.parse(pageguts) Check the minidom docs, there's a parseString() function that does what it says. Also, don't forget to take a look at