1*5c66ce18SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*5c66ce18SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*5c66ce18SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*5c66ce18SAndrew Rist  * distributed with this work for additional information
6*5c66ce18SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*5c66ce18SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*5c66ce18SAndrew Rist  * "License"); you may not use this file except in compliance
9*5c66ce18SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*5c66ce18SAndrew Rist  *
11*5c66ce18SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*5c66ce18SAndrew Rist  *
13*5c66ce18SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*5c66ce18SAndrew Rist  * software distributed under the License is distributed on an
15*5c66ce18SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*5c66ce18SAndrew Rist  * KIND, either express or implied.  See the License for the
17*5c66ce18SAndrew Rist  * specific language governing permissions and limitations
18*5c66ce18SAndrew Rist  * under the License.
19*5c66ce18SAndrew Rist  *
20*5c66ce18SAndrew Rist  *************************************************************/
21*5c66ce18SAndrew Rist 
22*5c66ce18SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #import <Cocoa/Cocoa.h>
25cdf0e10cSrcweir 
26cdf0e10cSrcweir 
27cdf0e10cSrcweir @interface OOoContentDataParser : NSObject {
28cdf0e10cSrcweir     // indicates if we are interested in an element's content
29cdf0e10cSrcweir     BOOL shouldReadCharacters;
30cdf0e10cSrcweir 
31cdf0e10cSrcweir     // the MD importer's values
32cdf0e10cSrcweir     NSMutableDictionary *mdiValues;
33cdf0e10cSrcweir 
34cdf0e10cSrcweir     // all of the text inside a document
35cdf0e10cSrcweir     NSMutableString *textContent;
36cdf0e10cSrcweir 
37cdf0e10cSrcweir     // the current element's content
38cdf0e10cSrcweir     NSMutableString *runningTextContent;
39cdf0e10cSrcweir }
40cdf0e10cSrcweir 
parseXML:intoDictionary:(NSData*,NSMutableDictionary*)41cdf0e10cSrcweir - (void)parseXML:(NSData*)data intoDictionary:(NSMutableDictionary*)dict;
42cdf0e10cSrcweir 
43cdf0e10cSrcweir // delegates
parser:didStartElement:namespaceURI:qualifiedName:attributes:(NSXMLParser*,NSString*,NSString*,NSString*,NSDictionary*)44cdf0e10cSrcweir - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict;
45cdf0e10cSrcweir 
parser:didEndElement:namespaceURI:qualifiedName:(NSXMLParser*,NSString*,NSString*,NSString*)46cdf0e10cSrcweir - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName;
47cdf0e10cSrcweir 
parser:foundCharacters:(NSXMLParser*,NSString*)48cdf0e10cSrcweir - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string;
49cdf0e10cSrcweir 
parser:parseErrorOccurred:(NSXMLParser*,NSError*)50cdf0e10cSrcweir - (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError;
51cdf0e10cSrcweir 
parserDidEndDocument:(NSXMLParser*)52cdf0e10cSrcweir - (void)parserDidEndDocument:(NSXMLParser *)parser;
53cdf0e10cSrcweir 
54cdf0e10cSrcweir @end
55