Frank Abel Cancio Bello <[EMAIL PROTECTED]> wrote:

> PrettyPrint or Print return the value to the console, and i need
> keep this  value in a string variable to work with it, how can i
> do this?

The second parameter to either of these functions can be a stream
object, so you can use a StringIO to get string output:

  from StringIO import StringIO
  from xml.dom.ext import Print

  buf= StringIO()
  Print(doc, buf)
  xml= buf.getvalue()

-- 
Andrew Clover
http://www.doxdesk.com/
mailto:[EMAIL PROTECTED]

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to