Aspose.Pdf.Facades.Form.ImportXml and missing xml attributes

Hi

I am attempting to inport XML into a XFA form using the Aspose.Pdf.Facades.Form.ImportXml method but it seems that attributes on repeating elements are not imported?

My XML looks like;

<?xml version="1.0" encoding="utf-8"?>
<xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
	<formData>
		<codeData>
			<OccupationCode>
				<code>
					<id>77</id>
					<description>Agriculture</description>
					<dependentCodeSet codeSetName="ElibigleCertificateIIICode">
						<id>1</id>
						<id>17</id>
					</dependentCodeSet>
					<dependentCodeSet codeSetName="CertificateCode">
						<id>7</id>
						<id>8</id>
						<id>10</id>
					</dependentCodeSet>
				</code>
			</OccupationCode>
		</codeData>
	</formData>
</xfa:data>

and the XML as seen by the XFA form looks like;

<xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
	<formData>
		<codeData>
			<OccupationCode>
				<code>
					<id>77</id>
					<description>Agriculture</description>
					<dependentCodeSet codeSetName="ElibigleCertificateIIICode">
						<id>1</id>
						<id>17</id>
					</dependentCodeSet>
					<dependentCodeSet>
						<id>7</id>
						<id>8</id>
						<id>10</id>
					</dependentCodeSet>
				</code>
			</OccupationCode>
		</codeData>
	</formData>
</xfa:data>

That is the attribute codeSetName="CertificateCode" on the second dependentCodeSet element has not been imported?

My C# code for this is taken from the samples.

Form form = new Form("ASPOSE.local.pdf", @"ASPOSE.updated.pdf");
System.IO.FileStream xmlInputStream = new FileStream(@"ASPOSE.xml", FileMode.Open);
form.ImportXml(xmlInputStream);
xmlInputStream.Close();
form.Save();
form.Close();

I have attached my test solution which demonstrates my problem, run this program and look at ASPOSE.updated.pdf in the bin directory. All this XFA form does is display the default dataset in a textbox, using the $data.saveXML("pretty"); statement in the calculate event.

This is my first attempt at working with Aspose.PDF so I am not at all confident with the product but it does seem strange that I get most of the XML imported.

Thanks

Bruce

Hi Bruce,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the sample application.

I am able to reproduce your mentioned issue regarding Importing XML file. Your issue has been registered in our issue tracking system with issue id: PDFNEWNET-34531. We will notify you via this forum thread regarding any updates against your issue.

Sorry for the inconvenience,

The issues you have found earlier (filed as PDFNEWNET-34531) have been fixed in Aspose.Pdf for .NET 7.6.0.


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

Hi,

Thanks you very much, I can confirm this problem is fixed in the 7.6 release.

Regards

Bruce

Hi Bruce,


I am pleased to share that your problem is resolved. Please continue using our products and in case of any further query, please feel free to contact.