I'm a bit new to Drupal and have a task to import data periodically from other system. So basically I've an endpoint that returns me an XML, I must to parse and put data into Drupal and then use these data (f.x. in dropdown lists)
What are the best practices to do that?
From what i understand you are trying to achieve a periodic aggression from a external data source.
Feeds module would be an excellent choice in here. Combined that with another contrib module Feeds XPath parser would help you configure it properly.
From Feeds Project Page,
Import or aggregate data as nodes, users, taxonomy terms or simple database records.
One-off imports and periodic aggregation of content Import or aggregate RSS/Atom feeds Import or aggregate CSV files Import or aggregate OPML files PubSubHubbub support Create nodes, users, taxonomy terms or simple database records from import Extensible to import any other kind of content Granular mapping of input elements to Drupal content elements Exportable configurations Batched import for large files
From Feeds XPath Parser project page,
Feeds XPath Parser is a Feeds plugin for parsing XML and HTML documents. It enables site builders to leverage the power of Feeds to easily import data from complex, external data sources. Each element you wish to extract is setup using configurable mapping queries, saving time for developers who would otherwise have to code complex, specific-use modules. It also enables end-users to build web scrapers and other useful tools within Drupal.
You may need this module if you would like to:
Import XML or HTML documents into nodes, users, taxonomy terms, or regular database tables Scrape webpages like regular feed sources with scheduling, updating, and expiring Extract content from HTML documents to create a semantic data bank or mashup Features
Builtin query debugger to assist with writing XPath queries Tidy support for badly formatted markup Variable substitution, allowing you to use the value from one or more queries as arguments in another Various workarounds that cover up PHP’s idiosyncrasies with XPath
The details of implementation would be based on how you have configured your nodes in drupal.