ruby - Can anybody translate this PHP code into Rails -
I have a hard time translating this php code into Rail.
$ doc = new DOMDocument (); $ Doctor & gt; LoadXML (in $); / * Shuffle through XML and store data points in the $ list array / $ params = $ doc- & gt; GetElementsByTagName ("Ultimate"); Forex Currency ($ param as the ultimate $) {$ names = $ param- & gt; GetElementsByTagName ("name"); $ Name = $ name- & gt; Items (0) - & gt; Nodeville; $ Value = $ param- & gt; GetElementsByTagName ("value"); $ Value = $ value- & gt; Items (0) - & gt; Node vela; $ List [$ name] = "'" .mysql_escape_string ($ value). "'"; } There is not much in this question with Rail, Ruby + Dome. You can take a look at Ruby and Rail Document for XML Parser.
Comments
Post a Comment