From 339d04f659b97bce8cf90059e062b56bffb176d4 Mon Sep 17 00:00:00 2001 From: JSCHILL1 Date: Mon, 13 Apr 2009 11:40:33 -0500 Subject: [PATCH] Document why I didn't use ElementTree for now --- testscour.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testscour.py b/testscour.py index d1d511c..9c6c7a4 100755 --- a/testscour.py +++ b/testscour.py @@ -21,7 +21,10 @@ import unittest import scour import xml.dom.minidom -# helper function that performs a test on a given node and all its children +# I couldn't figure out how to get ElementTree to work with the following XPath +# "//*[namespace-uri()='http://example.com']" +# so I decided to use minidom and this helper function that performs a test on a given node +# and all its children # func must return either True (if pass) or False (if fail) def walkTree(elem, func): if func(elem) == False: return False