benn said:
Does this make sense? Could I send this bit-packed binary data (non- ascii) but with (ascii?) xml tags that tell the pc application about how the binary data is structured?
XML isn't magic. It's just portable syntax upon which languages can be built.
Yes, you could invent a markup language which describes the content of a block of binary data. Of course you'd then need an application on the recieving end which understands that description and uses it to access that data. Search the web for "XML data binding" for descriptions of how people have associated arbitrary data with XML structure in the past.
XML itself can not contain arbitrary binary data directly -- some characters have special meaning, some (eg line breaks) are specially processed, and some (depending on the version of XML) are simply forbidden. If you wanted to embed the binary data in the XML document, the usual solution is to do a base-64 encoding (same solution used in MIME attachments to SMTP mail).
But... If you're going to go to all that work, you may be defeating most of the advantages of having the data be bit-packed in the first place; you're adding nontrivial amounts of overhead. If you want to send unpacking instructions, I'd recommend sending them and the binary block as separate transfers. Or, quite possibly, giving up on binary and simply sending an XML-formatted text document which expresses the information.
XML is not "intelligent data", despite some early hype. It's just data that's structured so it can be processed intelligently. Someone still needs to provide the intelligence to create it, understand it, and do something with it.