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.

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

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