| Author |
SAX + namespace
|
cyril vidal
Ranch Hand
Joined: Jul 02, 2003
Posts: 247
|
|
Dear all, I use xerces and API Sax to parse an XML document. That's what this doc looks like: Now, I just want to the elements in defaut namespace http://www.nicholaschase.com/surveys/ to flagged in output. So, the startElement() method may be this one: I thought there would be merely "OK" as output for elements surveys, reponse, question since all these elements belong to the default namespace http://www.nicholaschase.com/surveys/. Unfortunately, that's not the case and I get anything as output. I've checked that namespace are enabled by default in xerces. I'm missing something here but don't know exactly what. I would be very grateful for any assistance, Regards, Cyril.
|
SCJP 1.4, SCWCD, SCBCD, IBM XML, IBM Websphere 285, IBM Websphere 287
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
Try again with
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
cyril vidal
Ranch Hand
Joined: Jul 02, 2003
Posts: 247
|
|
Hi Lasse, I've tried with equals too... No more success... Can anyone provide a code snippet where namespaceURI is successfull used? I don't understand what's wrong in my code Cyril.
|
 |
cyril vidal
Ranch Hand
Joined: Jul 02, 2003
Posts: 247
|
|
Hmmm, it looks odd... I've added the two lines: in my code, which are supposed to be the default configuration, and all is working now... I'm perplex...
|
 |
 |
|
|
subject: SAX + namespace
|
|
|