Skip to content
Tpbradley edited this page Jan 24, 2012 · 1 revision

Requirements

The compression addition requires libz.dylib

If this library is not included in the "Linked Frameworks and Libraries" section of your project you may get these link errors when you build the project.

Undefined symbols for architecture x86_64:
  "_deflateInit2_", referenced from:
      -[NSData(TBXML_Compression) gzipDeflate] in TBXML+Compression.o

To include the library, select your project in Xcode and click on the target. Under the summary tab, add "libz.dylib" to the "Linked Frameworks and Libraries"

Details

If you include the Compression addition, TBXML will automatically decompress an XML file before parsing. The following methods support automatic file decompression.

+ (id)tbxmlWithXMLFile:(NSString*)aXMLFile error:(NSError **)error;
+ (id)tbxmlWithXMLFile:(NSString*)aXMLFile fileExtension:(NSString*)aFileExtension error:(NSError **)error;

- (id)initWithXMLFile:(NSString*)aXMLFile error:(NSError **)error;
- (id)initWithXMLFile:(NSString*)aXMLFile fileExtension:(NSString*)aFileExtension error:(NSError **)error;

File names must end with "gz"

Clone this wiki locally