Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #74994

Re: Removing xml element and strip extra space

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 <varun292006@gmail.com>
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&gt;': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '&gt;': 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 <slrnlsslu3.a0j.memilanuk@machin-shin.milanuk.lan>
References <CAGxOggEanm=FmXLgcP4tRuwSzvURANeNtShZbFxeGKMSSXZAmA@mail.gmail.com> <slrnlsslu3.a0j.memilanuk@machin-shin.milanuk.lan>
Date Tue, 22 Jul 2014 14:53:35 +0200
Subject Re: Removing xml element and strip extra space
From varun bhatnagar <varun292006@gmail.com>
To Monte Milanuk <memilanuk@gmail.com>
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 <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.12180.1406033623.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

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 *<nodePeriod>* and *</nodeInfo> *as mentioned in the
above output xml file:

*<nodePeriod nodeTime="600000000"/>*


* </nodeInfo>*

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 <memilanuk@invalid.com>
wrote:

> On 2014-07-22, varun bhatnagar <varun292006@gmail.com> wrote:
> > I want to strip the space between *<nodePeriod>* and *</nodeInfo>*
> > 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
>

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Removing xml element and strip extra space varun bhatnagar <varun292006@gmail.com> - 2014-07-22 14:53 +0200
  Re: Removing xml element and strip extra space Tim <jtim.arnold@gmail.com> - 2014-07-22 06:00 -0700
    Re: Removing xml element and strip extra space varun bhatnagar <varun292006@gmail.com> - 2014-07-22 15:42 +0200
    Re: Removing xml element and strip extra space Monte Milanuk <memilanuk@invalid.com> - 2014-07-22 17:39 +0000

csiph-web