The key problem with bundling together a group of XML documents for transmission is that you can't just append them all together into one file. Doing so will result in one big, malformed document that most XML parsers will reject when they hit the root Element of the second document. Despite the fact that people have been aware of this problem since XML was first proposed for electronic commerce, there isn't yet a universally accepted solution.

If you've picked up on one of the themes of this chapter, you shouldn't be surprised to learn that your packaging options are somewhat dependent on your choice of transport. Here are a few options using proven, readily available technology.

  • MIME attachments : MIME allows several XML documents (or other types of objects) to be grouped together and attached to an e-mail message. There's also a flavor of MIME called S/ MIME , for secure MIME, that supports persistent encryption and authentication. Many common e-mail clients support S/MIME using common encryption algorithms and X.509 certificates.

  • zip or UNIX tar : I'm really surprised that more people haven't been considering these options. It's very easy to package a number of XML documents into one zip or tar file. There's free software available for doing this. And on top of packaging the documents, you get compression too! Either of these options will work easily with all of the transport options listed in the previous section. What more could you ask for?

  • mput or mget with FTP : If you're using FTP you can circumvent the packaging problem by using these commands to transmit or receive multiple files in a directory.

In addition, some software utilities that provide persistent encryption can operate on several files in a directory at the same time, generating one encrypted file with all the documents.

Using XML with Legacy Business Applications
Using XML with Legacy Business Applications
ISBN: 0321154940
EAN: 2147483647
Year: 2003
Pages: 181

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: