If you are using Java 1.4 or later then you already have a parser, built into the language. It isn't called "com.sun.xml.parser.Parser", but that doesn't matter. I suppose you got that name from some sample code somewhere? Well, that sample code is obsolete now. This article shows you how to use XML in Java now.