# Help on how append html tag

**URL:** <https://www.ruby-forum.com/t/help-on-how-append-html-tag/183480>\
**Category:** Rails\
**Created:** [February 15, 2010, 11:55am UTC](https://www.ruby-forum.com/t/help-on-how-append-html-tag/183480 "2010-02-15T11:55:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [February 15, 2010, 11:55am UTC](https://www.ruby-forum.com/t/help-on-how-append-html-tag/183480/1 "2010-02-15T11:55:52Z")

</div>

Dear all,

@doc = Hpricot(open("#{RAILS\_ROOT}" +  
“/public/server\_exe/#{list.file\_path}”))

i need to add ![](https://www.ruby-forum.com/ScreenCapture/#%7B@file_name%7D) element to my  
@doc hpricot instance…

Please help me… how can i add the above img src element to the @doc  
hpricot instance…

Thank you

---

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [February 15, 2010, 12:34pm UTC](https://www.ruby-forum.com/t/help-on-how-append-html-tag/183480/2 "2010-02-15T12:34:59Z")

</div>

Newb N. wrote:

> Dear all,
> 
> @doc = Hpricot(open("#{RAILS\_ROOT}" +  
> “/public/server\_exe/#{list.file\_path}”))
> 
> i need to add ![](https://www.ruby-forum.com/ScreenCapture/#%7B@file_name%7D) element to my  
> @doc hpricot instance…
> 
> Please help me… how can i add the above img src element to the @doc  
> hpricot instance…
> 
> Thank you

Is it not possible to do so?

---

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [February 15, 2010, 12:49pm UTC](https://www.ruby-forum.com/t/help-on-how-append-html-tag/183480/3 "2010-02-15T12:49:14Z")

</div>

On 15 February 2010 10:55, Newb N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Dear all,
> 
> @doc = Hpricot(open(“#{RAILS\_ROOT}” +  
> “/public/server\_exe/#{list.file\_path}”))
> 
> i need to add ![](https://www.ruby-forum.com/ScreenCapture/#{@file_name}) element to my  
> @doc hpricot instance…
> 
> Please help me… how can i add the above img src element to the @doc  
> hpricot instance…

What have you tried so far to achieve this?

Have you looked at the docs for hpricot and used google?

Colin

---

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [February 15, 2010, 1:18pm UTC](https://www.ruby-forum.com/t/help-on-how-append-html-tag/183480/4 "2010-02-15T13:18:42Z")

</div>

Any sample code or links since i can try with taht

---

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [February 15, 2010, 1:50pm UTC](https://www.ruby-forum.com/t/help-on-how-append-html-tag/183480/5 "2010-02-15T13:50:08Z")

</div>

On 15 February 2010 12:18, Newb N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Any sample code or links since i can try with taht

You can find documentation at [http://wiki.github.com/hpricot/hpricot/](http://wiki.github.com/hpricot/hpricot/)  
with links to examples at  
[http://wiki.github.com/hpricot/hpricot/an-hpricot-showcase](http://wiki.github.com/hpricot/hpricot/an-hpricot-showcase). I would  
suggest understanding the three pages linked to under Fundamentals  
there. The last has an example of adding a tag.

Colin

---

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [February 15, 2010, 12:53pm UTC](https://www.ruby-forum.com/t/help-on-how-append-html-tag/183480/6 "2010-02-15T12:53:31Z")

</div>

Colin L. wrote:

> On 15 February 2010 10:55, Newb N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Dear all,
> > 
> > @doc = Hpricot(open(“#{RAILS\_ROOT}” +  
> > “/public/server\_exe/#{list.file\_path}”))
> > 
> > i need to add ![](https://www.ruby-forum.com/ScreenCapture/#{@file_name}) element to my  
> > @doc hpricot instance…
> > 
> > Please help me… how can i add the above img src element to the @doc  
> > hpricot instance…
> 
> What have you tried so far to achieve this?
> 
> Have you looked at the docs for hpricot and used google?
> 
> Colin

Yes, sorry although i could not understand .  
please provide me some help
