[XML-SIG] PrettyPrint question

Dave Kuhlman dkuhlman at cutter.rexx.com
Tue Oct 12 18:39:46 CEST 2004


On Tue, Oct 12, 2004 at 03:58:29PM +0100, Brian Reynolds wrote:
> Hi All,
> 
> I'm using the PrettyPrint function to print a XSD contained in a DOM
> tree. What I would like to do is ensure that the attributes are printed
> with the double-quotes instead of single quotes. 
> Is there any way of doing this? I'm using pyxml v0.8.3.
> 

What about trying the following:

    from xml.dom import minidom
    doc = minidom.parse('mydoc.xml')
    root = doc.documentElement
    print root.toprettyxml()

Dave


-- 
Dave Kuhlman
http://www.rexx.com/~dkuhlman


More information about the XML-SIG mailing list