Lightweight XML Parser(LwXMLP)
An industrial-grade, streaming XML processor written in clean ANSI C. Engineered specifically for memory-constrained microcontrollers, real-time operating systems (RTOS), and safety-critical embedded applications.
// Initialize streaming SAX parser
LwXMLP_strXMLParseInstanceType parser;
LwXMLP_vInitParser(&parser, &saxCallbacks);
// Feed incremental packet from TCP/UART
LwXMLP_vConsumeCharacterBulk(
&parser, rxBuffer, bytesReceived
);
Architecture & Design
Engineered for Microcontrollers & Determinism
Standard XML parsers rely on heavy Document Object Models (DOM) that exhaust microcontroller RAM. LwXMLP uses a pure streaming SAX pipeline designed from the ground up for embedded constraints.
Incremental Streaming (SAX)
Processes partial inputs as they arrive over UART, SPI, or Ethernet. There is zero restriction on total XML document size, because only the current tag context is buffered in memory.
Deterministic Memory Modes
Choose between dynamic allocation or 100% static memory allocation. Eliminate heap fragmentation and allocation failures in safety-critical medical and automotive loops.
Compile-Time Scalability
Granular C macro switches allow developers to enable or strip features. The compiled footprint scales from 7 KB for minimal parsers up to 33 KB for full W3C specifications.
Datasheet & Parameters
Technical Specifications
| Technical Parameter | LwXMLP Specification & Guarantee |
|---|---|
| Processor Type | Non-validating, SAX / Event-driven streaming processor |
| Implementation | ANSI C / C99 (Strictly MISRA-C:2012 compliant) |
| Code Footprint | 7 KB (minimum profile) to 33 KB (full feature set on ARM Cortex-M4F) |
| RAM Footprint | Zero dynamic allocation required in static mode (deterministic stack/static buffers) |
| Stream Types | File stream, IP socket streams (TCP/UDP), UART/SPI/I2C serial channels |
| Concurrency | 100% Thread-safe and re-entrant across all RTOS tasks |
| Encodings | Native support for UTF-8, UTF-16BE, UTF-16LE, ISO-8859-1 |
| Error Detection | Fatal error trapping with exact byte offset, line number, and error classification |
| Standards Conformance | Verified against W3C XML Conformance Test Suite 20130923 |
| Static Analysis | PC-Lint V9.00L certified with 0 required directive violations |
Hardware Validation
Verified Hardware Targets & Evaluation Demos
LwXMLP is validated on industry-standard ARM Cortex-M evaluation platforms with turnkey streaming demonstrations.
TI TM4C129X Connected Development Kit
TM4C129XNCZAD (ARM® Cortex®-M4F @ 120MHz)
10/100 Ethernet MAC+PHY, USB 2.0, LCD interface
Ready-to-flash evaluation binary with streaming parser demo
Request Evaluation BinaryTI Connected LaunchPad EK-TM4C1294XL
TM4C1294NCPDT (ARM® Cortex®-M4F)
On-board Ethernet, dual BoosterPack XL headers
TCP/IP streaming XML packet processing benchmark
Request Evaluation BinaryTiva EK-TM4C123-GXL + SimpleLink CC3100
TM4C123GH6PM (ARM® Cortex®-M4)
Wi-Fi BoosterPack, low-power telemetry interface
Over-the-air Wi-Fi XML payload streaming evaluation
Request Evaluation BinaryQuality Assurance
W3C & MISRA-C:2012 Verified
LwXMLP v1.0.0 was submitted to the official W3C XML Conformance Test Suite 20130923, passing positive test documents, negative error traps, and syntax compliance checks.
Code safety and static analysis were performed with PC-Lint V9.00L against the MISRA-C:2012 rulebook, guaranteeing 0 required directive violations and safe memory access.
MISRA-C:2012 Test Results Summary
Licensing & Support
Dual Licensing Structure
Choose community open source or royalty-free commercial enterprise distribution.
Open Source (GPLv3)
Free / CommunityFree for academic research, open-source projects, and preliminary prototyping. Governed by GNU General Public License v3 terms (source code must remain open).
- ✓ Full C source code included
- ✓ Community issue tracking
- ⚠ Requires full open-source disclosure
Commercial License
Royalty-FreeRequired for businesses embedding LwXMLP into commercial hardware products. No copyleft/GPL obligations, unlimited device redistribution, warranty, and support.
- ✓ Unlimited, royalty-free product distribution
- ✓ Closed-source protection (No GPL obligations)
- ✓ Commercial warranty & updates
- ✓ Direct integration assistance
Annual Support & Maintenance Packages
Direct engineer support packages available yearly for commercial licensees.
| Coverage Feature | Basic (1 Year) | Standard (1 Year) | Premium (1 Year) |
|---|---|---|---|
| Bug fixes & security patches | ✓ | ✓ | ✓ |
| Commercial version updates | ✓ | ✓ | ✓ |
| Technical support channel | Email (48h) | Priority Email & Ticket (24h) | Dedicated Engineer (24/7 critical) |
| Architecture integration review | — | ✓ | ✓ |
| Direct engineering conference calls | — | — | ✓ |
| Custom feature backporting | — | — | ✓ |
