SAX: 1998-04-18 pre-release

David Megginson ak117 at freenet.carleton.ca
Sun Apr 19 14:02:51 BST 1998


Peter Murray-Rust writes:

 > I didn't find ROADMAP.txt either in the *.zip, sax.jar or under the URL.

Sorry about that -- I'll make certain it ends up in the next one, and
can mail it to you privately if you'd like.

 > >Drivers for Lark and MSXML:
 > >  http://www.microstar.com/XML/SAX/New/saxdrivers-19980418.zip
 > 
 > This may not be high-priority, but is there any check to make sure that the
 > driver is accessing the right version of Lark or MSXML? It's quite easy to
 > get fooled here as one could download a new version of SAX which catered
 > for a new version of FOO using FOODriver that one wasn't aware of. Tedious.
 > If the new version used different classes then one could test with the
 > ClassLoader.

I'm hoping that the Lark driver, at least, will end up as part of the
main distribution.  For MSXML, I can take a look at this issue once
SAX proper is out.

 > >Simple Demos:
 > >  http://www.microstar.com/XML/SAX/New/saxdemos-19980418.zip
 > >
 > Demos are always very gratefully received. For a simple-minded person like
 > me it would be nice to have a two-line demo for CharacterStream input (yes,
 > I haven't got to grips with java.io.Reader yet). Of the form:
 > 
 > String input = "<greetings>Hello world!</greetings>";

I have one of my own, which isn't much more complicated than this.
Here's the interesting part (excluding the handlers, etc.):

  /**
    * Main entry point for an application.
    */
  public static void main (String args[])
    throws Exception
  {
    InputSource source;
    Parser parser;
    String doc = "<doc>\n<title>Hello</title>\n<para>Hello, world!</para>\n</doc>";
    StringReader reader = new StringReader(doc);
    source = new InputSource(new ReaderAdapter(reader));

    if (args.length != 0) {
      System.err.println("Usage: java CharTest");
      System.exit(2);
    }

    parser = ParserFactory.makeParser();
    parser.setDocumentHandler(new CharTest());
    parser.parse(source);
  }


All the best,


David

-- 
David Megginson                 ak117 at freenet.carleton.ca
Microstar Software Ltd.         dmeggins at microstar.com
      http://home.sprynet.com/sprynet/dmeggins/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list