Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8390119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:54:09+00:00 2026-06-09T18:54:09+00:00

I have a Socket communication in my Windows Phone app, but when I call

  • 0

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 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:54:10+00:00Added an answer on June 9, 2026 at 6:54 pm

    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.

    public class socketDataToMap
    {
        public string Data {get; set;}
    }
    

    and then

    var ser = new XmlSerializer(typeof(socketDataToMap));
    using (var reader = XmlReader.Create(yourSocketStream))
                {
                    var deserializedObject = ser.Deserialize(reader) as socketDataToMap;
    
                }
    

    and then you serialize to an XML file. I see something like this for your problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script that opens a port and allows socket communication between multiple
I have a socket application which I can use in local network, at home.
in my android application I have a socket, but when I rotate the screen,
I have a basic Socket.io server setup like this: var server = express.createServer().listen(port); this.io
I have the DWORD socket in windows. I need to know if it is
I have a tcp socket sending three lines like this out2.println(message1\n); out2.println(message2\n); out2.println(message3\n); and
I have an application which does some socket communication with some hardwares. Assume for
We have a C++ application on Windows that starts a java process. These two
I have a Windows Service that I am in the process of writing. I
Does web api have more advantage than socket communication when I am writing a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.