On 5 June 2013 19:10, Love U Ruby <li...@ruby-forum.com> wrote: > Eduardo Figarola wrote in post #1111343: >> Hi, the examples will be atached to the answer, I hope you can get a >> better idea of this methods. >> >> Regards, >> Eduardo Figarola. > > > can anyone tell me what the wrong I did here? > > node = Nokogiri::XML::Node.new( <p>This text contains
I expect you meant the first parameter passed to new to be a string, so it needs quotes round it .new("<p>......" Colin > <sup>superscript</sup> text.</p>, doc) # !> possibly useless use of a > variable in void context > node.description # => > # ~> -:77: syntax error, unexpected '<', expecting ')' > # ~> ...de = Nokogiri::XML::Node.new( <p>This text contains <sup>sup... > # ~> ... ^ > # ~> -:77: syntax error, unexpected tIDENTIFIER, expecting keyword_do or > '{' or '(' > # ~> ...ri::XML::Node.new( <p>This text contains <sup>superscript</s... > # ~> ... ^ > # ~> -:77: unknown regexp option - p > # ~> -:77: syntax error, unexpected ',' > # ~> ...up>superscript</sup> text.</p>, doc) > # ~> ... ^ > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/df4836c77d48b5dae009cc8a04a17dac%40ruby-forum.com?hl=en-US. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtboO-g2qrZyt-4kkRHt89xzCJAUpZrQm39zm8E%3DK70hQ%40mail.gmail.com?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.