Removing xml element and strip extra space

varun bhatnagar varun292006 at gmail.com
Tue Jul 22 14:53:35 CEST 2014


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

> On 2014-07-22, varun bhatnagar <varun292006 at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140722/0e57eab3/attachment.html>


More information about the Python-list mailing list