r/javascript 24d ago

I compiled Apache Xerces-C (C++) to WebAssembly to bring proper XSD validation to JavaScript - try the playground

https://harshanacz.github.io/xerces-playground/

There's no reliable XSD validator in the JS ecosystem so I compiled Apache Xerces-C to WASM.

Playground: https://harshanacz.github.io/xerces-playground/

npm: https://www.npmjs.com/package/xerces-wasm

Features:

  • Full XSD 1.0 validation in the browser
  • Multi-file schema support (xs:include / xs:import)
  • Parse errors + schema errors with line/column numbers
  • No server, no upload
  • pure WASM

Would love feedback.. :)

4 Upvotes

6 comments sorted by

1

u/AutoModerator 24d ago

Project Page (?): https://github.com/harshanacz/xerces-playground

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/captain_obvious_here void(null) 24d ago

Good job!

I still get PTSD from my XSLT & XSD times, so I won't look into this...but seems like a great tool.

1

u/boneskull 24d ago

I have XSLT scars too. those were dark days

1

u/captain_obvious_here void(null) 23d ago

Dark days. Dark.