Export to XML in C++
Contents
[
Hide
]
Use Form for this task. The examples below retain the original C++ code and API Reference steps.
Export XML
Export the bound form data to an XML output stream.
- Create Form.
- Bind the PDF input with Facade::BindPdf().
- Write XML data with Form::ExportXml().
- Use the output stream as the exported data file.
#include <Aspose.PDF.Cpp/Facades/Form.h>
#include <system/io/file.h>
#include <system/io/file_stream.h>
#include <system/string.h>
namespace Facades::Examples::PDF_Form
{
using namespace System;
using namespace Aspose::Pdf;
using namespace Aspose::Pdf::Facades;
using Form = Aspose::Pdf::Facades::Form;
void ExportXml(String inputFile, String outputFile)
{
auto form = MakeObject<Form>();
auto outputStream = System::IO::File::Create(outputFile);
form->Facade::BindPdf(inputFile);
form->ExportXml(outputStream);
}
} // namespace Facades::Examples::PDF_Form