FirmwareMine — Embedded Firmware & Hardware Engineering
← Products/Embedded C LibrarySource & Technical Resources

Lightweight XML Parser(LwXMLP)

A streaming XML processor written in C for embedded systems. Parse XML incrementally with an event-driven interface, configurable feature profiles, and static or dynamic memory allocation.

Incremental Parsing Workflow

  1. Initialize a parser instance for the selected allocation mode.
  2. Supply available XML data with LwXMLP_u32AddXMLPortion.
  3. Run LwXMLP_enumXMLParserEngine and process parser events.
  4. Read element, attribute, text or error information through the public API.
Explore the Public API →

Architecture & Design

Engineered for Microcontrollers & Determinism

LwXMLP uses incremental, event-based parsing so an application can process incoming XML without building a complete document tree in memory. Compile-time options let the implementation be adapted to the application and target constraints.

01

Incremental Streaming (SAX)

Process XML portions as the application receives them from a file, network or serial interface. Input can be supplied incrementally; configured buffer, element, path and entity limits still apply.

02

Deterministic Memory Modes

Select internal static allocation, internal dynamic allocation or externally supplied storage. Configure parser instance storage and buffer sizes to match application requirements.

03

Compile-Time Scalability

Choose minimum, intermediate or large feature profiles and adjust individual switches for encoding, entities, normalization and syntax checks. Code and data usage depend on the configuration, compiler and target.

Datasheet & Parameters

Technical Specifications

Technical ParameterLwXMLP Technical Details
Processor TypeNon-validating, SAX / event-driven incremental XML processor
ImplementationC source with a configurable embedded-system implementation
ConfigurationMinimum, intermediate and large feature profiles; individual compile-time feature switches
Memory AllocationInternal static, internal dynamic and externally supplied allocation modes
Input StreamsApplication-supplied XML portions from files, TCP/UDP or serial interfaces
ConcurrencyReentrant parser design with per-instance state; application integration determines synchronization requirements
EncodingsUTF-8, UTF-16BE and UTF-16LE, subject to the selected encoding configuration
Error ReportingFatal XML error reporting with error type and line/column accessors
Feature ControlsConfigurable entities, normalization, DTD reception and well-formedness checks
Resource LimitsConfigurable buffers, attributes, XML path and entity limits; measure memory and code size on the target build

Hardware Examples

Embedded Evaluation Examples

The source repository includes example projects for these TI evaluation platforms. Explore the project configuration and integration code for your target environment.

Evaluation Target

TI TM4C129X Connected Development Kit

TM4C129XNCZAD (ARM® Cortex®-M4F @ 120MHz)

10/100 Ethernet MAC+PHY, USB 2.0, LCD interface

DK-TM4C129 example project in the source repository

Discuss Target Integration
Evaluation Target

TI Connected LaunchPad EK-TM4C1294XL

TM4C1294NCPDT (ARM® Cortex®-M4F)

On-board Ethernet, dual BoosterPack XL headers

EK-TM4C129 example project in the source repository

Discuss Target Integration
Evaluation Target

Tiva EK-TM4C123-GXL + SimpleLink CC3100

TM4C123GH6PM (ARM® Cortex®-M4)

Wi-Fi BoosterPack, low-power telemetry interface

EK-TM4C123 example project with networking integration

Discuss Target Integration

Technical Resources

XML & MISRA-C Compliance Documentation

The project publishes a MISRA compliance matrix and an XML recommendation test-results file. Review the reports together with the source revision, selected configuration and any documented limitations when evaluating the parser.

Licensing & Integration

Open Source & Commercial Licensing

GPLv3 Source Access

The repository license offers LwXMLP under GPLv3 or a commercial license. Review the applicable license and source version when evaluating use in your project.

View Source →Read License →

Commercial Licensing & Integration

For projects that cannot use LwXMLP under GPLv3, contact FirmwareMine about a commercial license. Discuss target integration, evaluation requirements and support scope alongside the proposed licensing terms.

[email protected] →