FirmwareMine
← Products/v1.0.0 Production ReleaseMISRA-C:2012 Certified

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.

lwxmlp_stream.c — ARM Cortex-M4

// Initialize streaming SAX parser

LwXMLP_strXMLParseInstanceType parser;

LwXMLP_vInitParser(&parser, &saxCallbacks);

// Feed incremental packet from TCP/UART

LwXMLP_vConsumeCharacterBulk(

&parser, rxBuffer, bytesReceived

);

✓ Re-entrant & Zero Heap ModeRAM: 1.2 KB

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.

01

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.

02

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.

03

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 ParameterLwXMLP Specification & Guarantee
Processor TypeNon-validating, SAX / Event-driven streaming processor
ImplementationANSI C / C99 (Strictly MISRA-C:2012 compliant)
Code Footprint7 KB (minimum profile) to 33 KB (full feature set on ARM Cortex-M4F)
RAM FootprintZero dynamic allocation required in static mode (deterministic stack/static buffers)
Stream TypesFile stream, IP socket streams (TCP/UDP), UART/SPI/I2C serial channels
Concurrency100% Thread-safe and re-entrant across all RTOS tasks
EncodingsNative support for UTF-8, UTF-16BE, UTF-16LE, ISO-8859-1
Error DetectionFatal error trapping with exact byte offset, line number, and error classification
Standards ConformanceVerified against W3C XML Conformance Test Suite 20130923
Static AnalysisPC-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.

Evaluation Target

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 Binary
Evaluation Target

TI Connected LaunchPad EK-TM4C1294XL

TM4C1294NCPDT (ARM® Cortex®-M4F)

On-board Ethernet, dual BoosterPack XL headers

TCP/IP streaming XML packet processing benchmark

Request Evaluation Binary
Evaluation Target

Tiva 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 Binary

Quality 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

Required Directives Violations:0 (Pass)
Required Rules Violations:2 (Documented Deviations)
Advisory Directives Violations:0 (Pass)
Static Analysis Tool:PC-Lint V9.00L
W3C Test Suite:xmlts20130923 (Pass)

Licensing & Support

Dual Licensing Structure

Choose community open source or royalty-free commercial enterprise distribution.

Open Source (GPLv3)

Free / Community

Free 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
Clone on GitHub

Commercial License

Royalty-Free

Required 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
Inquire: licensing@firmwaremine.com

Annual Support & Maintenance Packages

Direct engineer support packages available yearly for commercial licensees.

Coverage FeatureBasic (1 Year)Standard (1 Year)Premium (1 Year)
Bug fixes & security patches
Commercial version updates
Technical support channelEmail (48h)Priority Email & Ticket (24h)Dedicated Engineer (24/7 critical)
Architecture integration review
Direct engineering conference calls
Custom feature backporting