# Changing ActiveRecord serialize format to XML instead of YML

**URL:** <https://www.ruby-forum.com/t/changing-activerecord-serialize-format-to-xml-instead-of-yml/136735>\
**Category:** Rails\
**Created:** [May 5, 2008, 11:54pm UTC](https://www.ruby-forum.com/t/changing-activerecord-serialize-format-to-xml-instead-of-yml/136735 "2008-05-05T23:54:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![glenn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/4bbf92/32.png) [@glenn](https://www.ruby-forum.com/u/glenn)\
**Post date:** [May 5, 2008, 11:54pm UTC](https://www.ruby-forum.com/t/changing-activerecord-serialize-format-to-xml-instead-of-yml/136735/1 "2008-05-05T23:54:06Z")

</div>

Hello,

So far, ActiveRecord serialize is working great for me to save  
arbitrary data.  
I would like to know if there is a way to change the format of  
ActiveRecord serialize to XML instead of YML.

I like the readability of YML, but I need to search serialized fields  
in the database.  
So, it would make sense to use XML because most database vendors  
supports XML value extraction, e.g,. ExtractValue function in MySQL.

Please let me know if there is a way to configure to XML.  
Thanks in advance.

Glen
