From: Jim Weirich Date: 2006-03-14T05:53:09+09:00 Subject: Re: Wrapping XML document in Class Miles Monroe wrote: > I would like to use Ruby and REXML to wrap an XML document and allow > access to the element nodes, attributes, and text. Essentially I need > an XML document builder loosely coupled from the document. > > It seems like Ruby is powerful enough to code generate a class given an > XML document or build an object at run-time with the appropriate > accessors. > > For instance: > > order = XmlBuilder.new [... example elided ...] Are you wanting to build a DOM object, or build a string containing XML markup? If the later, Builder::XmlMarkup will do this. If the former, it would be interesting to create a Builder with a similar API to Buidler::XmlMarkup, but generated DOM trees instead of strings. Or perhaps you are looking for something completely different. XML Builder Link: http://builder.rubyforge.org/ -- -- Jim Weirich -- Posted via http://www.ruby-forum.com/.