Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'tree': 0.05; '"""': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'skip:f 70': 0.09; 'subject:Help': 0.11; 'python': 0.11; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'subject:issue': 0.16; 'wrote:': 0.18; 'import': 0.22; 'header:User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'tried': 0.27; 'idea': 0.28; 'feature': 0.29; 'code': 0.31; 'values.': 0.31; 'false': 0.36; 'doing': 0.36; 'method': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'list': 0.37; 'expected': 0.38; 'to:addr:python-list': 0.38; 'url:schemas': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'skip:x 10': 0.40; 'here': 0.66; 'sir,': 0.81; 'truck': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Peter Otten <__peter__@web.de> Subject: Re: Jython or Pyton issue-- Kindly Help me.... Date: Wed, 15 Oct 2014 11:04:12 +0200 Organization: None References: <91eb3378-958d-45e0-8741-a800ae681260@googlegroups.com> <552277f6-fb5b-44de-a0d4-7c7fe480d265@googlegroups.com> <0c8200cc-5ae7-4fd9-9dd6-903802fc5bb7@googlegroups.com> <9266b258-3ee0-4f98-88ee-9849ac9abb2b@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: p57bd904a.dip0.t-ipconnect.de User-Agent: KNode/4.13.3 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 99 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1413363868 news.xs4all.nl 2949 [2001:888:2000:d::a6]:42003 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:79144 Venugopal Reddy wrote: > Thanks for Help Sir, > > Am using " for feature in tree.findall( > ".//{urn:ford/interface/VehicleOrder/LegacyFeatureMapping/v2}PortInstalledOptionFeature"): > ) " > > Please sir help me > > Here also this findall Method is not return any list values. OK, I tried it: $ cat xml_werscode.py from xml.etree import ElementTree as ET data = """ 13001 2014 12 178 W78 41859 0 B 181 LIGHT TRUCK WHEELBASES P AA5 15615 AA5K8 178 /4521MM WHEELBASE false false 181 LIGHT TRUCK WHEELBASES P AA5 15615 AA5K8_second time 178 /4521MM WHEELBASE false false 13001 2014 12 190 W90 41860 0 B 181 LIGHT TRUCK WHEELBASES P AA5 15616 AA5MA 190 /4826MM WHEELBASE false false """ tree = ET.fromstring(data) for feature in tree.findall( ".//{urn:ford/interface/VehicleOrder/LegacyFeatureMapping/v2}PortInstalledOptionFeature"): code = feature.find(".//{urn:ford/VehicleOrder/LegacyFeatureMapping/v2.0}WersCode") print(code.text) $ python xml_werscode.py AA5K8 AA5MA As you can see I do get the expected output. I am sorry I have no idea what you might be doing wrong.