From: Max You Date: 2010-06-17T02:07:39+09:00 Subject: transmitting raw data vs. tree-structured data Hi, I'm trying to decide using one of two approaches getting tree-structured data to users. approach #1: build the tree from raw data in rails model code, then transfer it via AJAX in XML approach #2: transfer all raw data in XML form first, then use javascript to build the tree. The problem with approach #1 is that I'm currently stuck doing it. Building the tree in model code is easy; but I'm having all sort of problems transferring it. (I can't use hash.to_xml directly since each key is an object, and using object.to_xml while building to tree results in incorrect rendering) The problem with approach #2 is I don't know if javascript is power enough to handle "building a tree from xml, preferably using a hash that can have associative arrays as keys", which is why I want to ask around and post on this forum. I'm new to both Rails and javascript. Anyone has any ideas? -- Posted via http://www.ruby-forum.com/.