Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

PreviousPrevious NextNext

RE: Export to XML using Lotus Script
Alex Elliott 26.Apr.12 08:13 PM a Web browser
Domino Designer 7.0.2 Windows XP


1. Is the attachment data Base 64 encoded (e.g. the data in $FILE tag)? If not it can not be read by a Pega process.

When exporting document data using NotesDXLExporter the attachment data in the resulting DXL code is Base64 Encoded. You can export the DXL data for the document to a file or to a string object and handle it as you need to.


2. Will you be able to provide a DXL for each notes document ? (Each with distinct file name ? example: <unid>.dxl )(The Client wants to select documents one by one & then Export it - is it possible?)

Sure can. Create a new Stream object as you process each document and grab the 'UniversalID' property for the document being exported and use this as part of the filename.


3.What would be the last updated date ? <modified> tag data ?

Yes. Modified date is the best one to use unless you have a computed field on the form which records the date the document was last updated. Modified date can sometimes be updated by agents which 'touch' documents but don't necessarily change the content in the documents.

4. The date needs to be formatted to YYYY-MM-DD HH:MM:SS

This gets a little tricker but can be done by using the NotesDOMParser class. You need to tell the NotesDXLExporter object to call the appropriate Parser function which enables you to perform any DXL code manipulation before streaming it out to the target file.

Example:
' Set the input to the NotesDXLExport object to the document being exported
Call DXLExporter.SetInput(Doc)

' Set the output of the NotesDXLExport object to the NotesDOMParser object
Call DXLExporter.SetOutput(DXLDOMParser)

' Set the output of the NotesDOMParser object to the file Stream
Call DXLDOMParser.SetOutput(DXLStream)

' Set the name of the function to call to 'DOMParseDXL'
On Event PostDOMParse From DXLDOMParser Call DOMParseDXL

Your DOMParseDXL function should be defined as such:

Sub DOMParseDXL(Source As NotesDOMParser)
....
Exit sub

In the DOmParseDXL function you can get a handle to the document element and all child 'Item' (field) elements:

Dim RootElement As NotesDOMElementNode
Dim DocItemList As NotesDOMNodeList

Set RootElement = Source.Document.DocumentElement
Set DocItemList = RootElement.GetElementsByTagName("item")

DocItemList will contain an array of all items (fields) in the documents being exported and you can process them.

Date/Time properties of the document (Created, Modified, Revised, LastAccessed, AddedToFile) are child elements of the 'NoteInfo' node in the DXL code. When you get a handle to these items you can change the value of the 'Text' child element and change the date / time value to your preferred format.

Processing DXL code is pretty easy (once you know how) and provides a great way of manipulating document data prior to export.

Suggest you read as much as you can in the Domino Designer Help database for getting up to speed on DXL processing.

Regards,

Alex
AGECOM
http://www.agecom.com.au




Export to XML using Lotus Script (Projjal Km Ghos... 7.Apr.12)
. . RE: Export to XML using Lotus Scrip... (MALLIK R PERVEL... 8.Apr.12)
. . . . RE: Export to XML using Lotus Scrip... (Projjal Km Ghos... 9.Apr.12)
. . RE: Export to XML using Lotus Scrip... (Alex Elliott 26.Apr.12)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite