I tried to figure out the way to serialize xml file before sending it over the network, but in vain. I could temporarily accomplish the task by just reading the xml contents, put it in a string and send the string over the network and write the content into an xml file at the other end. Now, it makes me wonder what could the major difference between xml-serialization and this method be?I tried to figure out the way to serialize xml