CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2009
    Posts
    4

    how to send xml over sockets

    HI,

    I found on the net that when exchanging data program running on windows and another on Unix, XML can be used to avoid endlessness. Does anyone please explain with an example, how?

  2. #2
    Join Date
    Feb 2005
    Posts
    2,160

    Re: how to send xml over sockets

    Since XML is character based, there is no byte ordering problem since bytes are bytes in either bigendian or littleendian systems.

  3. #3
    Join Date
    Dec 2009
    Posts
    4

    Re: how to send xml over sockets

    Yes! I know that XML is character base ...
    But how to exchange it via sockets written in C/C++
    Thanks for the reply

  4. #4
    Join Date
    Feb 2005
    Posts
    2,160

    Re: how to send xml over sockets

    I'm not sure what it is you are asking for. The sockets don't care what kind of data you are exchanging. Sockets handle byte streams and don't care whether it's XML or a JPEG file; it's all bytes to the socket.

  5. #5
    Join Date
    Dec 2009
    Posts
    4

    Re: how to send xml over sockets

    thanks for your reply...
    probably you are talking about the file. the problem is not when exchanging a file but when exchange XML as a struct / class
    E.G. when we exchange struct between program running on Unix and other on Windows, we have to take care of padding, byte alignment and ordering, and endianness issues , right!
    So instead of sending struct() function, we can to send an XML schema , according to some information on the net. As there is no details about, I would appreciate if you could describe how?
    Thanks
    Last edited by apollo135; December 24th, 2009 at 05:11 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured