GroupDocs.Parser for Node.js via Java provides the functionality to export data to XML files. The XmlExporter class is used for this.
The following example shows how to extract barcodes from a document and export them to the XML file:
constgroupdocs=require('@groupdocs/groupdocs.parser');// Create an instance of Parser class
constparser=newgroupdocs.Parser('Barcodes.pdf');try{// Check if the document supports barcodes extraction
if(!parser.getFeatures().isBarcodes()){console.log("Document doesn't support barcodes extraction.");}else{// Create the options which are used for barcodes extraction
constoptions=newgroupdocs.BarcodeOptions(groupdocs.QualityMode.Low,groupdocs.QualityMode.Low,'QR');// Extract barcodes from the document
constbarcodes=parser.getBarcodes(options);// Export data to "data.xml" file
constexporter=newgroupdocs.XmlExporter();exporter.exportBarcodes(barcodes,'data.xml');}}finally{parser.close();}process.exit(0);
For Barcodes.pdf the data.xml file contains the QR codes from both pages (formatted for readability):
XmlExporter also has exportMetadata, exportDocumentInfo, exportTextAreas, exportTables and exportDocumentData methods.
More resources
Free online document parser App
Along with the full-featured library we provide simple but powerful free Apps.
You are welcome to parse documents and extract data from PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX, Emails and more with our Free Online Document Parser App.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.
On this page
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.