View RSS Feed

My Java Tips

  1. Using the JAXP validation framework

    by , 11-28-2011 at 07:29 PM (My Java Tips)
    While working with XML documents, you need to validate the documents. You may use setValidating() method on a SAX or DOM factory. But Java 5.0 (JAXP 1.3) introduces JAXP validation framework which can also be used for validating XML documents.


    Using the JAXP validation framework is fairly simple and efficient. In JAXP 1.3, the validation is broken out into several classes within the new javax.xml.validation package. Lets go through the steps:

    1. Load the model in to ...
    Tags: dom, java 5.0, jaxp, sax Add / Edit Tags
    Categories
    Java EE , XML
  2. Introduction to JAXP

    by , 11-28-2011 at 07:14 PM (My Java Tips)
    If you want to process XML data using applications written in the Java programming language, then JAXP is the best choice. JAXP stands for Java API for XML Processing. I will introduce JAXP in this post.


    JAXP can be called an abstraction layer since it does not introduces any new way to parse XML documents nor it provides different way of handling XML documents. Actually it makes using DOM and SAX easier. Using JAXP, you may habdle vendor-specific tasks that may arise when dealing ...
    Tags: dom, jaxp, sax Add / Edit Tags
    Categories
    Java EE
  3. 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.

    college.xml
    XML Code:
    <college>
    <student>
      <first>Shoaib</first>
      <last>Malik</last>
    ...
    Tags: dom parser, sax, xml Add / Edit Tags
    Categories
    Java SE