Sdl.LanguagePlatform.Core.SegmentElement <--> System.Xml.Linq.XElement ?

Hello all!  [EDIT: Split into two posts, clarified this issue]

I am developing a plugin for Trados Studio (an implementation of ITranslationProvider in C#) that sends text to our webservice for automated translation.

The prototype plugin that I took over from a predecessor extracts only plain text from source segments. I have to enhance it to send intact tags, but am not getting anywhere at the moment.  As I understand the situation, I have to convert each SegmentElement on the input side to an XElement (alternatively directly to an XML string), and afterwards convert the webservice's parsed XML answer back into a series of SegmentElements. (I have tried returning a plain XML string, but in the editor I just see it verbatim, so Trados clearly doesn't recognize the XML tags as proper tags on its own.)

HOW do I do this? I am sure there is a way, but I can't seem to find any fitting API call, let alone an explanation or sample project.

I'd be very grateful indeed for any advice and pointers!

Best regards,

Sebastian