web/ldt/utils/xml.py
author wakimd
Tue, 16 Nov 2010 14:15:07 +0100
changeset 9 22ab430e9b64
parent 1 3a30d255c235
permissions -rw-r--r--
Corrections on models and general structure
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
3a30d255c235 First version of API with tests
wakimd
parents:
diff changeset
     1
def getText(anode):
3a30d255c235 First version of API with tests
wakimd
parents:
diff changeset
     2
	nodelist = anode.childNodes
3a30d255c235 First version of API with tests
wakimd
parents:
diff changeset
     3
	rc = ""
3a30d255c235 First version of API with tests
wakimd
parents:
diff changeset
     4
	for node in nodelist:
3a30d255c235 First version of API with tests
wakimd
parents:
diff changeset
     5
		if node.nodeType == node.TEXT_NODE:
3a30d255c235 First version of API with tests
wakimd
parents:
diff changeset
     6
			rc = rc + node.data
3a30d255c235 First version of API with tests
wakimd
parents:
diff changeset
     7
	return rc