On 28 Μάϊος, 18:45, Jon Clements <jon...@googlemail.com> wrote:
> On 28 May, 16:24, "kak...@gmail.com" <kak...@gmail.com> wrote:
>
>
>
>
>
> > Hi i have the following xml message i want to omit the headers, any
> > hints?
>
> > POST /test/pcp/Listener HTTP/1.1
> > User-Agent: Jakarta Commons-HttpClient/3.1
> > Host: 127.0.0.1:50002
> > Content-Length: 547
>
> > <pt_control_message xmlns="http://demo.com/demo";>
> >   <cmdReply>
> >     <sessionList>
> >       <session>
> >         <id>scvdcvsdv</id>
> >         <subscriberId>sdfv</subscriberId>
> >         <subscriberName>Antonis Kaklis</subscriberName>
> >         <presence>away</presence>
> >         <note>testing the new client</note>
> >         <ipAddress>jlkdjf</ipAddress>
> >         <deviceClass>android</deviceClass>
> >       </session>
> >     </sessionList>
> >   </cmdReply>
> > </pt_control_message>
>
> Assuming the header is separated by a blank line, something like:
>
> list(islice(dropwhile(bool, s.split('\n')), 1, None))

Thank you!!!

Antonis
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to