My favorites | Sign in
Project Logo
                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#import <Foundation/Foundation.h>
#import "DDXML.h"

@interface NSXMLElement (XMPPStreamAdditions)

+ (NSXMLElement *)elementWithName:(NSString *)name xmlns:(NSString *)ns;

- (NSXMLElement *)elementForName:(NSString *)name;
- (NSXMLElement *)elementForName:(NSString *)name xmlns:(NSString *)xmlns;

- (NSString *)xmlns;
- (void)setXmlns:(NSString *)ns;

- (void)addAttributeWithName:(NSString *)name stringValue:(NSString *)string;

- (int)attributeIntValueForName:(NSString *)name;
- (BOOL)attributeBoolValueForName:(NSString *)name;
- (float)attributeFloatValueForName:(NSString *)name;
- (double)attributeDoubleValueForName:(NSString *)name;
- (NSString *)attributeStringValueForName:(NSString *)name;

- (int)attributeIntValueForName:(NSString *)name withDefaultValue:(int)defaultValue;
- (BOOL)attributeBoolValueForName:(NSString *)name withDefaultValue:(BOOL)defaultValue;
- (float)attributeFloatValueForName:(NSString *)name withDefaultValue:(float)defaultValue;
- (double)attributeDoubleValueForName:(NSString *)name withDefaultValue:(double)defaultValue;
- (NSString *)attributeStringValueForName:(NSString *)name withDefaultValue:(NSString *)defaultValue;

- (NSMutableDictionary *)attributesAsDictionary;

@end
Show details Hide details

Change log

r167 by deusty on Oct 27, 2009   Diff
Switching to the new protocol/optional
syntax, away from the old category on
NSObject syntax, since this is now
recommended by Apple.
Go to: 
Project members, sign in to write a code review

Older revisions

r89 by deusty on May 21, 2009   Diff
The attributesAsDictionary method now
returns a mutable dictionary. It did
before, it just didn't announce it in
the API contract.
r43 by deusty on Sep 29, 2008   Diff
NSXML doesn't output the default
namespace (via XMLString) if it was
set via setURI:.  To get around this
but I was manually adding an attribute
named "xmlns".  Now switching to using
...
r40 by deusty on Sep 26, 2008   Diff
More iPhone changes
All revisions of this file

File info

Size: 1224 bytes, 30 lines
Hosted by Google Code