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 OOoMetaDataParser : NSObject {
28cdf0e10cSrcweir     //indicates if content should be read
29cdf0e10cSrcweir     BOOL shouldReadCharacters;
30cdf0e10cSrcweir     //indicates if the current element is a custom metadata tag
31cdf0e10cSrcweir     BOOL isCustom;
32cdf0e10cSrcweir 
33cdf0e10cSrcweir     NSMutableDictionary *metaValues;
34cdf0e10cSrcweir     NSMutableString *textCurrentElement;
35cdf0e10cSrcweir     NSString *customAttribute;
36cdf0e10cSrcweir }
37cdf0e10cSrcweir 
parseXML:intoDictionary:(NSData*,NSMutableDictionary*)38cdf0e10cSrcweir - (void)parseXML:(NSData*)data intoDictionary:(NSMutableDictionary*)dict;
39cdf0e10cSrcweir 
40cdf0e10cSrcweir //delegates
parser:didStartElement:namespaceURI:qualifiedName:attributes:(NSXMLParser*,NSString*,NSString*,NSString*,NSDictionary*)41cdf0e10cSrcweir - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict;
42cdf0e10cSrcweir 
parser:didEndElement:namespaceURI:qualifiedName:(NSXMLParser*,NSString*,NSString*,NSString*)43cdf0e10cSrcweir - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName;
44cdf0e10cSrcweir 
parser:foundCharacters:(NSXMLParser*,NSString*)45cdf0e10cSrcweir - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string;
46cdf0e10cSrcweir 
parser:parseErrorOccurred:(NSXMLParser*,NSError*)47cdf0e10cSrcweir - (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError;
48cdf0e10cSrcweir @end
49