npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

paxl

v0.1.0

Published

A high-performance XML to JSON parser implemented in WebAssembly.

Downloads

100

Readme

Paxl

A high-performance XML to JSON parser implemented in WebAssembly.

Paxl parses XML documents and converts them into JSON objects with minimal overhead. It's designed for speed and efficiency, making it ideal for processing large XML files or high-throughput applications.

Features

  • Fast: Optimized C code compiled to WebAssembly for maximum performance
  • Lightweight: Zero dependencies in the runtime (yyjson is statically linked)
  • Standards-compliant: Supports standard XML syntax including attributes, nested elements, and text content
  • Node.js ready: Easy to use JavaScript API with ES modules support

Installation

npm install paxl

Usage

import { parse } from 'paxl';

const xml = `<root>
  <item id="1">
    <name>Example</name>
    <value>42</value>
  </item>
</root>`;

const json = parse(xml);
console.log(json);
// Output: {"children":[{"tagName":"item","attributes":{"id":"1"},"children":[{"tagName":"name","children":["Example"]},{"tagName":"value","children":["42"]}]}]}

JSON Output Format

Paxl converts XML to a JSON structure where:

  • Elements become objects with a tagName property and optional attributes and children properties
  • Text content is represented as strings in the children array
  • Attributes are collected in an attributes object
  • Nested elements are placed in the children array

Example:

<book id="123" category="fiction">
  <title>Sample Book</title>
  <author>John Doe</author>
</book>

Becomes:

{
  "children": [
    {
      "tagName": "book",
      "attributes": {
        "id": "123",
        "category": "fiction"
      },
      "children": [
        {
          "tagName": "title",
          "children": ["Sample Book"]
        },
        {
          "tagName": "author",
          "children": ["John Doe"]
        }
      ]
    }
  ]
}

Performance

Paxl is designed for high performance and typically outperforms pure JavaScript XML parsers. Benchmarks show significant speedups compared to alternatives like rapidx2j and txml.

Run the included benchmarks to see performance on your system:

node tests/perf_test.js

Building from Source

Paxl requires Emscripten to build. Make sure you have the Emscripten SDK installed and activated.

# Clone the repository
git clone https://github.com/eitanwass/paxl.git
cd paxl

# Build the WebAssembly module
make build

# Run tests
node tests/simple_test.js

Build Options

  • DEBUG=y: Build with debug symbols and no optimizations
  • W_ENTRY=y: Include a main function for CLI applications using WASM
  • MAX_XML_DEPTH=256: Maximum XML nesting depth (default: 256)

Requirements

  • Node.js >= 12.22.7
  • Emscripten (for building from source)

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

Roadmap

XSD Validation is not planned! Roadmap of features and support I want to implement, in no particular order.

  • CI/CD
    • [ ] CI run tests (actually write them this time)
    • [ ] CD Distributed build
  • Tests
    • [ ] Valgrind tests!
    • [ ] Reach 100% coverage!
  • [ ] typescript support!
  • [ ] Non-string attributes
  • [ ] Online performance or/and demo
  • [ ] Remove yyjson for smaller in-house implementation (unused features)
  • Options:
    • [ ] Single root option - eliminate top "children" element
    • [ ] Parse comments
    • [ ] Custom keys (e.g. tagName -> my_tag_name)
  • Data validations? (Do we want that? Hit for performance)
    • [ ] Parse boolean values to correct form (e.g. False -> false)
  • Performance
    • [ ] Parallel pass parsing
    • [ ] SIMD? (Is it even applicable in this case?)

License

Apache 2.0 license - see LICENSE file for details.

Credits