What is XML?
XML, short for Extensible Markup Language, is a plain-text format that wraps pieces of data in named tags. Both people and programs can read it, so it is used to exchange data between systems: invoices, product catalogs, configuration files and many archives. Unlike a PDF, which describes how a page looks, XML describes what the data means.
What XML looks like
Data sits between an opening and a closing tag, for example a tag called total around an amount. Tags can be nested, so a document can have pages that contain lines that contain words. Because every item is labeled, a script can read just the part it needs without guessing from position. The format has strict rules, such as closing every tag, so a file that breaks them is rejected by readers.
XML and PDF
The two formats have different jobs. A PDF is for reading and printing, and its content is stored by position on the page. XML is for machines. Exporting a PDF to XML in AuraDoc writes the text page by page into a structured file that other programs can read. It does not recover tables or fields as meaningful data; it organizes the text. A PDF can also carry an XML file as an attachment, which some electronic invoice standards use.
Using the result
Exported XML is useful to feed a database, a search index or an archive system with the words of a document, or to process many files with a script. For scans, run OCR first, because a picture has no text to export. Open the file in a text editor to see its structure before you build anything on it.
Tools that use this
Guides that put it into practice
Common questions
- Is XML the same as HTML?
- They look alike but serve different purposes. HTML tells a browser how to show a page, while XML labels data so that programs can understand it.
- Can a PDF contain XML?
- Yes. An XML file can be attached inside a PDF, and some invoice standards place a machine-readable XML next to the readable pages.
- Does PDF to XML keep the layout?
- It keeps the text and its order by page, not the visual layout. For a layout that looks like the original, keep the PDF itself.