Devsphere.com


com.devsphere.examples.xml.saxdomix
Class MixedParsing

java.lang.Object
  |
  +--com.devsphere.examples.xml.saxdomix.MixedParsing

public class MixedParsing
extends java.lang.Object

This example uses SDXBuilder and SDXController to do mixed SAX-DOM parsing.

The command line takes as arguments the system ID of the XML document that must be parsed, an optional -validation switch and the list of elements for which wantDOM() will return true.

See Also:
SDXBuilder, SDXController, SAXOutputter, DOMOutputter

Field Summary
protected  DOMOutputter controller
          DOMOutputter used as controller
protected  SAXOutputter handler
          SAXOutputter used as handler
 
Constructor Summary
MixedParsing(java.util.Vector elements)
          Does the initialization
 
Method Summary
static void main(java.lang.String[] args)
          The example's main method
 void parse(java.lang.String systemID, boolean validation)
          Parses the document whose system ID is passed as parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handler

protected SAXOutputter handler
SAXOutputter used as handler


controller

protected DOMOutputter controller
DOMOutputter used as controller

Constructor Detail

MixedParsing

public MixedParsing(java.util.Vector elements)
Does the initialization

Method Detail

parse

public void parse(java.lang.String systemID,
                  boolean validation)
           throws java.io.IOException,
                  org.xml.sax.SAXException,
                  javax.xml.parsers.ParserConfigurationException
Parses the document whose system ID is passed as parameter

java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException

main

public static void main(java.lang.String[] args)
The example's main method


 Devsphere.com