Create XML document using XSD schema

What is the best way to generate XML from a specific schema? I have a
set of path => value assignments which I want to transform to XML. Is
there a good ruby tool for this task or what is the process of doing
such a thing in ruby world at all?