Converting an FDF to XML format
Contents[ Hide ]
The Aspose.Pdf.Facades namespace in Aspose.PDF for .NET supports AcroForms very well. It also supports importing and exporting form data to different file formats like FDF, XFDF, and XML. However, sometimes developers might need to convert one format into another one. This article looks at the feature that converts FDF into XML.
FDF stands for Forms Data Format, and an FDF file contains the form values in a key/value pair. We also know that XML file contains the values as tags. Where, mostly the key is represented as the tag name and value is represented as the value within that tag. Now, Aspose.Pdf.Facades provides us the flexibility to convert an FDF file format into an XML format.
We can use FormDataConverter class for this purpose. This class provides us different method to convert one data format into another format. In this article, we will just use one method named ConvertFdfToXml. This method takes FDF file as an input or source stream and saves it into XML format.
The following code snippet shows you how to convert an FDF file into an XML file: