# Nokogiri: Is there a way to append DOM to another DOM?

**URL:** <https://www.ruby-forum.com/t/nokogiri-is-there-a-way-to-append-dom-to-another-dom/177231>\
**Category:** Ruby\
**Created:** [October 13, 2009, 10:16pm UTC](https://www.ruby-forum.com/t/nokogiri-is-there-a-way-to-append-dom-to-another-dom/177231 "2009-10-13T22:16:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [October 13, 2009, 10:16pm UTC](https://www.ruby-forum.com/t/nokogiri-is-there-a-way-to-append-dom-to-another-dom/177231/1 "2009-10-13T22:16:51Z")

</div>

Hi all

Is there a way to append a DOM to another DOM?

Nokogiri::HTML(“

Test

”).join(Nokogiri::HTML(“

Test2

”))

Thanks  
Josh

---

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [October 13, 2009, 10:39pm UTC](https://www.ruby-forum.com/t/nokogiri-is-there-a-way-to-append-dom-to-another-dom/177231/2 "2009-10-13T22:39:41Z")

</div>

2009/10/13 Joshua M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Hi all
> 
> Is there a way to append a DOM to another DOM?
> 
> Nokogiri::HTML(“
> 
> Test
> 
> ”).join(Nokogiri::HTML(“
> 
> Test2
> 
> ”))

Take a look at HTML document fragments. Sorry, I have not the doc at  
hand right now.

Serabe

---

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [October 14, 2009, 12:42am UTC](https://www.ruby-forum.com/t/nokogiri-is-there-a-way-to-append-dom-to-another-dom/177231/3 "2009-10-14T00:42:03Z")

</div>

On Oct 13, 2009, at 1:16 PM, Joshua M. wrote:

> Hi all
> 
> Is there a way to append a DOM to another DOM?
> 
> Nokogiri::HTML(“
> 
> Test
> 
> ”).join(Nokogiri::HTML(“
> 
> Test2
> 
> ”))

Yes, but it depends on the semantics you’re looking for. Can you send  
an email to the nokogiri list and include a brief description of the  
problem you’re trying to solve along with the issues you’re  
encountering?

I would appreciate it! 🙂

The list can be found here:

```
 http://groups.google.com/group/nokogiri-talk

```

* * *

Aaron P.  
[http://tenderlovemaking.com](http://tenderlovemaking.com)
