A Simple Javascript PyxToXML Convertor

A recent XML.com article, "Pyxie" introduced a line-oriented notation for describing XML documents (called "Pyx"). In the last week or so, theres been a lot of interest in the notation, and support has sprung up in Perl and Java. I decided to have a play with Pyx, and came up with the following simple Javascript function which concerts Pyx formatted data into XML.

Paste some Pyx data into the first text box, and hit the button. The XML version will be created for you. Feel free to use this code however you want. Its just a toy application. If you spot any obvious bugs then let me know. I've only tested in briefly, with a few sample documents.

Note: I've currently got the reverse process almost complete (i.e. XML to Pyx), but there are a few bugs with the Javascript parser that need ironing out..

Paste your Pyx code here.

The XML will be produced here.


Written by Leigh Dodds.