π¦ Extracting XML and XML ADF
Airparser can read XML that arrives in your emails and documents, for example ADF (Auto-lead Data Format) leads that dealerships receive from car marketplaces and websites. Choose how Airparser should treat XML in each inbox.
Which mode to choose
ADF lead β your fields. Airparser finds the ADF lead and fills the fields of your Extraction Schema from it. Works with the Text and the Vision engine.
Raw XML as JSON. Converts any XML it finds to JSON exactly as it is and ignores your fields. Text engine only. This is the former βExtract XML from documentsβ option.
Off. XML is not treated in a special way (default).
ADF lead β your fields
Airparser looks for the ADF lead in:
the text of the email, and in its HTML (also when the XML is shown as text, with the tags escaped);
an attached .xml file or an uploaded .xml file;
text files (.txt).
If there is no ADF in the document, or the XML is not valid, the document is parsed in the usual way using your Extraction Schema.
There are two ways to set up the fields:
1. Use the standard ADF field names. If every field of your schema is named like one of the keys below, the values are taken straight from the XML, without AI. Typed fields (number, date) are converted as usual.
Lead: request_date, lead_id, lead_id_source, lead_sequence, prospect_status
Vehicle: vehicle_interest, vehicle_status, vehicle_year, vehicle_make, vehicle_model, vehicle_trim, vehicle_vin, vehicle_stock, vehicle_price, vehicle_price_type, vehicle_currency, vehicle_odometer, vehicle_condition, vehicle_bodystyle, vehicle_transmission, vehicle_options, vehicle_comments
Customer: customer_first_name, customer_last_name, customer_full_name, customer_email, customer_phone, customer_street, customer_city, customer_region, customer_postal_code, customer_country, customer_timeframe, customer_comments
Dealer and source: vendor_name, vendor_id, vendor_contact_name, provider_name, provider_service, provider_email, provider_phone
2. Use your own field names (for example lead_name or vehicle_of_interest). Airparser reads the ADF first and AI only matches the lead to your fields, so the XML itself is never misread.
Vehicles and leads:
The vehicle fields come from the vehicle the customer wants to buy (the first one with interest="buy"). A trade-in vehicle and any other vehicle are available in a vehicles list (add a list field named vehicles to your schema; its fields are interest, make, model, year, trim, vin, stock, price and so on).
If one ADF holds several leads, your fields are filled from the first lead and all leads are returned in a prospects list.
Example result for a schema with customer_first_name, customer_email, vehicle_make and vehicle_price:
{ "customer_first_name": "Maria", "customer_email": "maria.lopez@example.net", "vehicle_make": "Honda", "vehicle_price": 24950 }
Each document uses 1 credit, as usual.
A sample ADF lead you can download, the field reference and the example result are on the ADF XML page.
Raw XML as JSON
Airparser converts the XML it finds in the document to JSON as it is: the same nesting, with attributes marked by @_ (for example @_part) and a name split into parts becomes a list. Your Extraction Schema is not applied to this result, and it is used only as a backup when no XML is found, so you still need a schema (even with one field). This mode works only with the Text engine.
How to enable
Quickest way for dealer leads: start from the ADF lead template. Click New inbox, open Advanced settings, choose Inbox template β ADF XML (car dealer leads) and create the inbox. The XML / ADF mode is already on and the Extraction Schema already has the standard ADF fields, so the first ADF lead is read straight from the XML and there is nothing to set up. You can edit the fields later. A link with ?template=adf (app.airparser.com/new?template=adf) opens the page with the template chosen.

In an existing inbox: open the inbox, go to Settings β General, find XML / ADF leads, choose a mode and click Save.

The .xml format is on by default in every inbox (Settings β General β File types, group Data files). If you turn it off there, .xml files and .xml attachments are ignored.
Tips
Existing documents are not changed. Reprocess them if you want the new mode to apply.
If your leads arrive as ADF in the email text or as a .xml attachment, you do not need any other setting. To skip the email text and process only attachments (or the other way round), use Email processing in the same settings tab.