FileDocCategorySizeDatePackage
Example3.javaAPI DocExample814Fri Feb 01 12:49:34 GMT 2002None

Example3

public class Example3 extends DefaultHandler
Printing only Character Content (element stack)

Fields Summary
private Stack
stack
Constructors Summary
Methods Summary
public voidcharacters(char[] buf, int offset, int length)

	if (!"line".equals (stack.peek ()))
	    return;
	System.out.print (new String (buf, offset, length));
    
public voidendElement(java.lang.String uri, java.lang.String local, java.lang.String qName)

	if ("line".equals (qName))
	    System.out.println ();
	stack.pop ();
    
public voidstartElement(java.lang.String uri, java.lang.String local, java.lang.String qName, org.xml.sax.Attributes atts)


       
	 
	 
	 
	 
      
    
	stack.push (qName);