/JMRXMLNode.h

http://rtm2cocoa.googlecode.com/ · C Header · 48 lines · 33 code · 7 blank · 8 comment · 0 complexity · 2f0ae850c3e708275ea5d6b1dfae23d8 MD5 · raw file

  1. //
  2. // JMRXMLNode.h
  3. /*
  4. This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit http://creativecommons.org/licenses/by/1.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
  5. */
  6. #import <Foundation/Foundation.h>
  7. #include <CoreFoundation/CoreFoundation.h>
  8. @interface JMRXMLNode : NSObject {
  9. CFXMLNodeRef _xmlNode;
  10. NSMutableDictionary *_attributes;
  11. NSMutableArray *_attributeOrder;
  12. }
  13. // accessors
  14. -(NSMutableDictionary *)getAttributes;
  15. -(void)setAttributes:(NSMutableDictionary *)value;
  16. -(NSMutableArray *)getAttributeOrder;
  17. -(void)setAttributeOrder:(NSMutableArray *)value;
  18. -(id)initWithString:(NSString *)string type:(int)type info:(CFXMLElementInfo *)info;
  19. -(id)initWithCFXMLNodeRef:(CFXMLNodeRef)nodeRef;
  20. -(id)initWithName:(NSString *)tagName;
  21. -(id)initWithText:(NSString *)text;
  22. -(id)initWithCdata:(NSString *)cdata;
  23. +(JMRXMLNode *)nodeWithCFXMLNodeRef:(CFXMLNodeRef)nodeRef;
  24. +(JMRXMLNode *)nodeWithName:(NSString *)tagName;
  25. +(JMRXMLNode *)nodeWithText:(NSString *)text;
  26. +(JMRXMLNode *)nodeWithCdata:(NSString *)cdata;
  27. -(CFXMLNodeRef)nodeRef;
  28. -(NSString *)getString;
  29. -(NSString *)getAttributeForKey:(NSString *)key;
  30. -(void)setAttribute:(NSString *)value forKey:(NSString *)key;
  31. -(BOOL)isType:(int)type;
  32. -(BOOL)isElement;
  33. -(BOOL)isComment;
  34. -(BOOL)isProcessingInstruction;
  35. -(BOOL)isText;
  36. -(BOOL)isCdata;
  37. -(BOOL)isDocument;
  38. -(void)dealloc;
  39. @end