[XML-SIG] Parsing XML file with Minidom has problem with cr/lf

Peterson, Wayne WaynePeterson at SierraSystems.com
Sun May 9 08:43:09 CEST 2010

I am parsing an XML file with Python 2.6.5 minidom in Windows and it is
mostly working but minidom seems to have problems dealing with Windows
cr/lf characters. It creates an extra textnode that needs to be ignored
instead of just returning the xml elements. I have tried different
methods of opening the file but it doesn't seem to make a difference. It
is happiest when reading a file in Unix format.


Wayne Peterson | Consultant
Sierra Systems

(T): 403-264-0955 (C): 403-710-9248 (F): 403-233-2108

7th Floor, Canadian Centre

833 4th Avenue SW
Calgary, Alberta, T2P 3T5

Management Consulting | System Integration | Managed Services
website: www.SierraSystems.com

----Notice Regarding Confidentiality----
This email, including any and all attachments, (this "Email") is intended only for the party to whom it is addressed and may contain information that is confidential or privileged.  Sierra Systems Group Inc. and its affiliates accept no responsibility for any loss or damage suffered by any person resulting from any unauthorized use of or reliance upon this Email.  If you are not the intended recipient, you are hereby notified that any dissemination, copying or other use of this Email is prohibited.  Please notify us of the error in communication by return email and destroy all copies of this Email.  Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/xml-sig/attachments/20100508/06c29a8c/attachment.html>

More information about the XML-SIG mailing list