AnsweredAssumed Answered

Importing files from xml that describes file structure

Question asked by ebogaard on Feb 25, 2013
Latest reply on Oct 9, 2013 by mdutoo
Recently I received a zip with a file file structure and an xml-file that describes these files. This xml is an export from a ms sql-db describing the binaries in the file structure. As this file structure is completely 'random' (comparable to the way Alfresco stores the binaries), the metadata is in the xml file. One problem though, it doesn't include the folders (parents) to be created and the files (children) in those folders. So I'm wondering how I can import this in Alfresco.

The XML looks like this:

        <document_naam>Versie II - RenD-uitgaven private sector.doc</document_naam>
        <eigenaar_persoon_formal_naam>De heer ABC</eigenaar_persoon_formal_naam>
        <context_naam>Beleidscommissie Innovatie &amp; Kennis</context_naam>
        <html_label>Vergadering 14 maart 2008</html_label>
        <tree_path>/Vergadering 14 maart 2008</tree_path>

This XML is completely 'flat', as all files are specified the same way and on the same 'level'.

The most important attributes are:
- document_naam: document name
- URI: location of the binary in the current file structure
- tree_path: location in the file structure 'to be'. This can be multiple folders deep.

It would also be nice to import the 'created' and 'modified' data, but those aren't necessary.

Can someone help me with this? I know how to import ACP-fiels, but I'm not sure how to create the file structure when the folder metadata is in the file attributes and is not specified as a separate node.