)]}'
{"nova/api/openstack/wsgi.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"dbfbb17cf0b4a44e1ee7bfabad44cb7952412a98","unresolved":false,"context_lines":[{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def find_first_child_named_in_namespace(self, parent, namespace, name):"},{"line_number":248,"context_line":"        \"\"\"Search a nodes children for the first child with a given name\"\"\""},{"line_number":249,"context_line":"        for node in parent.getElementsByTagNameNS(namespace, name):"},{"line_number":250,"context_line":"            return node"},{"line_number":251,"context_line":"        return None"},{"line_number":252,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2F9Zk%3D","line":249,"updated":"2012-10-24 19:09:53.000000000","message":"My only concern with your use of getElementsByTagNameNS() is that I\u0027m wondering if it traverses the tree.  Consider a contrived XML document like so:\n\n    \u003cparent\u003e\n        \u003csomeChild\u003e\n            \u003cotherChild id\u003d\"grandchild\"/\u003e\n        \u003c/someChild\u003e\n        \u003cotherChild id\u003d\"child\"/\u003e\n    \u003c/parent\u003e\n\nWhat I want to confirm is that the first \u003cotherChild\u003e returned in the list (or generator) from getElementsByTagNameNS(\u003cparent\u003e) is going to be the one with id\u003d\"child\", not the one with id\u003d\"grandchild\", which comes earlier in the document.  I haven\u0027t looked up the documentation for this method yet, but it seems to me, based on what I know about XML parsers in general, that this method would actually traverse the document tree, and thus find_first_child_named_in_namespace() (and friends) would give us the wrong \u003cotherChild\u003e.\n\nCan you confirm that this won\u0027t happen?  For that matter, can you contrive a test, like my example above, that demonstrates that it does the right thing?","commit_id":"868cc16fe4a297a0b57d35a350e66301ac5be7de"}]}
