//
//  XMLParser.h
//  Mahammad
//
//  Created on 12/29/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
enum parserTyp {
	kSingleLevel,
	kTwoLevel
};

@interface XMLParser : NSObject <NSXMLParserDelegate>{

	int parserType;
	BOOL isStart;
	
	NSString* mainElement;

	NSMutableDictionary* resultData;
	
	NSMutableArray* elements;
	NSMutableArray* values;
	
	NSMutableDictionary* currentItems;
	NSString* currentElement;

	int index;
}

-(NSMutableDictionary*) parseXML:(NSString*)str mainElement:(NSString*)_mainElement;
-(NSArray*) parseXML:(NSString*)str forKey:(NSString*)_mainElement;

@end
