The polyrex-schema gem creates Polyrex XML from an initial shorthand schematic string.
gem "polyrex-schema", "~> 0.1.5"