Weblog » Tags » xml (all)
-
functional test試用
試其他格式,可以咁: get :index, { :format => "xml" } 畀埋param get :index, { :gate_id => gates(:general).id } 要用埋basic authorisation @request.env['HTTP_AUTHORIZATION'] = "Basic " + Base64::b64encode("username:password") -
Rails 2.1.1個to_xml出問題
Rails 2.1.1個to_xml出問題,單個話NoMethodError: undefined method `to_xml',多個就話RuntimeError: Not all elements respond to to_xml。 downgrade返去2.1.0就無事。 呢個要研究一下。㗰咗我幾粒鐘去搵個原因出來。 -
XML轉String
想將Flex XML咁個仔轉String,可以咁 public function xmlChildToString(xml:XML, childName:String):String { return xml[childName].toString(); } -
ActiveRecord 轉 XML
Active Record 嘅 to_xml方法,可以將attribute轉做XML。佢重可以將method return value轉做XML。 Active Record轉XML參攷Serialization -
XML tag名
XML tag名可以靠 name()呢個method拎出來。 好似咁 var x:XML = <form><editor>Man</editor></form>; x.name(); 就會出 form x.edit.name(); 就會出editor -
flex object 同 xml
flex所有Object 同 XML 都可以用 []來讀define property,咁就可以掉條String入去拎返資料出來。 好似咁 var x:XML=<celebration><event>Establishment</event><contact>Mary</contact></celebration>; var o:Object; var s:S… -
E4X article
http://www.xml.com/pub/a/2007/11/28/introducing-e4x.html -
Rails XML include
Rails可以include 幾個table夾埋一個XML。 方法係 format.xml { render => :xml, :xml => @toys.to_xml(:include => [:parameter, :specification]) } 好處係將佢一抽過,唔使逐次攞。 唔好處係一次過拎出來,可能會出大量資料。加重server負擔,減慢傳送速度。 如果係Ajax或者Flex呢類client,就可以分開table… -
改Application Controller
拎走XML dasherize XML Error output module ActiveSupport #:nodoc: module CoreExtensions #:nodoc: module Hash #:nodoc: module Conversions # We force :dasherize to be false, since we never want … -
Cross site xml
要Flex拎出其他domain嘅xml。 可以咁寫 <?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <allow-access-from domai…
ruby_omnibus
-
- Name: ruby_omnibus
- Gender: Male
- Member Since: 1/22/2008
-
True
Connect
Recent Weblogs
-
Firefox度改語文
Firefox改語文。 C:\Program Files\Mozilla Firefox\res\l... -
裝Attachment_fu
裝attachment_fu畀Rails用好易。 首先裝咗ImageScience先。 裝法: $... -
Rails format
Rails要回返啲嘢畀client之前,會check返有client有send啲乜Accept過來。...

