A beginner question
-
I am a beginner of xml programming. I am going to transmission an image file, a text file and a video file through TCP/IP. Therefore, I want to group them by a xml file. I don't know how to get start on it. Can someone show me some guidelines? Please help
-
I am a beginner of xml programming. I am going to transmission an image file, a text file and a video file through TCP/IP. Therefore, I want to group them by a xml file. I don't know how to get start on it. Can someone show me some guidelines? Please help
Hi, The best place to start is with some questions : 1) What's your development environment? 2) Is there an existing XML Schema that you need to comply with? If you are exchanging the data with an external system, a schema is useful as a definition of the exchanged data format. Alternatively you may just be able to agree a simple xml structure. 3) Do you need to enclose the binary data in the xml, or could you use a url within the xml to indicate where the binary data can be retrieved from? If you need to enclose the binary data then you will need to encode it, as xml does not allow binary data. Note that this encoding will expand the size of the binary data, and hence the size of your xml. 4) When you transmit via TCP/IP do you mean HTTP, a web service, or some other standard protocol or just from port to port using some 'informal' protocol? A good link to bookmark is http://www.zvon.org[^] Good Luck! Cheers Phil Hobgen barbari.co.uk Southampton, UK
-
Hi, The best place to start is with some questions : 1) What's your development environment? 2) Is there an existing XML Schema that you need to comply with? If you are exchanging the data with an external system, a schema is useful as a definition of the exchanged data format. Alternatively you may just be able to agree a simple xml structure. 3) Do you need to enclose the binary data in the xml, or could you use a url within the xml to indicate where the binary data can be retrieved from? If you need to enclose the binary data then you will need to encode it, as xml does not allow binary data. Note that this encoding will expand the size of the binary data, and hence the size of your xml. 4) When you transmit via TCP/IP do you mean HTTP, a web service, or some other standard protocol or just from port to port using some 'informal' protocol? A good link to bookmark is http://www.zvon.org[^] Good Luck! Cheers Phil Hobgen barbari.co.uk Southampton, UK
Thank you for your reply. It is very helpful for me. I am programming with C#.net in XP. Moreover, I am using "TCPListener" and "TCPClient" and the data are transmitted by "StreamWriter" and "StreamReader". -Can XML Schema be used in non-website case? -I am not using web service. Can SOAP be used for binary data encoding? If not, what should I use? Regards
-
Thank you for your reply. It is very helpful for me. I am programming with C#.net in XP. Moreover, I am using "TCPListener" and "TCPClient" and the data are transmitted by "StreamWriter" and "StreamReader". -Can XML Schema be used in non-website case? -I am not using web service. Can SOAP be used for binary data encoding? If not, what should I use? Regards
Hi, XML can be used anywhere where you can use text. You can pass it around in files, or over the web. SOAP is a protocol that uses XML for sending/receiving to call methods, this doesn't sound like what you want. To do the binary encoding take a look at base64 encoding. Cheers Phil Hobgen barbari.co.uk Southampton, UK
-
Hi, XML can be used anywhere where you can use text. You can pass it around in files, or over the web. SOAP is a protocol that uses XML for sending/receiving to call methods, this doesn't sound like what you want. To do the binary encoding take a look at base64 encoding. Cheers Phil Hobgen barbari.co.uk Southampton, UK