You would like to XOG in/out documents associated with projects, including their folder hierarchy, both for importing material from another application and for migrating this material from Dev to Test to Prod. You could not see a XOG template to do this.
This is the XML script which you can use, based on documents_write_ext.xml<?xml version="1.0" encoding="UTF-8"?>
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_document.xsd">
<Header action="write" externalSource="OS" objectType="document" version="13.3" />
<Documents>
<Parent parentObjectId="5000701" parentObjectType="Projects" documentLocation="C:\Temp/ClarityDocsXOGwrite">
<General addedBy="admin" addedDate="2015-02-20" />
</Parent>
</Documents>
</NikuDataBus>
Important points to note:
In our example, documentLocation is C:\Temp/ClarityDocsXOGwrite.
On the server:
Directory of C:\Temp\ClarityDocsXOGwrite02/20/2015 03:37 PM <DIR> .
02/20/2015 03:37 PM <DIR> ..
02/20/2015 02:18 PM 287 readme.doc
02/20/2015 03:34 PM <DIR> sample 0
02/20/2015 03:38 PM <DIR> sample 1
1 File(s) 287 bytes
4 Dir(s) 4,728,242,176 bytes free
F:\>dir "C:\Temp\ClarityDocsXOGwrite\sample 0"
Directory of C:\Temp\ClarityDocsXOGwrite\sample 002/20/2015 03:34 PM <DIR> .
02/20/2015 03:34 PM <DIR> ..
02/05/2014 04:53 PM 1,429 samplepic.gif
02/20/2015 02:03 PM 40 sampletext.txt
02/20/2015 02:04 PM 19,968 Sampleword.doc
3 File(s) 21,437 bytes
2 Dir(s) 4,728,242,176 bytes free
F:\>
After running the script, xog -propertyfile dev.properties
where dev.properties specifies the XML source as above, the project identified as 5000701 contained all its original documents, plus the new ones in the hierarchy shown above which is correct.