Add WordPress Meta Box saved form input to WordPress RSS feed [duplicate]

I figured out the code to add to the above tutorial article about creating a Meta Box that saves values. This code puts the post meta into its own tag in the RSS. I added the post meta “meta-text” to the code below to work with the tutorial.

add_action('rss2_item', 'add_my_custom_field_node');

function add_my_custom_field_node() {
global $post;
$metaValue = get_post_meta($post->ID, 'meta-text', true);
if(!empty($metaValue)):
    echo("<my-custom-field>{$metaValue}</my-custom-field>");
endif;
}