Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. A beginner question

A beginner question

Scheduled Pinned Locked Moved XML / XSL
questionxmlhelptutoriallearning
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RockRock
    wrote on last edited by
    #1

    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

    P 1 Reply Last reply
    0
    • R RockRock

      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

      P Offline
      P Offline
      Phil Hobgen
      wrote on last edited by
      #2

      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

      R 1 Reply Last reply
      0
      • P Phil Hobgen

        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

        R Offline
        R Offline
        RockRock
        wrote on last edited by
        #3

        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

        P 1 Reply Last reply
        0
        • R RockRock

          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

          P Offline
          P Offline
          Phil Hobgen
          wrote on last edited by
          #4

          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

          R 1 Reply Last reply
          0
          • P Phil Hobgen

            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

            R Offline
            R Offline
            RockRock
            wrote on last edited by
            #5

            Hi, I solve it. I learn a lot. Thank You. Cheers RockRock

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups