sending XML over a socket

  • Thread starter Thread starter abdul bari
  • Start date Start date
It really depends on how the XML is stored on the server. Is it made
available as a file over HTTP, FTP, or SMB? Or is it dynamically generated
as it's being sent?

Chris
 
Have you considered using web services or remoting?

All the socket menutiae is handled for you.

Other than that, you'll need to either use an XmlTextWriter
to stream the XML over the socket, or do it manually by
using a text encoder from the System.Text space. UTF8 is the
most common. You can convert an XML string into a byte[]
which you can send over the socket. On the other end, use
your XmlTextReader, or the Encoding.UTF8 to turn it back
into an XML Document or an XML string respectively.

-c
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top