How to insert tags?

Dear Professionals !

HTML-page has a tag:

<li>
<div class="itemLabel">NAME</div>
<div class="itemValue"><%= @fmod.NAME %></div>
</li>

How to insert(in the Ruby program) almost same tags after this tag with
other parameters than NAME ?

Warm Wishes

···

--
Posted via http://www.ruby-forum.com/.

Since you're editing HTML, I'd use Nokogiri:
http://nokogiri.org/tutorials/modifying_an_html_xml_document.html

···

--
Posted via http://www.ruby-forum.com/.

Hello,

Dear Professionals !

HTML-page has a tag:

<li>
<div class="itemLabel">NAME</div>
<div class="itemValue"><%= @fmod.NAME %></div>
</li>

How to insert(in the Ruby program) almost same tags after this tag with
other parameters than NAME ?

Not sure what are you trying to do, create the example above or scrap it? If you want to scape it use Nokogiri, if you want to create it, you can use many languages that produce HTML: ERB, HAML, SLIM, etc.

in HAML would be:

%li
  .itemLabel NAME
  .itemValue= @fmod.NAME

See here: Haml :: Tutorial and http://html2haml.heroku.com

Warm Wishes

--
Posted via http://www.ruby-forum.com/\.

Regards,

Panagiotis (atmosx) Atmatzidis

email: atma@convalesco.org
URL: http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5

···

On 9 Αυγ 2013, at 09:21 , Mak K. <lists@ruby-forum.com> wrote:
--
The wise man said: "Never argue with an idiot. They bring you down to their level and beat you with experience."