DXL -> NotesItem - Is it possible?

Is it possible to use one of the XML processing objects to convert a string into a Notes object i.e. A hotspot button, and paste it into a rich text item?In other words, is the following sort of thing possible:-

Set db = session.CurrentDatabase

Set collection = db.UnprocessedDocuments

Set uidoc = ws.ComposeDocument(db.Server, db.FilePath, “Memo”)

Set doc = uidoc.Document

Call doc.ComputeWithForm(True, True)

Set itemReplyTo = New NotesItem(doc, “arrReplyTo”, “”)

Set rtitem = doc.GetFirstItem(“Body”)

If rtitem Is Nothing Then

Set rtitem = doc.createrichtextItem("Body")		

End If

’ Build a button using text so that the parameter to the function called can be coded

Dim strObject As String

strObject = ||

strObject = strObject + ||

strObject = strObject + |Reply|

strObject = strObject + ||

strObject = strObject + |call aFunction(|+ strParameter +|)|

strObject = strObject + ||

strObject = strObject + ||

Dim XMLProcessor As NotesDOMParser ’ or NotesXSLTransformer or whatever

Set XMLProcessor = session.CreateDOMParser ’ ditto

Call XMLProcessor.SetInput(strObject)

Call XMLProcessor.SetOutput(rtitem)

XMLProcessor.Process

Call rtitem.Update

Call uidoc.Close

Set uidoc = ws.EditDocument(True, doc)

Many thanks to anyone who can point me to documentation or examples or just confirm that it can’t be done this way.

Steve Howells

Subject: DXL → NotesItem - Is it possible?

Not with that granularity – the minmum “chunk” that you can work with is a NotesDocument (design document or data document), so you’d need to get the document/form, export it with NotesDXLExporter, pipe that to a NotesDOMParser or NotesSAXParser, process, then pipe the result through a NotesDXLImporter. That being said, it is eminently doable in DXL.

Subject: RE: DXL → NotesItem - Is it possible?

Excellent! I thought so.

The application is to improve the Forward button in the mail template. I’ve written a short agent that creates a new memo and place the selected memos, ‘rendered to rtitem’ in collapsed sections. Now I want to provide Reply buttons for each section.

So for each selected memo I could convert it to DXL, crunch it into a document that has a hard-coded Reply button, transform back into a NotesDocument and then render the resulting document into the rtitem, buttons and all.

Thank you Stan.

This calls for fresh coffee…

Steve Howells

Subject: RE: DXL → NotesItem - Is it possible?

This may help:

http://searchdomino.techtarget.com/tip/1,289483,sid4_gci1000251,00.html

Bryce