<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using ActiveRecord&#8217;s to_xml to produce custom xml including deep level associations</title>
	<atom:link href="http://blog.smartlogicsolutions.com/2008/09/10/using-activerecords-to_xml-to-produce-custom-xml-including-deep-level-associations/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.smartlogicsolutions.com/2008/09/10/using-activerecords-to_xml-to-produce-custom-xml-including-deep-level-associations/</link>
	<description>News and updates from the people at SmartLogic Solutions</description>
	<lastBuildDate>Sat, 17 Dec 2011 12:57:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: justin</title>
		<link>http://blog.smartlogicsolutions.com/2008/09/10/using-activerecords-to_xml-to-produce-custom-xml-including-deep-level-associations/comment-page-1/#comment-5362</link>
		<dc:creator>justin</dc:creator>
		<pubDate>Sat, 17 Dec 2011 12:57:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=237#comment-5362</guid>
		<description>With the deep_xml method example, children aren&#039;t wrapped in a  tag, so I had to define the method like:

def deep_xml(builder=nil)
  to_xml(:builder =&gt; builder) do &#124;xml_builder&#124;
    xml_builder.children { &#124;xml&#124;
      children.each{&#124;child&#124; child.deep_xml(xml)}
    }
  end
end</description>
		<content:encoded><![CDATA[<p>With the deep_xml method example, children aren&#8217;t wrapped in a  tag, so I had to define the method like:</p>
<p>def deep_xml(builder=nil)<br />
  to_xml(:builder =&gt; builder) do |xml_builder|<br />
    xml_builder.children { |xml|<br />
      children.each{|child| child.deep_xml(xml)}<br />
    }<br />
  end<br />
end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cococoder</title>
		<link>http://blog.smartlogicsolutions.com/2008/09/10/using-activerecords-to_xml-to-produce-custom-xml-including-deep-level-associations/comment-page-1/#comment-5233</link>
		<dc:creator>cococoder</dc:creator>
		<pubDate>Fri, 08 Apr 2011 19:28:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=237#comment-5233</guid>
		<description>What can i say! you are a god among men lol . cheers for that  much appreciated.</description>
		<content:encoded><![CDATA[<p>What can i say! you are a god among men lol . cheers for that  much appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Cartwright</title>
		<link>http://blog.smartlogicsolutions.com/2008/09/10/using-activerecords-to_xml-to-produce-custom-xml-including-deep-level-associations/comment-page-1/#comment-5207</link>
		<dc:creator>Jason Cartwright</dc:creator>
		<pubDate>Sat, 05 Feb 2011 01:21:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=237#comment-5207</guid>
		<description>Glenn, this builder trick is exactly what I needed... but what about to_json? Does it support the same type of block/builder solution?</description>
		<content:encoded><![CDATA[<p>Glenn, this builder trick is exactly what I needed&#8230; but what about to_json? Does it support the same type of block/builder solution?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Kruger</title>
		<link>http://blog.smartlogicsolutions.com/2008/09/10/using-activerecords-to_xml-to-produce-custom-xml-including-deep-level-associations/comment-page-1/#comment-5205</link>
		<dc:creator>Michael Kruger</dc:creator>
		<pubDate>Sun, 30 Jan 2011 22:27:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=237#comment-5205</guid>
		<description>Good insight, but I have a related but somewhat different problem. With an ActiveRecord.find result (81 columns/fields - large number of records) I need to override the builder to format number values (commas and exactly 2 decimals [the DBF won&#039;t handle it] to print reports) before writing out to XML. I&#039;ve spent hours in the blogosphere and forums and your post is the closest to on-point. I can readily do it in AS3 but I&#039;m trying to shift as much work as possible to the Rails back-end -- Flash times-out on me even with asynchronous processing. And I can&#039;t seem to get my arms around xmlmarkup.rb. Do you know a place to point me?</description>
		<content:encoded><![CDATA[<p>Good insight, but I have a related but somewhat different problem. With an ActiveRecord.find result (81 columns/fields &#8211; large number of records) I need to override the builder to format number values (commas and exactly 2 decimals [the DBF won't handle it] to print reports) before writing out to XML. I&#8217;ve spent hours in the blogosphere and forums and your post is the closest to on-point. I can readily do it in AS3 but I&#8217;m trying to shift as much work as possible to the Rails back-end &#8212; Flash times-out on me even with asynchronous processing. And I can&#8217;t seem to get my arms around xmlmarkup.rb. Do you know a place to point me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gary</title>
		<link>http://blog.smartlogicsolutions.com/2008/09/10/using-activerecords-to_xml-to-produce-custom-xml-including-deep-level-associations/comment-page-1/#comment-4956</link>
		<dc:creator>gary</dc:creator>
		<pubDate>Thu, 04 Nov 2010 07:34:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=237#comment-4956</guid>
		<description>Thanks a lot Glenn.
It is great and really save my time.</description>
		<content:encoded><![CDATA[<p>Thanks a lot Glenn.<br />
It is great and really save my time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan</title>
		<link>http://blog.smartlogicsolutions.com/2008/09/10/using-activerecords-to_xml-to-produce-custom-xml-including-deep-level-associations/comment-page-1/#comment-860</link>
		<dc:creator>Alan</dc:creator>
		<pubDate>Tue, 17 Mar 2009 12:40:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.smartlogicsolutions.com/?p=237#comment-860</guid>
		<description>Thanks for this, Glenn. I knew that this must be possible without overwriting ActiveRecord but hadn&#039;t thought of passing the builder via a block. Saved me some time and effort :)</description>
		<content:encoded><![CDATA[<p>Thanks for this, Glenn. I knew that this must be possible without overwriting ActiveRecord but hadn&#8217;t thought of passing the builder via a block. Saved me some time and effort :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

