Tag Archives: Open Source

XML Serialisation in ActionScript 3

XML Serialisation – a nest of rubbishness no more.

In my experience, code to do this takes the form of massive source files devoted solely to mechanically copying properties out of one type of entity into another, which needed to be updated every time you tweaked the data model. blergh.

As such, I have written an ActionScript 3 helper library (h2j9k.XMLSerialiser) which dynamically serialises any in-memory object, and can de-serialise it back again into the same state from that XML (as long as all the important data is held in public fields or read-write properties, obviously). It preserves types, and includes child objects inline, and requires no configuration whatsoever.

I’m hosting the project at my site for open source code, so why not go take a look? It is MIT licensed so you can use it in your code at work…although it would be nice if you credited it back to h2j9k.org.