Oho! Thanks, Kent (and everyone else.) That clears up some things. The link has some embarassment reducing info as well. :-)<br><br><div><span class="gmail_quote">On 11/11/06, <b class="gmail_sendername">Kent Johnson</b> <
<a href="mailto:kent37@tds.net">kent37@tds.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">doug shawhan wrote:<br>> I'm having some difficulties with elementtree as well.
<br>><br>> I'm attempting to parse a fairly sizeable xml file (it's the ebay<br>> "category tree" report. I've cached a copy at<br>> <a href="http://www.crackrabbit.com/misc/CatTree.xml">http://www.crackrabbit.com/misc/CatTree.xml
</a>). 900K or so! :-)<br><br>> I've made a smaller version that I could easily get me brain around:<br>><br>> <?xml version="1.0" encoding="UTF-8"?><br>> <GetCategoriesResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<br>> <Timestamp>2006-11-07T07:45:40.908Z</Timestamp><br>> <Ack>Success</Ack><br>> <Version>485</Version><br>> <Build>e485_core_Bundled_3782281_R1</Build>
<br>> <CategoryArray><br>> <Category><br>> <BestOfferEnabled>true</BestOfferEnabled><br>> <CategoryID>6000</CategoryID><br>> <CategoryLevel>1</CategoryLevel>
<br>>
<CategoryName>eBay Motors</CategoryName><br>> <CategoryParentID>6000</CategoryParentID><br>> <Expired>false</Expired><br>> <IntlAutosFixedCat>false</IntlAutosFixedCat>
<br>> <LeafCategory>false</LeafCategory><br>> <Virtual>false</Virtual><br>> <ORPA>false</ORPA><br>> <LSD>true</LSD>
<br>> </Category><br>> </CategoryArray><br>> </GetCategoriesResponse><br>><br>> which also seems to parse cleanly and appears to be similar to what<br>> Asraramed had constructed, but still does not yeild any results no
<br>> matter which element I attempt to find with findall().<br>><br>> What am I doing wrong? Thanks!<br><br>When an XML document is in a namespase, ET includes the name of the<br>namespace as part of the element name and you have to include it when
<br>you use findall().<br><br>Try categories =<br>tree.findall("{urn:ebay:apis:eBLBaseComponents}CategoryArray")<br><br><a href="http://effbot.org/zone/element.htm#xml-namespaces">http://effbot.org/zone/element.htm#xml-namespaces
</a><br><br>Kent<br><br></blockquote></div><br>