XML: Flexibility Where It Counts

Feb. 3, 2005
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 w

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.

Sponsored Recommendations

What are the Important Considerations when Assessing Cobot Safety?

April 16, 2024
A review of the requirements of ISO/TS 15066 and how they fit in with ISO 10218-1 and 10218-2 a consideration the complexities of collaboration.

Wire & Cable Cutting Digi-Spool® Service

April 16, 2024
Explore DigiKey’s Digi-Spool® professional cutting service for efficient and precise wire and cable management. Custom-cut to your exact specifications for a variety of cable ...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!