2 Copyright (C) 2000-2004 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #ifndef __SaxXMLReader_H__
24 #define __SaxXMLReader_H__
26 #import <Foundation/NSObject.h>
27 #include <SaxObjC/SaxContentHandler.h>
28 #include <SaxObjC/SaxDTDHandler.h>
29 #include <SaxObjC/SaxErrorHandler.h>
30 #include <SaxObjC/SaxEntityResolver.h>
33 new in SAX 2.0beta, replaces SaxParser
35 Interface for reading an XML document using callbacks.
37 This is a common interface that can be shared by many XML parsers. This
38 interface allows an application to set and query features and properties
39 in the parser, to register event handlers for document processing, and to
40 initiate a document parse.
42 This interface replaces the (now deprecated) SAX 1.0 Parser interface; it
43 currently extends Parser to aid in the transition to SAX2, but it will
44 likely not do so in any future versions of SAX.
46 The Reader interface contains two important enhancements over the old
49 1. it adds a standard way to query and set features and properties; and
50 2. it adds Namespace support, which is required for many higher-level XML
53 There are adapters available to convert a SAX1 Parser to a SAX2 XMLReader
57 @protocol SaxXMLReader
59 /* features & properties */
61 - (void)setFeature:(NSString *)_name to:(BOOL)_value;
62 - (BOOL)feature:(NSString *)_name;
63 - (void)setProperty:(NSString *)_name to:(id)_value;
64 - (id)property:(NSString *)_name;
68 - (void)setContentHandler:(id<NSObject,SaxContentHandler>)_handler;
69 - (void)setDTDHandler:(id<NSObject,SaxDTDHandler>)_handler;
70 - (void)setErrorHandler:(id<NSObject,SaxErrorHandler>)_handler;
71 - (void)setEntityResolver:(id<NSObject,SaxEntityResolver>)_handler;
72 - (id<NSObject,SaxContentHandler>)contentHandler;
73 - (id<NSObject,SaxDTDHandler>)dtdHandler;
74 - (id<NSObject,SaxErrorHandler>)errorHandler;
75 - (id<NSObject,SaxEntityResolver>)entityResolver;
79 - (void)parseFromSource:(id)_source;
80 - (void)parseFromSource:(id)_source systemId:(NSString *)_sysId;
81 - (void)parseFromSystemId:(NSString *)_sysId;
85 #endif /* __SaxXMLReader_H__ */