Actor picture

Xmls To Dataset

mtrunkat/xmls-to-dataset

This act loads list of urls from INPUT.sources. Each of these links should point to a xml file. It downloads all the files and saves them to it's default dataset. Groups parameter in INPUT allows to choose Apify proxy groups to use.

Author's avatarMarek Trunk谩t
  • Modified
  • Used by17 users
  • Used69 times
Actor picture
Xmls To Dataset

To run the code examples, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token.

const ApifyClient = require('apify-client');

// Initialize the ApifyClient with API token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare actor input
const input = {};

(async () => {
    // Run the actor and wait for it to finish
    const run = await client.actor("mtrunkat/xmls-to-dataset").call(input);

    // Fetch and print actor results from the run's dataset (if any)
    console.log('Results from dataset');
    const { items } = await client.dataset(run.defaultDatasetId).listItems();
    items.forEach((item) => {
        console.dir(item);
    });
})();