We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Linq + xml reference inner attribute

I have this xml:


ABC

Simone
123



In the template i use
<<[s.test]>> or simply <<[test]>>

and use this to build report:

DataSet dataSet = new DataSet();
dataSet.readXml(new ByteArrayInputStream(dati.getBytes(StandardCharsets.UTF_8)));
ReportingEngine engine = new ReportingEngine();
engine.getKnownTypes().add(Util.class);
engine.buildReport(doc, dataSet, “s”);

but in the generated pdf comes out:
com.aspose.words.net.System.Data.DataRowCollection@24c31ff5 and not ABC

I attach source code

Thanks

Hi Simone,

Thanks for your inquiry. I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSJAVA-1157. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSJAVA-1157) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Sorry, but this isnt’s still working in 15.9.0.

Now comes this error:

java.lang.IllegalStateException: An error has been encountered at the end of expression ‘test]>’. Can not get the value of member ‘test’ on type ‘class com.aspose.words.net.System.Data.DataSet’.
at asposewobfuscated.zzTE.zzn(Unknown Source)

Hi Simone,

Thanks for your inquiry. Please modify the test field as shown below. I have attached the modified template document with this post for your kind reference.

<<[s.iscrizionePdf.first().test]>>
OR
<<[iscrizionePdf.first().test]>>

Please let us know if you have any more queries.

Ok, in this way it works, thanks

Simone

Hi Simone,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.