We are writing a LotusScript agent that will read in an XML string, create a DOM document, and modify the contents of some of the DOM document element nodes.
Using an output stream (associated with a hardcoded file name) and either the DOMParser Serialize or Output methods, we can regenerate a string of XML data from the modified DOM document.
But we really want to generate the modified XML string to the agent’s standard output (e.g., like using a Print statement to write to a browser) rather than to a file defined by an output stream. The DOMParser class has no toString method, and we have not found any way to generate the XML string to standard output.
Is there some other processing alternative?
Subject: Serialize()
Call notesDOMParser.Serialize( )
this streams the DOM xml into the object set by notesDomParser.SetOutput( object )
Subject: Serialize to a NotesStream…
…then use NotesStream.ReadText to get the results as a string. I think there may be some limit to the amount of data you can print with a single Print statement, so you may want to break it up and read and print a line at a time anyway.
Subject: Another alternative
If the Notes XML classes can’t do what you want (and I’m certainly no expert on it so I can’t say) then you can try other XML parsers. If you are comfortable with a Windows-only solution, then you could explore using the Microsoft XML parsers. There are numerous posts on this in the Notes 4/5 forum (since native XML classes only became available in Notes 6)