File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with JAXP

 
Jacky Chow
Ranch Hand
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic