# Add xml feature to an object

**URL:** <https://www.ruby-forum.com/t/add-xml-feature-to-an-object/89464>\
**Category:** Rails\
**Created:** [March 20, 2007, 5:36pm UTC](https://www.ruby-forum.com/t/add-xml-feature-to-an-object/89464 "2007-03-20T17:36:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thenakedsingularity](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e0b2c6/32.png) [@thenakedsingularity](https://www.ruby-forum.com/u/thenakedsingularity)\
**Post date:** [March 20, 2007, 5:36pm UTC](https://www.ruby-forum.com/t/add-xml-feature-to-an-object/89464/1 "2007-03-20T17:36:58Z")

</div>

This should be simple. What is the quickest way to add XML to a  
plain object so I can call object.to\_xml()? I did some digging but did  
not find anything quick. I think that’s built into the ActiveRecord  
but what about a plain object?

```
Thanks!
```

---

<div class="post-metadata">

**Author:** ![thenakedsingularity](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e0b2c6/32.png) [@thenakedsingularity](https://www.ruby-forum.com/u/thenakedsingularity)\
**Post date:** [March 20, 2007, 5:44pm UTC](https://www.ruby-forum.com/t/add-xml-feature-to-an-object/89464/2 "2007-03-20T17:44:58Z")

</div>

you mean something like this?

[http://clabs.org/clxmlserial.htm](http://clabs.org/clxmlserial.htm)

---

<div class="post-metadata">

**Author:** ![thenakedsingularity](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e0b2c6/32.png) [@thenakedsingularity](https://www.ruby-forum.com/u/thenakedsingularity)\
**Post date:** [March 20, 2007, 6:52pm UTC](https://www.ruby-forum.com/t/add-xml-feature-to-an-object/89464/3 "2007-03-20T18:52:18Z")

</div>

Yup. Thanks!

On Mar 20, 11:39 am, “Chris H.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
