Escape << in word document

When << is used inside word templates (linq), we are getting below exception.

java.lang.IllegalStateException: Character ‘<’ is unexpected.
at asposewobfuscated.zzQF.zzZ(Unknown Source)
Message:Character ‘<’ is unexpected.
at asposewobfuscated.zzG5.zzZ(Unknown Source)
at com.aspose.words.ReportingEngine.buildReport(Unknown Source)
Message:Character ‘<’ is unexpected.

Please help us in escaping these special characters.

Thanks,
John
Hi John,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please create a simple java application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we'll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click 'Reply' button that will bring you to the 'reply page' and there at the bottom you can include any attachments with that post by clicking the 'Add/Update' button.

Please find sample document attached. I tried to use angular braces, it gives me an error.


Our template has some sections, where we print angular brace as text and getting error there.

Please help.

Thanks,
John
Hi John,

Thanks for sharing the document. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-14288. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi John,

Thanks for your patience. It is to inform you that WORDSNET-14267 is not a bug. LINQ Reporting Engine throws an exception in the shared case. To avoid the exception, please put angle braces into a string-constant expression like in the following example:

<<["<>"]>>

We have attached the modified document with this post for your kind reference. Please let us know if you have any more queries.