DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Parsing an XML document using SAX API

  1. #1
    Join Date
    Sep 2007

    Smile Parsing an XML document using SAX API

    Hi everyone,
    This is just an open discussion on parsing an XML document using SAX API. I am not quite sure whether these are the right steps for parsing the XML document, but if u feel something is missing please give me you comments & views regarding this discussion.

    first the packages to parse an XML document should be imported, such as:-*

    Next step is to extend the DefaultHandler interface because the DefaultHandler interface, by default, implements the ContentHandler, ErrorHandler, DTDHandler, & EntityHandler interfaces that the SAX parser uses.

    The third step is to parse the XML document, for this you first need to create an object of the SAXParserFactory class. The SAXParserFactory class allows u to change different parser implementations. u then need to obtain an object of the SAXParser class, which represents the default parser. u can the parse the XML document using the parse() method. It accepts two arguments, first is the XML document to be parsed & second is the DefaultHandler object that receives notification of the parsing events.

    The final step is to override various call back methods to handle events, such as document events, element events, & character events in your application.

  2. #2
    Join Date
    Apr 2007
    Sterling Heights, Michigan
    Do you have a question or are you simply looking for comments?

  3. #3
    Join Date
    Sep 2007

    Smile Just an open discussion

    Hi Hack,
    You are free to post any comments or views regarding this topic or if you want to say anything regarding this discussion you are free to do so. Thank You.

  4. #4
    Join Date
    Apr 2007
    Sterling Heights, Michigan
    Nothing specific, but here is an article that I think folks interested in this topic might enjoy.

Similar Threads

  1. Error parsing XML document
    By pescado in forum XML
    Replies: 0
    Last Post: 03-27-2006, 03:15 PM
  2. Replies: 2
    Last Post: 06-27-2002, 10:08 AM
  3. XML Startkabel Updates
    By xmlstartkabel in forum XML
    Replies: 0
    Last Post: 10-10-2001, 04:07 AM
  4. Replies: 1
    Last Post: 04-27-2001, 11:07 AM
  5. Check out Turbo XML
    By Sales in forum xml.announcements
    Replies: 0
    Last Post: 07-20-2000, 06:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center