PermaLink Bumps in the road when working with Domino XML classes09/30/2005 05:06 PM
I'm working on a updating my web agent that returns document data as XML. Currently I loop through a View, read the document Items and using string manipulation to construct XML text that is printed back to the browser. Now that 7 is out, it's time to update the demo to 6.5. Here is the first hair pulling experience I had. When using the NotesDXLExporter, you can give it a NotesNoteCollection - set to Documents- and get XML. The problem is IE6 won't display the result. Turns out IE doesn't like the DocTYPE information in the XML so you need to turn it off with "exporter.OutputDOCTYPE = False " Dim exporter As NotesDXLExporter Set exporter = s.CreateDXLExporter exporter.OutputDOCTYPE = False myoutput = exporter.Export(nc) Print myoutput Now I'm getting my XML. The next thing I need to figure out is how to slim it down to just the Item names and values. Will let you know.

Technorati:
Comments :v

1. Stephan H. Wissel09/30/2005 09:54:21 PM
Homepage: http://www.wissel.net/


Hi Gary,

you have two reasonable options:
feed the result of the DXLExporter into a XSLT Transformer or a SAX Parser. Both allow chaining, so you setup the whole chain and then pull the trigger on the first one (.process). It will run the whole chain then. The only challenge will be multivalue fields and some XSLT magic. You need different templates for the various Notes datatypes to do save processing.
Hth
stw




2. Stephan H. Wissel10/01/2005 09:57:56 AM
Homepage: http://www.wissel.net/


You can find a sample XSLT here:
http://fromdomino.com/__48256E5A001AB060.nsf/d6plinks/SHWL-6GRMNM
stw




3. Gary10/03/2005 02:34:10 PM


thanks Stephan, I'll give it a try. I was leaning towards the SAX parser. but I'll try the transform first.




4. Brian Benz10/04/2005 08:36:07 AM
Homepage: http://www.softwaresoapbox.com


Did I ever give you a copy of my book? I think I had a chapter on this, with an XSLT example. I'll dig it up....




GaryDev
The blog is hosted by the ADVISOR NETWORK.
By Gary Devendorf
Recent Entries
Calendar
No calendar found.
Monthly Archive
ADVISOR.com
ADVISOR
MSDN Blogs
The BlogRoll
Lotus Domino ND6 RSS News Feed RSS Comments Feed Geo URL RSS Validator BlogSphere
Powered by
Blogsphere