Hello,
I am writing a xml based data management program. there is a server and a client working together on a network. the server holds all the xml data and the client calls the server and "ask's" the server for the data, which the server will send over the network.I would like to know how to convert a xml file to a byte array and send it over the network.the server and client are talking to each other , so starting the server and listening are done..so is client connecting.the part I need help with is the conversion. I have attempted to do this and this is the code I wrote..the code converts the data to a byte areay (I think) but I am not sure if I am doing this correctly.
now I need to convert it back into xml and save it or load the xml into a datagridview
any help would be appreciated
InkedGFX
I am writing a xml based data management program. there is a server and a client working together on a network. the server holds all the xml data and the client calls the server and "ask's" the server for the data, which the server will send over the network.I would like to know how to convert a xml file to a byte array and send it over the network.the server and client are talking to each other , so starting the server and listening are done..so is client connecting.the part I need help with is the conversion. I have attempted to do this and this is the code I wrote..the code converts the data to a byte areay (I think) but I am not sure if I am doing this correctly.
string xmlData = File.ReadAllText(rootPath + "\\ActivityData\\ActivityData.xml"); byte[] dataBuffer = Encoding.UTF8.GetBytes(xmlData); server.SendTo(R.Name, "V^Activity-" + Convert.ToBase64String(dataBuffer));
now I need to convert it back into xml and save it or load the xml into a datagridview
any help would be appreciated
InkedGFX