How to specify root node name

Dec 5, 2013 at 4:04 PM
I am using YAX to serialize a generic collection but would like to specify the root node name.

How do I do that - ie - in the example below I am getting a YAX generated name <ListOfICRMSPTransaction> instead of what I really want
<transactions>
<transaction>
<symbol>IBM</symbol>
<type>BUY</type>
</transaction>
<transaction>
<symbol>IBM</symbol>
<type>SELL</type>
</transaction>
</transactions>
Coordinator
Dec 7, 2013 at 1:59 PM
Have you tried the YAXSerializeAs attribute?
Dec 7, 2013 at 5:54 PM
I was trying to serialize the collection directly - I added a CollectionHolder object and added the YAXSerializeAs attribute on that object and got the required behavior.

Ideally I would like to serialize the collection directly avoiding the need to create the holder object - but the creation of that extra "holder" class is minimal so not that worried about it.

Thanks.

Whatty