View RSS Feed

My Java Tips

  1. Working with the DOM parser

    by , 11-28-2011 at 07:59 PM (My Java Tips)
    You will be introduced to the working of DOM parser in this post.

    We can get a DocumentBuilder instance as soon as we have a DOM factory. The methods available for the DocumentBuilder instance are very similar to those available to its SAX counterpart. But there is a slight difference when we talk about the parse() method. The parse method in case of DOM do not take an instance of the SAX DefaultHandler class. It returns a DOM Document instance representing the XML document that was ...
    Java EE
  2. Parsing XML Documents-1 (DOM and SAX)

    by , 11-10-2011 at 05:03 PM (My Java Tips)
    XML files are very useful. Usually they are used to store configuration settings. We can also use XML files to store data so it can be used as a database. A lot of work has been done in this domain and its really very useful working with XML files.

    Now suppose you have a XML file with some useful data.

    XML Code:
    Tags: dom parser, sax, xml Add / Edit Tags
    Java SE