OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: simple XML for C++ application data-file I/O

[ Lists Home | Date Index | Thread Index ]
  • From: David Megginson <david@megginson.com>
  • To: xml-dev <xml-dev@ic.ac.uk>
  • Date: 06 Dec 1999 08:50:24 -0500

Paul Miller <stele@fxtech.com> writes:

> I've seen a lot of discussion about DOM, SAX, RDF, etc. but none of the
> solutions I've seen are very simple or straightforward for generic
> application data I/O (ie. non web, e-commerce, Java-type stuff). In
> other words, I'm about to roll my own, and would like to gauge interest
> in a small callback-based API for simple XML I/O.

We tried to keep SAX 1.0 as simple as possible -- how would you
simplify the following further?

  public static void main ()
  {
    Parser parser = new SomeSAXDriver();
    parser.setDocumentHandler(new MyHandler());
    try {
      parser.parse("http://www.foo.com/foo.xml");
    } catch (SAXException e) {
      // do something!!
    }
  }

and

  public class MyHandler extends HandlerBase
  {
    public void startElement (String name, AttributeList atts)
    {
      // do something!!
    }

    public void endElement (String name)
    {
      // do something!!
    }

    public void characters (char ch[], int start, int length)
    {
      // do something!!
    }
  }


All the best,


David

-- 
David Megginson                 david@megginson.com
           http://www.megginson.com/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS