tags:

views:

48

answers:

1

I have a device which send me data over a particular port. The data is in XML Format.

Now I already did a small console application which listen for the data and print out the data on the screen.

Now my plans are to deserialize the xml data or I will create the insert statement into the database.

1) The device send me the data every second (if there is data to send me). 2) I cannot say how much data the device is going to send me.

How can I make sure to capture all data without loose any information..

Ready to discuss?

CODE in C# or VB.NET

+1  A: 

Per XML document, you will need to read continously from the socket stream until you find a matching root end element;

<?xml version='1.0' encoding='utf-8'?><rootElement> ... </rootElement>

Done, and wait for the next document.

k_b
have you got any code snippets?
David Bonnici