CVS Update: xmlpull-api-v1/src/java/sax2_driver/org/xmlpull/v1/sax2

Aleksander Andrzej Slominski <[email protected]>
Newsgroups gmane.text.xml.xmlpull.devel
Message-ID <[email protected]>
aslom       02/08/26 22:28:00

  Modified:    src/java/sax2_driver/org/xmlpull/v1/sax2 Driver.java
  Log:
  updated SAX2 driver to allow passing pull parser instance to use
  
  Revision  Changes    Path
  1.2       +6 -5      xmlpull-api-v1/src/java/sax2_driver/org/xmlpull/v1/sax2/Driver.java
  
  Index: Driver.java
  ===================================================================
  RCS file: /l/extreme/cvspub/xmlpull-api-v1/src/java/sax2_driver/org/xmlpull/v1/sax2/Driver.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -t -w -r1.1 -r1.2
  --- Driver.java	2002/06/17 15:01:37	1.1
  +++ Driver.java	2002/08/27 03:28:00	1.2
  @@ -61,8 +61,8 @@
       protected static final String APACHE_DYNAMIC_VALIDATION_FEATURE =
           "http://apache.org/xml/features/validation/dynamic";
   
  -    protected ContentHandler contentHandler;
  -    protected ErrorHandler errorHandler;
  +    protected ContentHandler contentHandler = new DefaultHandler();
  +    protected ErrorHandler errorHandler = new DefaultHandler();;
   
       protected String systemId;
   
  @@ -78,12 +78,13 @@
       /**
        */
       public Driver() throws XmlPullParserException {
  -        contentHandler = new DefaultHandler();
  -        errorHandler = new DefaultHandler();
  -
           XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
           factory.setNamespaceAware(true);
           pp = factory.newPullParser();
  +    }
  +
  +    public Driver(XmlPullParser pp) throws XmlPullParserException {
  +        this.pp = pp;
       }
   
       // -- Attributes interface
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.