Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

startElement not called, why not?

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using Xerces 1.3* to parse a public XML feed.



startDocument runs, but startElement never does:



I also tried what I think is the older now-deprecated syntax:



So, why isn't the method running?


* Yes I know it's old. I am stuck using jdk 1.3; a newer jdk is *not* an option. Hence the old Xerces.
 
Marshal
Posts: 28123
94
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which "AttributeList" have you imported? If you chose the wrong one then you have overloaded the startElement method rather than overriding it.

Actually... you're implementing HandlerBase? Then the signature for startElement is
 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my HandlerBase I'm importing org.xml.sax.AttributeList.

My understanding is that the signature (String,String,String,AttributeList) is deprecated. So I tried putting both versions in my handler:

(String,String,String,AttributeList)
(String,String,String,Attributes) (meaning of course I also import org.xml.sax.Attributes)

but neither one is invoked. I also made the signature explicit just in case there is another AttributeList in my classpath somewhere:

(String,String,String,org.xml.sax.AttributeList)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic