# Conditional value in xml node

**URL:** <https://www.ruby-forum.com/t/conditional-value-in-xml-node/103933>\
**Category:** Rails\
**Created:** [May 11, 2007, 7:19pm UTC](https://www.ruby-forum.com/t/conditional-value-in-xml-node/103933 "2007-05-11T19:19:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [May 11, 2007, 7:19pm UTC](https://www.ruby-forum.com/t/conditional-value-in-xml-node/103933/1 "2007-05-11T19:19:40Z")

</div>

in my rxml file , I wrote :

```
  xml.Person(:id => "u-"removed_email_address@domain.invalid_s, :name => @user.pseudo,

```

:email =\> @user.email\_address,  
:full\_name =\> full\_name, :hops =\> “0”, :imageURL =\>  
“#{photo\_path(@user)}”)

but when the full\_name is empty I have a value full\_name="" in the  
generated file which lead my ActionScript to display a label Name and no  
value

I can modify my As , but is there any possibility to writing differently  
my xml.Person ?

thanks

kad
