Omit the headers from XML message

kaklis at gmail.com kaklis at gmail.com
Fri May 28 14:58:15 EDT 2010


On May 28, 7:48 pm, Peter Otten <__pete... at web.de> wrote:
> Jon Clements wrote:
> > On 28 May, 16:24, "kak... at gmail.com" <kak... at gmail.com> wrote:
> >> Hi i have the following xml message i want to omit the headers, any
> >> hints?
> > Assuming the header is separated by a blank line, something like:
>
> > list(islice(dropwhile(bool, s.split('\n')), 1, None))
>
> Making the same assumptions, but giving a single string instead of a list of
> lines:
>
> s.partition("\n\n")[-1]
>
> Peter

Thank you all for your responses!

Antonis



More information about the Python-list mailing list