HTMLParser.h 662 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // HTMLParser.h
  3. // StackOverflow
  4. //
  5. // Created by Ben Reeves on 09/03/2010.
  6. // Copyright 2010 Ben Reeves. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <libxml/HTMLparser.h>
  10. #import "HTMLNode.h"
  11. @class HTMLNode;
  12. @interface HTMLParser : NSObject
  13. {
  14. @public
  15. htmlDocPtr _doc;
  16. }
  17. -(id)initWithContentsOfURL:(NSURL*)url error:(NSError**)error;
  18. -(id)initWithData:(NSData*)data error:(NSError**)error;
  19. -(id)initWithString:(NSString*)string error:(NSError**)error;
  20. //Returns the doc tag
  21. -(HTMLNode*)doc;
  22. //Returns the body tag
  23. -(HTMLNode*)body;
  24. //Returns the html tag
  25. -(HTMLNode*)html;
  26. //Returns the head tag
  27. - (HTMLNode*)head;
  28. @end