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

The Importance of PCB Design in Consumer Products

April 25, 2024
Explore the importance of PCB design and how Fusion 360 can help your team react to evolving consumer demands.

PCB Design Mastery for Assembly & Fabrication

April 25, 2024
This guide explores PCB circuit board design, focusing on both Design For Assembly (DFA) and Design For Fabrication (DFab) perspectives.

What is Design Rule Checking in PCBs?

April 25, 2024
Explore the importance of Design Rule Checking (DRC) in manufacturing and how Autodesk Fusion 360 enhances the process.

Unlocking the Power of IoT Integration for Elevated PCB Designs

April 25, 2024
What does it take to add IoT into your product? What advantages does IoT have in PCB related projects? Read to find answers to your IoT design questions.

Comments

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