Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3a.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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:not': 0.03; 'namespace': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'useless': 0.09; 'namespace.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'xml': 0.29; "doesn't": 0.30; "i'm": 0.30; 'checking': 0.33; 'maybe': 0.34; 'but': 0.35; 'add': 0.35; 'there': 0.35; 'charset :us-ascii': 0.36; 'subject:new': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'wish': 0.70; 'condition.': 0.84; 'pain': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Neil Cerutti Subject: Re: Elementree and insert new element if it is not present - FIXED Date: Fri, 24 Jan 2014 14:12:25 +0000 (UTC) Organization: Norwich University References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: jackman.norwich.edu User-Agent: slrn/0.9.9p1/mm/ao (Win32) 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1390572775 news.xs4all.nl 2900 [2001:888:2000:d::a6]:37833 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64685 On 2014-01-24, Tharanga Abeyseela wrote: > manged to fix it. need to add the namespace when checking the > condition. I wish there was a rule that if your xml doesn't need a namespace it doesn't use one. They are a pain when there's just one useless namespace. But maybe I'm just naive. -- Neil Cerutti