Win a copy of Rust Web Development this week in the Other Languages 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

SAX

 
Ranch Hand
Posts: 115
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


in this how charachters function work? what type of value in function argument???
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The startElement, endElement and characters methods are call-back methods. They are called by the XML parser as it is reading the document. The parser calls the characters method when it is reading the text content of each element.
 
Singh Harmeet
Ranch Hand
Posts: 115
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for this jimmy clark, but query is that , how charachter function work? what values are arguments have? for this i also read javadoc, but the functionality is not clear... so plzz help.......
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The parser calls the characters method when it is reading the text content of each element.



A SAX-based parser sends the content to the application as an array. The arguments contain the content and information that may be used to process the content. The parser determines how the content is sent, this is not something the application developer has any control over. I suggest playing around with your code to see different ways to manipulate the content. In time you should develop a good understanding.

Aside, in SAX-based applications, processing logic typically is in the startElement and endElement methods. Attempting to intercept and process content prior to an element's end-tag is not recommended for beginners and usually not required.
 
You’ll find me in my office. I’ll probably be drinking. And reading this tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic