Monthly Archives: November 2005

Class HighLite Throwable

The first thing a programmer learns about exceptions is how to ignore them. Then a programmer learns that it is always best to throw them up the stack to the caller. And if you are the caller you can always print the stack trace to get a glimpse of what line of code is possibly [...]

Posted in Java, TechKnow | Leave a comment

Visual Kill -9

Here is some Visual Basic script code which allows you to terminate a process given a process id number. ‘ Kills a program given its process id. Function ProgKill(strProcessId) ‘ Declare used variables Dim strWQL Dim objProcess Dim objResult Dim intReturnCode Dim wmi Set wmi = GetObject("winmgmts:") ‘ Get Process by WMI strWQL = _ [...]

Posted in DotNET, TechKnow, Visual Basic | Leave a comment

WordprocessingML

I remember who excited I was when I found out that I could save a word document to HTML. Now after two years using Word 2003, I learn that Word 2003 can save a Word document as XML via Microsoft’s WordprocesingML. What this implies, but I haven’t test, is that if you can write xml [...]

Posted in HTML/XML, Rant, TechKnow | Leave a comment

CDATA With XSLT

In an XML file you can use CDATA to tell the parser that anything inside the CDATA element is your text data and not XML formatting. In a sense, you can use CDATA to escape data that looks like XML. See Escape From XML. For example, you can escape the ampersand like this: & or [...]

Posted in HTML/XML, TechKnow | 2 Comments

Eclipse Tool Tip #5: Templates

Continuing with the Eclipse Tool Tip Series try this out. Inside a method type ‘ins’ and then hit the ctrl+space keys. You should see the instanceof template in the code assist popup box. Select it and you get the following bit of code generated for you: if (name instanceof type) { type new_name = (type) [...]

Posted in IDE, Java, TechKnow | Leave a comment

Using Dom4J: Writing An XML

In a previous post, see Using Dom4J: Reading An XML, I went over how to read in an XML document using Dom4J. Here I’ll show how to write an XML document using Dom4J. The first part to writing out an XML document is to have an in memory representation of it. Here is how you [...]

Posted in HTML/XML, Java, TechKnow | 2 Comments