Skip to Content

import

java.io.;</P><O:P></O:P><PRE> lang=EN style=”COLOR: black; FONT-FAMILY: ‘Book Antiqua'”><FONT face=Batang>import org.xml.sax.;  emit(“<“eName);</FONT></CODE></PRE><O:P></O:P><PRE><CODE> lang=EN style=”COLOR: black; FONT-FAMILY: ‘Book Antiqua'”><FONT face=Batang>  if (attrs != null) {</FONT></CODE></PRE><O:P></O:P><PRE><CODE> lang=EN style=”COLOR: black; FONT-FAMILY: ‘Book Antiqua'”><FONT face=Batang>    for (int i = 0; i < attrs.getLength(); i) {</FONT></CODE></PRE><O:P></O:P><PRE><CODE> lang=EN style=”COLOR: black; FONT-FAMILY: ‘Book Antiqua'”><FONT face=Batang>      String aName = attrs.getLocalName(i); // Attr name</FONT></CODE></PRE><O:P></O:P><PRE><CODE> lang=EN style=”COLOR: black; FONT-FAMILY: ‘Book Antiqua'”><FONT face=Batang>      if (“”.equals(aName)) aName = attrs.getQName(i);</FONT></CODE></PRE><O:P></O:P><PRE><CODE> lang=EN style=”COLOR: black; FONT-FAMILY: ‘Book Antiqua'”><FONT face=Batang>      emit(” “);</FONT></CODE></PRE><O:P></O:P><PRE><CODE> lang=EN style=”COLOR: black; FONT-FAMILY: ‘Book Antiqua'”><FONT face=Batang>      emit(aName“=\””attrs.getValue(i)“\””);  emit(“</”eName“>”);</CODE>important<CODE> style=”FONT-FAMILY: ‘Book Antiqua'”>

To report this post you need to login first.

9 Comments

You must be Logged on to comment or reply to a post.

  1. Shabarish Vijayakumar
    I feel this weblog will help in the understanding of SAX parser for all who are to write java mapping.

    Great work Prasad.

    Happy Blogging !!! ๐Ÿ˜‰

    Regards,
    ShabZ

    (0) 
  2. Former Member
    …since 99.99% of the content of this blog entry has obviously been copied & pasted, you should be fair enough to at least mention the real sources and authors.
    Part 1:
    “XML Parsers and XSL Processors” by Jani Utriainen, for example available at http://mia.ece.uic.edu/~papers/WWW/MultimediaStandards/Parsers.pdf, page 5
    Part 2:
    “Simple API for XML” by Sun Microsystems, available at http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPSAX.html

    Stefan

    (0) 
    1. Former Member Post author
      Hi Stefan,

      I have mentioned it in the end of the document as Reference to java.sun.com. Even for the first part’s diagram, I have added the reference.

      -Prasad U

      (0) 

Leave a Reply