Thread:Project:Support desk/Example of code to import xml into wiki using api import

I spent a lot of time and can not figure out the right code to import wiki text into wiki. (Previously I exported this wiki text from wiki.) I try to use Ajax POST request with xhr.setRequestHeader('Content-Type', 'multipart/form-data; ... and get errors like the following

"".  

Unfortunatelly, explanations in https://www.mediawiki.org/wiki/API:Import are very vague for me. Please, could somebody give ANY working PHP (and/or Ajax) code that uses mediawiki api "import function". Thanks in advance. Roman (t3531350@yahoo.com)