Free Support Forum - aspose.com

Conditions in my xml template

Hi everybody,


I would like to generate a PDF using a model.
My problem is that I can’t test some values to print or not these. I can do that :

@if(model.Name)$
>@model.Name$
@endif$

But I would like also to do that kind of thing :

@if(model.Name == ‘alex’)$
>@model.Name$
@endif$

Do you know if there exists any issue ?

Thank you in advance for your help !

Hi Alexis,


Thanks for using our products.

Instead of performing operation/conditioning in XML file, you may define the structure in XML file and perform rest of the conditional operations in application code. You may access individual XML objects and specify either to display them or not. Please visit the following link for more information on


In case of any further query, please feel free to contact.