This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I have prolem when I use JAXP, the follow xml file is used:
the follow is the code from my program:
The problem is that the parameters sName in both startElement() and endElement() are always empty String, the parameters qName are always the xml element name. If I add namespace declaration and add prefix to xml element, then the sName is still empty, the qName is formed as prefix:elementName. When I change the main method as follow(use Xerces parser 1.4.4 release), everything acts ok! both sName and qName are the element name, and if i add namespace declaration and add prefix to xml element, then the sName is still the element name, the qName is formed as prefix:elementName.
The platform I used: jdk: Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03) j2ee: Java 2 Enterprise Edition version 1.3.1, build 1.3.1-b17 Can anyone tell me what's the problem? thanks!