com.sun.msv.verifier.psvi
Class PSVIDump

java.lang.Object
  |
  +--com.sun.msv.verifier.psvi.PSVIDump
All Implemented Interfaces:
TypedContentHandler

public class PSVIDump
extends Object
implements TypedContentHandler

An example that uses TypedContentHandler for parsing XML documents.

Author:
Kohsuke KAWAGUCHI

Constructor Summary
PSVIDump()
           
 
Method Summary
 void characterChunk(String literal, Datatype type)
          receives notification of a string.
 void endAttribute(String namespaceUri, String localName, String qName, AttributeExp type)
          receives notification of the end of an attribute.
 void endAttributePart()
          this method is called after the start/endAttribute method are called for all attributes.
 void endDocument()
          receives notification of the end of a document.
 void endElement(String uri, String local, String qName, ElementExp type)
          receives notification of the end of an element.
static void main(String[] args)
           
 void startAttribute(String namespaceUri, String localName, String qName)
          receives notification of the start of an attribute.
 void startDocument(ValidationContext context)
          receives notification of the start of a document.
 void startElement(String namespaceUri, String localName, String qName)
          receives notification of the start of an element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PSVIDump

public PSVIDump()
Method Detail

main

public static void main(String[] args)
                 throws Exception

startElement

public void startElement(String namespaceUri,
                         String localName,
                         String qName)
Description copied from interface: TypedContentHandler
receives notification of the start of an element. If this element has attributes, the start/endAttribute methods are called after this method.
Specified by:
startElement in interface TypedContentHandler

startAttribute

public void startAttribute(String namespaceUri,
                           String localName,
                           String qName)
Description copied from interface: TypedContentHandler
receives notification of the start of an attribute. the value of the attribute is reported through the characterChunk method.
Specified by:
startAttribute in interface TypedContentHandler

endAttribute

public void endAttribute(String namespaceUri,
                         String localName,
                         String qName,
                         AttributeExp type)
Description copied from interface: TypedContentHandler
receives notification of the end of an attribute.
Specified by:
endAttribute in interface TypedContentHandler
Following copied from interface: com.sun.msv.verifier.psvi.TypedContentHandler
Parameters:
type - assigned type.

endAttributePart

public void endAttributePart()
Description copied from interface: TypedContentHandler
this method is called after the start/endAttribute method are called for all attributes.
Specified by:
endAttributePart in interface TypedContentHandler

characterChunk

public void characterChunk(String literal,
                           Datatype type)
Description copied from interface: TypedContentHandler
receives notification of a string.
Specified by:
characterChunk in interface TypedContentHandler
Following copied from interface: com.sun.msv.verifier.psvi.TypedContentHandler
Parameters:
literal - the contents.
type - assigned type. The validator assigns this type for this literal.

endElement

public void endElement(String uri,
                       String local,
                       String qName,
                       ElementExp type)
Description copied from interface: TypedContentHandler
receives notification of the end of an element.
Specified by:
endElement in interface TypedContentHandler
Following copied from interface: com.sun.msv.verifier.psvi.TypedContentHandler
Parameters:
type - the type of this element.

startDocument

public void startDocument(ValidationContext context)
Description copied from interface: TypedContentHandler
receives notification of the start of a document.
Specified by:
startDocument in interface TypedContentHandler
Following copied from interface: com.sun.msv.verifier.psvi.TypedContentHandler
Parameters:
context - This ValidationContext object is effective through the entire document.

endDocument

public void endDocument()
Description copied from interface: TypedContentHandler
receives notification of the end of a document.
Specified by:
endDocument in interface TypedContentHandler