]> err.no Git - sope/blob - sope-xml/SaxObjC/SaxXMLReader.h
fixed base64 decoding bug
[sope] / sope-xml / SaxObjC / SaxXMLReader.h
1 /*
2   Copyright (C) 2000-2005 SKYRIX Software AG
3
4   This file is part of SOPE.
5
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
9   later version.
10
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.
15
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
19   02111-1307, USA.
20 */
21
22 #ifndef __SaxXMLReader_H__
23 #define __SaxXMLReader_H__
24
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>
30
31 /*
32   new in SAX 2.0beta, replaces SaxParser
33
34   Interface for reading an XML document using callbacks. 
35
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.
40
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.
44
45   The Reader interface contains two important enhancements over the old
46   Parser interface:
47
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
50        standards. 
51
52   There are adapters available to convert a SAX1 Parser to a SAX2 XMLReader
53   and vice-versa.
54 */
55
56 @protocol SaxXMLReader
57
58 /* features & properties */
59
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;
64
65 /* handlers */
66
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;
75
76 /* parsing */
77
78 - (void)parseFromSource:(id)_source;
79 - (void)parseFromSource:(id)_source systemId:(NSString *)_sysId;
80 - (void)parseFromSystemId:(NSString *)_sysId;
81
82 @end
83
84 #endif /* __SaxXMLReader_H__ */