cancel
Showing results for 
Search instead for 
Did you mean: 

XML Imports

tjholmes
Champ in-the-making
Champ in-the-making
I am a newbie to Alfresco, so I'll apologize for that now.

I am at my wits end when it comes to importing.   I have the Community Edition of Alfresco 2.1.  MySQL 5.0 Community Edition, and running on Linux.

I created some new content types, and I entered data for these new content types manually with the Alfresco 2.1 web-app.   I then exported these 3-4 items out to an ACP file, unzippd that file, and looked at the XML file so I can reverse engineer it.

I created one new XML file for one piece of new content, and it imported just fine.   Now, I created a huge XML file with 3800+ items, and 3800+ matching HTML content.   When I import the ACP file, I get an error that the date: 2015-01-01 can't b converted to a string.   The format of yyyy/MM/dd should meet the iso requirements for a date format.   So, why am I getting this error????????????

If you need any more information from me?  Please let me know.
Thanks!
2 REPLIES 2

kevinr
Star Contributor
Star Contributor
Reverse engineering is always fun Smiley Happy The ISO date format used in ACP files is quite strict (well it is generated) such as:

2007-07-05T17:44:45.322+02:00

So make sure your XML file has the same date format

YYYY-MM-DDTHH:MMSmiley FrustratedS.MMM+ZZ:ZZ

You can google for the date format for more info.

Hope this helps,

Kevin

tjholmes
Champ in-the-making
Champ in-the-making
Thankfully, Alfresco is open source and I can change the internal code.
The fact that I have to use this restrictive form isn't very good.   If I have a data such as 2007-01-01 … and it would parse correctly in Java … then internally within the import, the conversion to the ISO format should be done.

In any event, I did Google this ISO format and found the Java code I needed to convert my java.util.Data to a string in this ISO format.  From all the questions on this issue, you'd think the documentation would be a lot better.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.