Support traversable structure in XML serializer