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

parser.parse()

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The API shows SAXParser.parse() method has to take 2 arguments, one is the File or InputSource and the 2nd one is the DefaultHandler. But in many samples I saw "parser.parse(file)" or "parser.parse(inputSource)" without the 2nd argument in the method. why ?
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is because, mostly we use ParserAdapter and not the SAXParser as such, and we use PA's parse method that takes an InputSource or a systemId. We do it because ParserAdapter wraps SAX1 and makes it act as a SAX2 ,with feature, property, and Namespace support etc..

Hope this helps

Balaji
[ May 20, 2005: Message edited by: Bajji Pat ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic