//
//  GSXMLWriter.h
//  GSFontTools
//
//  Created by Georg Seifert on 23.07.11.
//  Copyright 2011 schriftgestaltung.de. All rights reserved.
//

int hexStringToInt(NSString *string);
NSString *hexStr(NSData *data, int spacing);

/**
 Helper for writing XML
 has to be initialized with path to where XML file should be written
*/
@interface GSXMLWriter : NSObject

@property () BOOL disableComments;

- (instancetype)initWithPath:(NSString *)path;
- (instancetype)initWithPath:(NSString *)path indentWhite:(NSString *)indentWhite /*idlefunc=None,*/ encoding:(NSString *)encoding;

- (void)close;
- (void)write:(NSString *)data;
- (void)write8bitString:(NSString *)data;
- (void)write16bitString:(NSString *)data;
- (void)writeCData:(NSString *)string;
- (void)newline;
- (void)comment:(NSString *)data;
- (void)simpleTag:(NSString *)_TAG_ args:(id)args;
- (void)beginTag:(NSString *)_TAG_ args:(id)args;
- (void)endTag:(NSString *)_TAG_;
- (void)dumpHex:(NSData *)data;
- (void)indent;
- (void)dedent;
- (NSString *)stringifyArgs:(id)args;

@end
