what exactly are the problems. create a document, set fields you like (see “Adding items to a note” in docu).
depending on the size of xml you can also create an attachment (LNNote::CreateAttachment).
to find it later you could create a view and located it by subject (LNViewFolder::Find)? or save noteid/unid and get it directly (LNDatabase::GetDocument).
Subject: RE: How do I create/locate a document (C++)?
I wasn’t quite understanding how this works (since we have some fantastic documentation here) at the time of writing. So I’ll explain this to whoever is reading it.
The main thing is that documents exist without folders, this is a flat store. Documents need a form and there’s a default form for documents.