2 Copyright (C) 2000-2005 SKYRIX Software AG
4 This file is part of SOPE.
6 SOPE 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 SOPE 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 SOPE; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #ifndef __SaxXMLReader_H__
23 #define __SaxXMLReader_H__
25 #import <Foundation/NSObject.h>
26 #include <SaxObjC/SaxContentHandler.h>
27 #include <SaxObjC/SaxDTDHandler.h>
28 #include <SaxObjC/SaxErrorHandler.h>
29 #include <SaxObjC/SaxEntityResolver.h>
32 new in SAX 2.0beta, replaces SaxParser
34 Interface for reading an XML document using callbacks.
36 This is a common interface that can be shared by many XML parsers. This
37 interface allows an application to set and query features and properties
38 in the parser, to register event handlers for document processing, and to
39 initiate a document parse.
41 This interface replaces the (now deprecated) SAX 1.0 Parser interface; it
42 currently extends Parser to aid in the transition to SAX2, but it will
43 likely not do so in any future versions of SAX.
45 The Reader interface contains two important enhancements over the old
48 1. it adds a standard way to query and set features and properties; and
49 2. it adds Namespace support, which is required for many higher-level XML
52 There are adapters available to convert a SAX1 Parser to a SAX2 XMLReader
56 @protocol SaxXMLReader
58 /* features & properties */
60 - (void)setFeature:(NSString *)_name to:(BOOL)_value;
61 - (BOOL)feature:(NSString *)_name;
62 - (void)setProperty:(NSString *)_name to:(id)_value;
63 - (id)property:(NSString *)_name;
67 - (void)setContentHandler:(id<NSObject,SaxContentHandler>)_handler;
68 - (void)setDTDHandler:(id<NSObject,SaxDTDHandler>)_handler;
69 - (void)setErrorHandler:(id<NSObject,SaxErrorHandler>)_handler;
70 - (void)setEntityResolver:(id<NSObject,SaxEntityResolver>)_handler;
71 - (id<NSObject,SaxContentHandler>)contentHandler;
72 - (id<NSObject,SaxDTDHandler>)dtdHandler;
73 - (id<NSObject,SaxErrorHandler>)errorHandler;
74 - (id<NSObject,SaxEntityResolver>)entityResolver;
78 - (void)parseFromSource:(id)_source;
79 - (void)parseFromSource:(id)_source systemId:(NSString *)_sysId;
80 - (void)parseFromSystemId:(NSString *)_sysId;
84 #endif /* __SaxXMLReader_H__ */