This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes problem with JAXP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "problem with JAXP" Watch "problem with JAXP" New topic
Author

problem with JAXP

Jacky Chow
Ranch Hand

Joined: Sep 01, 2002
Posts: 63
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!


Jacky
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with JAXP
 
Similar Threads
problems with JAXP
problems with JAXP
problems with JAXP
Xml Parsing
Searching using SAX !!