Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!lightspeed!lightspeed.eweka.nl!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.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'output': 0.05; 'that?': 0.05; 'removes': 0.07; '22,': 0.09; 'subject:extra': 0.09; 'subject:xml': 0.09; 'trailing': 0.09; 'cc:addr:python-list': 0.11; 'suggest': 0.14; '8bit%:26': 0.16; 'carriage': 0.16; 'suggestion.': 0.16; 'thanks,': 0.17; 'wrote:': 0.18; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '>': 0.26; 'header:In- Reply-To:1': 0.27; 'tried': 0.27; 'function': 0.29; 'xml': 0.29; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'work.': 0.31; 'getting': 0.31; 'file:': 0.31; 'strip': 0.31; 'way?': 0.31; 'anyone': 0.31; 'handled': 0.32; 'url:python': 0.33; "can't": 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'url:listinfo': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'skip:& 10': 0.38; 'thank': 0.38; 'pm,': 0.38; 'itself': 0.39; 'space': 0.40; 'url:mail': 0.40; 'blank': 0.60; 'skip:n 30': 0.60; 'mentioned': 0.61; 'skip:* 10': 0.61; 'to:addr:gmail.com': 0.65; 'between': 0.67; 'default': 0.69; 'jul': 0.74; 'br,': 0.84; 'monte': 0.84; 'returns.': 0.84; 'subject:space': 0.84; 'xslt': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CzqV+58YuQTqbwzhKzKrzxbMLUkiZ+D5nT3pAWufTrI=; b=FJMAfzhz6CqQJXBMPiisz0pHKI4Jre/cAg9iAQzAjMts14FUvl/tpQrI1tr+DSRVpa 2b4u8rYYZ9GZgH95ZiXwgFjHdFiAIVV8WnXCtSfrjv730jPk0ZZiVS9Qwe2XIMiPMexk 4xAWF/NJVkHD17z5tvTXaLoAzi8MPqd5DwgbNqWoKLh0SIw+3vbU6qnPWv54G5mZBBnp ktLl6KFC3RaOXP6TlS+7YgOcd3g8HJ1obGuuO+qb5ZNlQX7h7TgghHWm9rIpCXcQI0Ip cyJ0kE1W/N9e8VMMnfCT1VkwKizYJyI6xZAPvERM4Ga+fUnNfRMgCNdmFS2vJMT3wKNO 9MbA== MIME-Version: 1.0 X-Received: by 10.236.37.231 with SMTP id y67mr4288078yha.146.1406033615673; Tue, 22 Jul 2014 05:53:35 -0700 (PDT) In-Reply-To: References: Date: Tue, 22 Jul 2014 14:53:35 +0200 Subject: Re: Removing xml element and strip extra space From: varun bhatnagar To: Monte Milanuk Content-Type: multipart/alternative; boundary=20cf303a2bb1345dc104fec7b690 Cc: python-list@python.org 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: 95 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1406033623 news.xs4all.nl 2829 [2001:888:2000:d::a6]:37703 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 8045 X-Received-Body-CRC: 1820682030 Xref: csiph.com comp.lang.python:74994 --20cf303a2bb1345dc104fec7b690 Content-Type: text/plain; charset=UTF-8 Hi, Thank you so much for the suggestion. I tried using the rstrip() function but that did not work. Still getting a blank space between ** and * *as mentioned in the above output xml file: ** * * Is there any other way through which this can be achieved? Can't this be handled by xslt itself in some way? Thanks, BR, Varun On Tue, Jul 22, 2014 at 2:23 PM, Monte Milanuk wrote: > On 2014-07-22, varun bhatnagar wrote: > > I want to strip the space between ** and ** > > Can anyone suggest a way out to do that? > > Look at str.rstrip() - by default it removes trailing whitespace > including carriage returns. > > -- > https://mail.python.org/mailman/listinfo/python-list > --20cf303a2bb1345dc104fec7b690 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

Thank you so much for the suggestio= n.
I tried using the rstrip() function but that did not work. Sti= ll getting a blank space between=C2=A0<nodePeriod>=C2=A0and=C2= =A0</nodeInfo> as mentioned in the above output xml file:=

<nodePeriod nodeTime=3D"600000000"/&= gt;
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0
=C2=A0</nodeInfo>

Is there any other way throug= h which this can be achieved? Can't this be handled by xslt itself in s= ome way?

Thanks,
BR,
Varun


On Tue, Jul 22, = 2014 at 2:23 PM, Monte Milanuk <memilanuk@invalid.com> w= rote:
On 2014-07-22, varun bhatnagar <varun292006@gmail.com> wrote:
> I want to strip the space between *<nodePeriod>* and *</nodeI= nfo>*
> Can anyone suggest a way out to do that?

Look at str.rstrip() - by default it removes trailing whitespace
including carriage returns.

--
https://mail.python.org/mailman/listinfo/python-list

--20cf303a2bb1345dc104fec7b690--