A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-September/037989.html below:

[Python-Dev] memory related issues in Python

[Python-Dev] memory related issues in Python - bug?? [Python-Dev] memory related issues in Python - bug??Mallick, Pinki pinki_mallick at mentorg.com
Tue Sep 9 12:25:18 EDT 2003
Hi,

I have a very big XML file that I am trying to parse using xml.dom and xml.dom.minidom. This file has around 100 nodes. Each of these nodes(say 'child_X') have a number of child nodes and each of these child nodes in turn has a text node as its child. So when I try to retrieve all the data from each 'child_X' node, I use this code, 

grandChildren = child_X.childNodes()
for grandChildNode in grandChildren:
	equation = equation + str(grandChildNode.firstChild.data)


This works properly for all files. But when I am trying to use it on a very large XML file, one of the node's data is incomplete. eg. if grandChildNode.toxml() returns "<mi>y18</mi>" for this node, then "str(grandChildNode.firstChild.data)" returns only "y" instead of "y18".

This looks like some memory problem. Is there any workaround for this problem.

Thanks for any suggestion or help,
Pinki Mallick

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4