For your second question read this post from @Fox ,
maybe its what you need. Its in Russian, but you can
use translator. There is an example script too >
How to get spun content from text file
-
Here is an example 0_1503671955581_ex.xml
