
Sorry my last email sent prematurely, I'm not sure how. I was using a hotkey for pasing when it accidently sent. I'm running Python version: 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:16:31) [MSC v.1600 64 bit (AMD64)] When I do a .findall or .find on an Element object of an ElementTree from xml.etree, xpath queries (of the format './/<tagname>') aren't letting me retrieve children that aren't direct descendants of the Element object. Also, the documentation doesn't clearly show/when how to use XPath queries, it just mentions that you can use them instead. A lot of python documentation is like this and it leads to a lot of tinkering and then frustration when it doesn't work. Stack overflow said the same solution, but really, I think it's sad when your documentation needs stack overflow for clarification. Documentation is by no means fast, but the depth should be better than a quick search on Google/Bing. This page is the one I used to read up on it. But I actually found better depth/examples in StackOverflow or the site of the guy that I think wrote Etree before you guys integrated it into Python. https://docs.python.org/3/library/xml.etree.elementtree.html?highlight=xml Thanks! -Eric

Hello Noonan, In general, I agree that docs could see improvement in listing examples. Specifically what was the bug in ET object’s .findall or .find ? Here I use the example listed in the docs and works fine for me. $ ./python.exe Python 3.4.3+ (3.4:3ded282f9615, Jun 17 2015, 06:05:20) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information.
Thanks, Senthil -- Senthil Kumaran On Tuesday, June 16, 2015 at 5:55 PM, Noonan wrote:

Actually the problem was on my end, XML <EVENT> <VmEventLog xmlns:auto-ns2='http://schemas.microsoft.com/win/2004/08/events' xmlns='http://www.microsoft.com/Windows/Virtualization/Events'> <VmName>b9be59fa-251f-4d76-bfa0-d9e682aad571</VmName><VmId>5B8C5EC7-D265-49E0-98E3-77D7E168AA06</VmId> </VMEventLog> </EVENT> The VMName tag is what I was trying to pull and the VMName tag implicitly has {http://www.microsoft.com/Windows/Virtualization/Events} prepended from the parent in its tag name, so instead of searching for VmName I had to call the api with { http://www.microsoft.com/Windows/Virtualization/Events}VmName. I guess that's a piece of XML I didn't pick up. I didn't know what the xmlns attribute does. Sorry. -Eric On Wed, Jun 17, 2015 at 9:10 AM, Noonan <noonanes@gmail.com> wrote:
participants (2)
-
Noonan
-
Senthil Kumaran