XML (eXtended Markup Language) is the hottest thing since HTML. In embedded applications, flexibility is more important than efficiency. Text-based XML is simply a way to encode structured information. It looks a lot like Lisp symbolic expressions with lots of angle brackets instead of parentheses. It's used in configuration files for applications like Eclipse, and it is the basis for exchanging commands and results in SOAP (simple object access protocol). A host of protocols are built around XML, though these tend to be found in enterprise Web sites and database applications. In fact, hardware routing accelerators for XML are gaining more importance in large data centers.
XML actually makes sense in the embedded world. Of course, it doesn't make sense to encode and then decode high-bandwidth radar data into XML. Yet XML may be the best choice for configuring that radar data-acquisition system.
XML is very space-inefficient. Integers are stored as text, and a text description brackets essentially every entity. Judicious use of memory is key to a successful system based around a small microprocessor. But the amount of XML information that must be processed on a 32-bit system is usually a small fraction of the available memory. This makes XML storage efficiency a non-issue. Greater use of 32-bit microprocessors and large-memory 16-bit microprocessors will enable the expanded use of XML in embedded applications.
Still, XML's flexibility comes at a cost. Applications don't use XML data directly. Instead, they must extract it from an XML data stream via an XML parser. The amount of XML standard support determines parser complexity. Embedded applications may be able to utilize a simplified parser if a subset of XML is employed; generation tends to be a bit easier.
Some tools used to generate HTML on-the-fly also can be employed to generate XML. On larger systems like Windows and Linux, XML parsers and generators are common fare. But small real-time operating systems rarely use them.
XML will become more crucial in embedded applications as the level of connectivity rises. It can provide the commonality between standard applications like database servers and embedded devices. Providing an XML style sheet and a description of an XML-based interface will permit more flexible communication with an embedded network device.
Are you doing XML work on small systems? Drop me an e-mail and let me know about your successes and horror stories.