Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #88778
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'deployed': 0.07; 'attributes': 0.09; "client's": 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:Help': 0.11; ':-(': 0.16; 'from:addr:behnel.de': 0.16; 'from:addr:stefan_ml': 0.16; 'from:name:stefan behnel': 0.16; 'machine?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'skip:r 90': 0.16; 'stefan': 0.19; 'machine': 0.22; 'header:User- Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'installed': 0.27; 'feature': 0.29; 'work.': 0.31; 'that.': 0.31; 'larry': 0.31; 'running': 0.33; 'could': 0.34; 'subject:with': 0.35; 'received:84': 0.35; 'but': 0.35; '2.6': 0.36; 'set.': 0.36; 'searching': 0.37; 'so,': 0.37; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'much)': 0.84; 'upgrade,': 0.84 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Stefan Behnel <stefan_ml@behnel.de> |
| Subject | Re: Help with ElementTree |
| Date | Fri, 10 Apr 2015 13:32:21 +0200 |
| References | <CACwCsY4-3_7RBtx2LTLZ6pEAk-qW31XxeZz4aFVCmyK6f4Tong@mail.gmail.com> <mg6h07$uh$1@ger.gmane.org> <CACwCsY63BwubfhmNydzsu8Pg5qSKt6MJ_-N44hh0+yBSmZM7Sg@mail.gmail.com> <CACwCsY5vfpqGnYyCLi-7UVGNTm5VZbGddDPpW6UX+=cygUfUng@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | dslb-084-056-010-249.084.056.pools.vodafone-ip.de |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
| In-Reply-To | <CACwCsY5vfpqGnYyCLi-7UVGNTm5VZbGddDPpW6UX+=cygUfUng@mail.gmail.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.203.1428665552.12925.python-list@python.org> (permalink) |
| Lines | 17 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1428665552 news.xs4all.nl 2936 [2001:888:2000:d::a6]:43804 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:88778 |
Show key headers only | View raw
Larry Martell schrieb am 10.04.2015 um 12:49:
>> root.find("Doc/Node[@Name='Events']/Parameter[@Name='LastEventExportTime']/Value/Current").text
>> root.find("Doc/Node[@Name='SystemConfig']/Node[@Name='Environment']/Parameter[@Name='ToolName']/Value/Current").text
>
> So I tested this on a machine running 2.7, but then when I deployed it
> to my client's machine it did not work. Turns out they're running 2.6
> which I find does not support searching for attributes using the
> [@attribute] syntax. They do not want to upgrade, so I have to find a
> way to do this without using that. :-(
Do they, by any chance, have lxml installed on their machine? If so, you
could use that as a (pretty much) drop-in replacement for ElementTree, with
a substantially larger feature set.
Stefan
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Help with ElementTree Stefan Behnel <stefan_ml@behnel.de> - 2015-04-10 13:32 +0200
csiph-web