web/ldt/utils/xml.py
author veltr
Fri, 04 Oct 2013 16:01:38 +0200
changeset 103 b9a417017e19
parent 0 ecdfc63274bf
permissions -rw-r--r--
Simulate click on favorite star
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
ecdfc63274bf first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
def getText(anode):
ecdfc63274bf first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
	nodelist = anode.childNodes
ecdfc63274bf first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
	rc = ""
ecdfc63274bf first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
	for node in nodelist:
ecdfc63274bf first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
		if node.nodeType == node.TEXT_NODE:
ecdfc63274bf first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
			rc = rc + node.data
ecdfc63274bf first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
	return rc