• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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.
 
Sheriff
Posts: 28371
99
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)
 
Good heavens! What have you done! Here, try to fix it with this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic