We have a pdf form with xfa init.
I grab and save the xfa data locally to a xml file.
<?xml version="1.0" encoding="UTF-8"?><xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
<form1>
<Name>J Motiwala</Name>
<Title>Senior Software Engineer</Title>
<Deptartment>development</Deptartment>
<Phone>678-751-9448</Phone>
<Date>2017-03-10</Date>
<DateNeeded>2017-03-10</DateNeeded>
<Reason>Training course</Reason>
<Payee>Safari</Payee>
<Amount>125.00000000</Amount>
<Date/>
<DateNeeded/>
<Reason/>
<Payee/>
<Amount/>
<Date/>
<DateNeeded/>
<Reason/>
<Payee/>
<Amount/>
<Date/>
<DateNeeded/>
<Reason/>
<Payee/>
<Amount/>
<Date/>
<DateNeeded/>
<Reason/>
<Payee/>
<Amount/>
<Date/>
<DateNeeded/>
<Reason/>
<Payee/>
<Amount/>
<DeliveryInstructions>please send a cheque</DeliveryInstructions>
<Comments>training needed asap</Comments>
<AmountPaid/>
<CheckNo/>
<DateReceived/>
</form1>
</xfa:data>
Now it is possible this could also be
<?xml version="1.0" encoding="UTF-8"?><xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"/>
My question is if form1 tag a standard xfa tag, I could not find any documentation that states that it is.
My question is if a form1 tag is not found could I generate it via code and simply update the xml?
Also can the tag be named anything other than form1.
<form1>
is not standard XFA. In XFA, the designer of the form can use any XSD he wants for the <xfa:data>
. That's an advantage of XFA; people don't have to adapt their data to the form. Normally, there's also a data description part stored in the XFA XML. The syntax for this description looks somewhat like XSD, but it's not.
If you have an existing PDF, you cannot just "invent" new tags, because there's a data-binding between tag names and field names. If you introduce a tag that isn't known by the form, the corresponding data won't show up anywhere in the form.