# How to work with a XML schema with Ruby?

**URL:** <https://www.ruby-forum.com/t/how-to-work-with-a-xml-schema-with-ruby/85621>\
**Category:** Ruby\
**Created:** [February 14, 2007, 11:21pm UTC](https://www.ruby-forum.com/t/how-to-work-with-a-xml-schema-with-ruby/85621 "2007-02-14T23:21:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Griff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/f19dbf/32.png) [@Griff](https://www.ruby-forum.com/u/Griff)\
**Post date:** [February 14, 2007, 11:21pm UTC](https://www.ruby-forum.com/t/how-to-work-with-a-xml-schema-with-ruby/85621/1 "2007-02-14T23:21:51Z")

</div>

I need to take a XML schema and do some arbitrary text generation  
using it’s contents.

Any idea where I should start?

---

<div class="post-metadata">

**Author:** ![Griff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/f19dbf/32.png) [@Griff](https://www.ruby-forum.com/u/Griff)\
**Post date:** [February 14, 2007, 11:26pm UTC](https://www.ruby-forum.com/t/how-to-work-with-a-xml-schema-with-ruby/85621/2 "2007-02-14T23:26:51Z")

</div>

Check out the XMLRPC::Client class on Rdoc:  
[http://www.ruby-doc.org/stdlib/libdoc/xmlrpc/rdoc/classes/XMLRPC/Client.html](http://www.ruby-doc.org/stdlib/libdoc/xmlrpc/rdoc/classes/XMLRPC/Client.html)

That should set you in the right direction.

---

<div class="post-metadata">

**Author:** ![Griff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/f19dbf/32.png) [@Griff](https://www.ruby-forum.com/u/Griff)\
**Post date:** [February 15, 2007, 12:15am UTC](https://www.ruby-forum.com/t/how-to-work-with-a-xml-schema-with-ruby/85621/3 "2007-02-15T00:15:56Z")

</div>

On Feb 14, 2007, at 4:20 PM, Griff wrote:

> I need to take a XML schema and do some arbitrary text generation  
> using it’s contents.
> 
> Any idea where I should start?

If I were doing this, my first choice would be XQuery and my second  
would be XSLT. If you’d like, send me a small snippet of your XML  
Schema, tell me what you’d like to generate from it, and I’ll send  
you an example of how to do it.

---

<div class="post-metadata">

**Author:** ![Griff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/f19dbf/32.png) [@Griff](https://www.ruby-forum.com/u/Griff)\
**Post date:** [February 15, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/how-to-work-with-a-xml-schema-with-ruby/85621/4 "2007-02-15T16:30:25Z")

</div>

You know after I posted this I thought to myself that an xml schema is  
just plain xml like anything else. I could use xquery couldn’t ?!

Thanks for you post.
