Managing logging with Log4j and Chainsaw

Those of you who haven’t used System.out.println(”My variable: ” + myVariable) in some Java classes to get debug information to the console, raise your hands please. None? 😉 I am very fond of logging as a complement to debugging, since I can ”trace” actions in my programs even if the classes is in production. ”But […]

g33k date

I was a key speaker at the first g33k date ever yesterday, and it was Ekakan that held the meeting in their small but great office at Saltmätargatan in Stockholm. Quite a lot showed up, many of which I know by name, but not by face, since they are all bloggers with no pictures at […]

Echo XML from a file, String or InputStream in Java with SAX

Here is an example how to use the XMLEchoer class, that I have refurbished from Sun’s tutorial Echoing an XML File with the SAX Parser. It is of limited use, but can be a good start learning SAX. import java.io.PrintWriter; import lotus.domino.AgentBase; import net.kanngard.xml.XMLEchoer; public class JavaAgent extends AgentBase { public void NotesMain() { try […]

XML Parser Performance in LotusScript

I am not Microsoft’s biggest fan, since I was a Macintosh fanatic in the old days, but had to convert into the Wintel platform for about 10 years ago. But I have to admit though, when comparing Microsoft’s XML parser with the ones that are built into Notes/Domino, that their products sometimes are great! When […]

Manually serializing NotesDOMNodes

In my earlier post today, I described a problem I have, where I wanted to get the XML string of a DOM tree. I’ve started writing my own routine, this is what I have right now. It’s far from complete, since it can not handle namespaces, CDATA etc. yet: This is a new version that […]

Serialize a DOM tree in LotusScript?

I have a problem, that nor I nor any of my colleagues can’t solve easily. I have several classes that are passing objects/variables between them. On of them is handling Web Service request, and parsing the responses to a NotesDOMDocumentNode via the NotesDOMParser. The NotesDOMDocumentNode is passed returned, and are used in several places to […]

Getting the root element node in XML using LotusScript

So I don’t forget the next time I want to do this, and trust me, I got a short memory! Dim xml As String Dim rootElementNode As NotesDOMElementNode xml = ”YOUR XML HERE” Set rootElementNode = parseXML(xml)._ getElementsByTagName(”THE ROOTNODE”).getItem(1) Public Function parseXML(xml As String) _ As NotesDOMDocumentNode ‘ Parses the specified xml. On Error Goto […]