[opencms-dev] Importing Data

Jonathan Woods jonathan.woods at scintillance.com
Wed Jan 31 10:08:12 CET 2007


Tell me if I've misunderstood you... But this shouldn't be too much of a
problem.  You can pull the data out of your database and write it into XML
files using any old Java-XML library.  Depending on the nature of your
schema, you could even handwrite code for this: for example, have a template
XML instance with placeholders for element content, and use code to replace
these with real values derived from the database, writing the result out to
a new text file which happens to be XML which is valid according to your
schema.  Having created lots of compliant XML documents, you can zip the
whole lot up, then use the Workplace to upload-and-unzip into the
appropriate VFS location.

Jon

-----Original Message-----
From: sfdbfoui at host2.scintillance.com
[mailto:sfdbfoui at host2.scintillance.com] On Behalf Of William T. Mann
Sent: 31 January 2007 07:33
To: The OpenCms mailing list
Subject: Re: [opencms-dev] Importing Data

Thanks for the link. We've already created the modules though. And they work
fine. My problem is getting data from an external database into OpenCMS as
one of our structured documents.

What I'd like to do is loop through my tables and create some XML files with
a structure that I could then just batch upload to OpenCMS instead of
manually creating a structured document for each record of the database
table. Is that possible?

--
William


Jonathan Woods ha scritto:
> There's a well-prepared tutorial at
> http://opencms-wiki.org/Defining_OpenCMS_structured_XML_content (and the
> rest of the Wiki is useful too).  This presupposes a particular style of
> OpenCms module development, but it should give you the idea.
> 
> Jon
> 
> -----Original Message-----
> From: sfdbfoui at host2.scintillance.com
> [mailto:sfdbfoui at host2.scintillance.com] On Behalf Of William T. Mann
> Sent: 30 January 2007 21:18
> To: opencms-dev at opencms.org
> Subject: [opencms-dev] Importing Data
> 
> Hi,
> 
> I'm porting a website that's about 98% dynamic (all the data is in a
> postgresql database) to a portal built around opencms. Since the actual
> website contains lots of data, I was wondering if there was a way to
create
> documents of the data in some format that can then be imported directly
into
> the repository; that is, create a document for each record to be imported
> into the directory. I'd need to create structured documents. Is it
possible
> to do this? If so, what would be the process that I'd need to follow?
> 
> Thanks for any help!
> 
> --
> William
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list To change your
> list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
> 
> 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev


_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev





More information about the opencms-dev mailing list