• 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

doubt in SAX

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have written a program to parse the xml file with SAX in java.

The SAX recognized all the elements ,but when it comes to the following tag
<Type></Type>, it is recognizing the first one(<Type> ,but unable to recognize the end element (</Type> .I tried ,but I could not get the solution for this. Can you help me.can you give me sample program on this.

thank you
ravikumar
 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
</Type> is not an end element, it's the end tag of the <Type> element. </Type> cannot exist without <Type>, and vice versa (although they can be merged to <Type /> ) .

What you probably want in your SAX parser, is to handle the ending of the element. If you are using DefaultHelper, the method is called endElement.
[ December 22, 2007: Message edited by: Rob Prime ]
 
What do you have to say for yourself? Hmmm? Anything? And you call yourself a tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic