[XML-SIG] xml.dom.minidom question

Uche Ogbuji uche.ogbuji at fourthought.com
Fri Jul 23 20:33:21 CEST 2004


On Wed, 2004-07-21 at 19:00, Hashemian, Mehdi wrote:
> Hello,
>  
> I apologize if I am sending my question to the wrong email list.

It's the right list.

> I am trying to copy a node and its children from one XML document to
> another one. I clone the node from document A and then append it to
> the
> root node in document B. If I have elements of copied node in document
> A
> correctly indented with '\n', in the new document, for each new line I
> have three new lines. When I remove the new Lines from document A,
> every
> thing looks fine in document B.
>  
> I use toprettyxml function to print document to a file.
> I use xml.dom.minidom module in python 2.2.2 on Red Hat 9.0.

So is your problem with the actual composition of cloned text nodes, or
with the way they're handled by prettyprint?  You may want to show some
code in order to clarify the problem for anyone who can help you.


-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Perspective on XML: Steady steps spell success with Google - http://www.adtmag.com/article.asp?id=9663
Use XML namespaces with care - http://www-106.ibm.com/developerworks/xml/library/x-namcar.html
Managing XML libraries - http://www.adtmag.com/article.asp?id=9160
Commentary on "Objects. Encapsulation. XML?" - http://www.adtmag.com/article.asp?id=9090
A survey of XML standards - http://www-106.ibm.com/developerworks/xml/library/x-stand4/



More information about the XML-SIG mailing list