Dear Aspose support,
I noticed the following behaviour; please consider the following XML that I load as XmlDataSource:
<DATA>
<INFO />
<Schweissrapport>
<KMTO1>10.1</KMTO1>
<ENDDT>2021-04-01 11:13:00.0</ENDDT>
<KMFROM1>9.8</KMFROM1>
<TRACKNR>test1 2</TRACKNR>
<S2_AUFTRAGENELEKTRODEN>true</S2_AUFTRAGENELEKTRODEN>
<S2_GEKLEBTER>true</S2_GEKLEBTER>
<S2_ALUTHERM>true</S2_ALUTHERM>
<S2_ELEKTRISCHE>true</S2_ELEKTRISCHE>
<S2_AUFTRAGENDRAHT>true</S2_AUFTRAGENDRAHT>
<STARTDT>2021-05-26 11:13:00.0</STARTDT>
<usedMaterial />
<additionalWork />
<weldingsTable />
<completedServices />
</Schweissrapport>
</DATA>
If in the template I write <<[Schweissrapport. TRACKNR]>> I get the expected output.
Now consider the following XML, similar to the above except for the removal first empty child “INFO”:
<DATA>
<Schweissrapport>
<KMTO1>10.1</KMTO1>
<ENDDT>2021-04-01 11:13:00.0</ENDDT>
<KMFROM1>9.8</KMFROM1>
<TRACKNR>test1 2</TRACKNR>
<S2_AUFTRAGENELEKTRODEN>true</S2_AUFTRAGENELEKTRODEN>
<S2_GEKLEBTER>true</S2_GEKLEBTER>
<S2_ALUTHERM>true</S2_ALUTHERM>
<S2_ELEKTRISCHE>true</S2_ELEKTRISCHE>
<S2_AUFTRAGENDRAHT>true</S2_AUFTRAGENDRAHT>
<STARTDT>2021-05-26 11:13:00.0</STARTDT>
<usedMaterial />
<additionalWork />
<weldingsTable />
<completedServices />
</Schweissrapport>
</DATA>
In this case all the report fields are no more resolved, and are left blank in the generated document.
This is not blocking in our application as we have control over XML generation and can insert the empty element, but it is an unexpected behviour, possibly difficult to debug, so I’d like to ask:
Is this behaviour expected? Does the root node need at least one direct simple child to be parsable?
Thanks in advance for your attention,
Kind regards
FV