Export database to XML files

Hi,I need to export existing Notes-databases to XML files. Each document should be exported as a seperate XML-file, attachemnts should also be saved (and the corresponding XML-file should contain a link to this file).

Is this possible? I looked at a product called odbc2xml which seems to be able to do this, but it’s not too straight-forward. I am looking for something that is really designed for Notes. I have to export about a dozen databases.

Thanks in advance,

Remco

Subject: RE:export database to XML files

Look at Lyrics:http://noteslinks.com/review.php?sid=586

You can also download an evalution copy.

Bob Hillesum

Webmaster:

http://NotesSupport.com

http://NotesLinks.com

Free Toolbar: http://NotesLinks.com/toolbar

http://NLnotes.net

Subject: export database to XML files

Thanks for your responses.

We were in contact with the makers of Lyrix already, the product looks good, but unfortunately it costs $$$$$, which is too much (for us).

I’ll definitely check out the other two options. Thanks!

Subject: What’s wrong with NotesDXLExporter? (WAS: export database to XML files)

Subject: RE:What’s wrong with NotesDXLExporter? (WAS: export database to XML files)

There is nothing wrong, but if you need to convert many databases and you don´t want to change the design, then it is worth to look to Lyrics as well.

Bob Hillesum

Webmaster:

http://NotesSupport.com

http://NotesLinks.com

Free Toolbar: http://NotesLinks.com/toolbar

http://NLnotes.net

Subject: What does ‘changing the design’ have to do with DXL exporting???

Subject: export database to XML files

Remco,Try this little tool “IBM XSL Formatting Objects Composer”, it does XML, PDF, and XSL and more.

Very, very good. http://alphaworks.ibm.com/tech/xfc

Only problem is that you need Domino 6.0 or above, and you need to have a Windows platform (since I do not think that it is available on any other platform).

It is of course installed on the server, so the client does not need to have anything special to be able to convert to XML.

The other thing to bear in mind is that it is only for data, you cannot convert design to XML with this product (that unfortunately is a problem for me).

Good luck.

Subject: RE: export database to XML files

[The other thing to bear in mind is that it is only for data, you cannot
convert design to XML with this product (that unfortunately is a problem for
me).
]

You even emailed me about this, and I don’t understand what you’re missing here.

Dim sess As New NotesSession
Dim db As NotesDatabase
Dim designColl As NotesNoteCollection
Dim export As NotesDXLExporter
Dim writeStream As NotesStream

Const OUT_FILE = "c:\sampleDXL.xml"

Set writeStream=sess.CreateStream
If Not writeStream.Open(OUT_FILE) Then
	Messagebox "Cannot Open Destintion",, OUT_FILE
	Exit Sub
End If

Set db = sess.currentdatabase
Set designColl = db.createNoteCollection(False)
Call designColl.SelectAllDesignElements(True)
Set export = sess.CreateDXLExporter(designColl, writeStream)
export.Process

Call writeStream.Close

Subject: RE: export database to XML files

Two issues:1. I want XML (data) that I can use in other applications, and,

  1. I want the design of a Lotus Notes database to be represented in XML so that I can use other tools to MODEL the design.

(1) would imply that dXL is not enough, and, (2) would imply that I can get design elements out as XML.

Both are not possible at the moment. I wish that it were.

Subject: You’re missing the point entirely

  1. DXL is XML. DXL is the name, the content and structure is XML. The meaning of the XML is defined in the Domino DTD (also XML). If the format doesn’t suit you, then transform it to whatever you want via XSL Stylesheets and XPATH expressions.

  2. You can export the entire design of a NTF/NSF as XML. Read the documentation about the NotesNoteCollection class and its properties (“.SelectImageResources” or “.SelectScriptLibraries” sure sound they are related to design elements, don’t they…) and how export it via the DXLExporter class. (In case the “DXL” in DXLExporter still irritates you, the class is a subclass of the NotesXMLProcessor class…there is the “XML” for you :slight_smile:

Thomas - IBM

Subject: RE: export database to XML files

Take the agent I just wrote for you. Put it in a database. Run it. Then open the output file in a text editor. What do you see?

Subject: RE: export database to XML files

I see the following:

The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


The system cannot locate the resource specified. Error processing resource ‘xmlschemas/domino_6_5.dtd’. Error processing resource ‘file:///C:/sampleDXL.xml’. Line 2, Position 55

Am I right in assuming that I am missing ‘xmlschemas/domino_6_5.dtd’?

Subject: RE: export database to XML files

That is correct. Move the file to your Notes program directory, and it will probably open in IE just fine. Or create a folder off your root called “xmlschemas” and put the DTD in there. Or edit the sampleDXL.XML file with a text editor and put the full path of the DTD in the .XML file.

That being said, IE is not the planet’s best XML validator. I’d suggest getting a real XML text tool.

I’d also suggest opening the file in a TEXT EDITOR as I originally described, rather than a web browser. I know that you can use IE for this, and I frequently have, but XML, like HTML, is fundamentally text data, and you will be able to see the logical structure of it.

You might, by the way, want to do this with a relatively simple database design, as the XML export of complex background images or Lotusscript agents can be intimidating.

Subject: Wow!

I can’t believe you wrote a free agent on a whim for someone. You’d never do that for me, man.Going to see the balloons tonite? Happy turkey day, dude :slight_smile:

Subject: RE: export database to XML files

Again, what’s wrong with DXL? Do you have something against those three letters? Since the Domino design really only makes sense in the Domino context, then the DXL DTD is THE correct XML DTD to use for design export. Use the NotesNoteCollection class to get the design elements you want for export, then stream them out. If you want to modify the output for some reason, such as in order to put each design note into its own, private document root element, then you can always use the NotesDOMParser or NotesSAXParser classes (or use XSLT if that’s your bag) to change the XML output.