Different results when using generateXML

I have two agents generating XML out of an document: One generates XML, when document ist opened. The second agent generates it from the selected document in a view. The method I use is ‘Document.generateXML()’.

The first agent generates for each field:

Marketing

The second agent generates:

Marketing

What is the reason for this difference? Makes it sense?

Subject: Different results when using generateXML

In the lower levels of Notes, there is an option to expand items when opening a note.From the C API Reference db:

OPEN_EXPAND	  -  For fields of TYPE_TEXT, expand the data to 1-entry TYPE_TEXT_LIST values while reading the note. For fields of TYPE_NUMBER, expand the data to TYPE_NUMBER_RANGE. For fields of TYPE_TIME, expand the data to TYPE_TIME_RANGE. This option is necessary if the note is to be signed or a signature verified; please see the entry for NSFNoteSign() for details.

It would seem that whichever API you are using to open the note is passing OPEN_EXPAND to the lower layers. I don’t know if the API you are using has a corresponding option, but maybe.

Sense it does make, for one reason that I know of, which is signing. If an item is signed, you want a text list with a single entry to be semantically the same as a text item with the same value. By expanding a note when opening, you get it into a “canonical” format that is ready for signing.