package net.fdms.Function.Convert 
{
	/**
	 * XML对象转换为object
	 * 2011/5/14 14:16
	 * @author Dawnboy
	 */
	public class XMLtoOBJECT 
	{
		
		public function XMLtoOBJECT() 
		{
			
		}
		
		/**
		 * 转换XML为OB
		 * @param	xml
		 * @return
		 */
		public static function convert(Xmllist:*):Object {
			var foo:Object = new Object();
			for each(var prop:XML in Xmllist.attributes()) {
				var ob:Object = prop.localName();
				foo[ob] = Xmllist.@[ob];
				foo.content = (Xmllist.text())?Xmllist.text():null;
			}
			return foo;
		}
		
	}

}