asxsd

asxsd is a java library for generating ActionScript 3 source code implementing a 'binding' between ActionScript objects and XML data. Unlike AS3's built-in E4X databinding, which dynamically provides access to data via objects of the 'XML' class, an asxsd-generated API includes ActionScript classes who's structure and names are based on the definitions of the XML schema.

Project Status

I'm only making this release so that I can then make releases of other projects which depend on asxsd.

At this point, you should probably only use asxsd it if you're willing to work on the code.

Principle of Operation

An XML Schema definition like this,

<xs:complexType name="User">
  <xs:sequence>
    <xs:element name="firstName" type="xs:string"/>
    <xs:element name="lastName" type="xs:string"/>
  </xs:sequence>
</xs:complexType>

would result in an ActionScript 3 class roughly like,

package {
        class User {
                public var firstName:String;
                public var lastName:String;
        }
}

asxsd will also generate 'marshaler' and 'unmarshaler' classes to convert between XML and Objects.

Why asxsd?

  • While coding your application, you can reason about your data in terms of the familiar language of objects, and classes, rather than having to think in terms of XML.
  • Structural errors in the manipulation of the data are likely to be caught at compile time, rather than only being triggered at runtime, and possibly going uncaught.