public final class XFA extends Object
Represents XML form regarding XML Forms Architecture (XFA).
Modifier and Type | Method and Description |
---|---|
void |
beginCachedUpdates()
Start cached updates mode.
|
void |
endCachedUpdates()
Ends cahced updates and saves all data into document structure.
|
static void |
flattenXfaField(com.aspose.ms.System.Xml.XmlNode field)
Flatten field of XFA form.
|
String |
get_Item(String path)
Gets data node value according
path . |
com.aspose.ms.System.Xml.XmlNode |
getConfig()
XFA Config component of an XFA form.
|
com.aspose.ms.System.Xml.XmlNode |
getDatasets()
XFA Datasets component of an XFA form.
|
String[] |
getFieldNames()
List of field names in the form template.
|
HashMap<String,String> |
getFieldsWithTextValuesMap()
Returns map with short field name and it's string value for all fields.
|
com.aspose.ms.System.Xml.XmlNode |
getFieldTemplate(String fieldName)
Returns XML node of XFA field tempalte.
|
com.aspose.ms.System.Xml.XmlNodeList |
getFieldTemplates()
Returns list of all field templates on XFA form.
|
com.aspose.ms.System.Xml.XmlNode |
getForm()
Gets XFA Form Component of an XFA form.
|
com.aspose.ms.System.Xml.XmlNamespaceManager |
getNamespaceManager_()
Gets the namespace for the XFA form.
|
com.aspose.ms.System.Xml.XmlNamespaceManager |
getNamespaceManager()
Returns namespace manager with namespaces used for template and data.
|
com.aspose.ms.System.Xml.XmlNode |
getTemplate()
XFA Template component of an XFA form.
|
com.aspose.ms.System.Xml.XmlDocument |
getXDP()
XML Data Package (all XFA form components within a surrounding XML container).
|
com.aspose.pdf.XfaFieldInteractive |
getXfaField(String path) |
void |
set_Item(String path,
String value)
Gets data node value according
path . |
void |
setFieldImage(String fieldName,
InputStream image)
Sets image for XFA field.
|
void |
setFieldImageInternal(String fieldName,
com.aspose.ms.System.IO.Stream image) |
String |
tryGetTemplateString(String value)
Tries to export calculation script from XFA form.
|
public com.aspose.ms.System.Xml.XmlNode getTemplate()
XFA Template component of an XFA form.
public String tryGetTemplateString(String value)
value
- The tag namepublic com.aspose.ms.System.Xml.XmlNode getForm()
Gets XFA Form Component of an XFA form.
public com.aspose.ms.System.Xml.XmlNode getDatasets()
XFA Datasets component of an XFA form.
public com.aspose.ms.System.Xml.XmlNode getConfig()
XFA Config component of an XFA form.
public com.aspose.ms.System.Xml.XmlDocument getXDP()
XML Data Package (all XFA form components within a surrounding XML container).
public String get_Item(String path)
Gets data node value according path
.
path
- Data node path, e.g. form1[0].Subform1[0].Subform2[0].Subform3[0].TextField[0]. Be sure to
include indices even if data contains only single occurences of each nodes, i.e. write
node1[0].node2[0]... instead of node1.node2...public void set_Item(String path, String value)
Gets data node value according path
.
path
- String valuevalue
- String valuepublic String[] getFieldNames()
List of field names in the form template.
public com.aspose.ms.System.Xml.XmlNode getFieldTemplate(String fieldName)
Returns XML node of XFA field tempalte.
fieldName
- Path of the field which template must be found.public com.aspose.ms.System.Xml.XmlNodeList getFieldTemplates()
Returns list of all field templates on XFA form.
public com.aspose.ms.System.Xml.XmlNamespaceManager getNamespaceManager()
Returns namespace manager with namespaces used for template and data.
public com.aspose.ms.System.Xml.XmlNamespaceManager getNamespaceManager_()
Gets the namespace for the XFA form. The following namepsaces are defined: "data" for form data and "tpl" for form template.
public static void flattenXfaField(com.aspose.ms.System.Xml.XmlNode field)
Flatten field of XFA form.
field
- XFA form field node.public void beginCachedUpdates()
Start cached updates mode. All changes made to XFA will be cached and saved into document structure at EndCachedUpdates call. This allows to improve preformacne by avoiding redudant operations on saving XML packets into document when a lot of changes to XFA are made.
public void endCachedUpdates()
Ends cahced updates and saves all data into document structure.
public void setFieldImage(String fieldName, InputStream image)
Sets image for XFA field.
fieldName
- Name of the field.image
- Stream which contains image.public void setFieldImageInternal(String fieldName, com.aspose.ms.System.IO.Stream image)
public HashMap<String,String> getFieldsWithTextValuesMap()
Returns map with short field name and it's string value for all fields.
HashMap<String, String>
objectpublic final com.aspose.pdf.XfaFieldInteractive getXfaField(String path)