XMLReader.h 1.1 KB

12345678910111213141516171819202122232425
  1. //
  2. // XMLReader.h
  3. //
  4. // Created by Troy Brant on 9/18/10.
  5. // Updated by Antoine Marcadet on 9/23/11.
  6. // Updated by Divan Visagie on 2012-08-26
  7. //
  8. #import <Foundation/Foundation.h>
  9. enum {
  10. XMLReaderOptionsProcessNamespaces = 1 << 0, // Specifies whether the receiver reports the namespace and the qualified name of an element.
  11. XMLReaderOptionsReportNamespacePrefixes = 1 << 1, // Specifies whether the receiver reports the scope of namespace declarations.
  12. XMLReaderOptionsResolveExternalEntities = 1 << 2, // Specifies whether the receiver reports declarations of external entities.
  13. };
  14. typedef NSUInteger XMLReaderOptions;
  15. @interface XMLReader : NSObject <NSXMLParserDelegate>
  16. + (NSDictionary *)dictionaryForXMLData:(NSData *)data error:(NSError **)errorPointer;
  17. + (NSDictionary *)dictionaryForXMLString:(NSString *)string error:(NSError **)errorPointer;
  18. + (NSDictionary *)dictionaryForXMLData:(NSData *)data options:(XMLReaderOptions)options error:(NSError **)errorPointer;
  19. + (NSDictionary *)dictionaryForXMLString:(NSString *)string options:(XMLReaderOptions)options error:(NSError **)errorPointer;
  20. @end