I see that the message is written in xml. Maybe I will rewrite it using libxml for parsing it's content.