I have a Socket communication in my Windows Phone app, but when I call it I can sometimes get a result, that looks like this
\0\0\0\0<RESULT><DATA>...</DATA></RESULT>\0
I want to remove the start and the end of it so I only get the XML, but what is the best way to do it?
I have thought about Regex, but I can not make it work 🙁
I have not enough information to answer you correctly, so I will suggest the following :
You should try to map the data you are receiving from your socket to a serializable class.
And then you serialize the classObject to an XML document.
and then
and then you serialize to an XML file. I see something like this for your problem.