NSXMLDocument and XSLT
NSXMLDocument and XSLT
- Subject: NSXMLDocument and XSLT
- From: Torsten Curdt <email@hidden>
- Date: Sat, 14 Apr 2007 04:52:51 +0200
According to the compiler this is not OK:
NSXMLElement *root = (NSXMLElement *)[NSXMLNode
elementWithName:@"something"];
NSXMLDocument *doc = [[NSXMLDocument alloc]
initWithRootElement:root];
[doc setVersion:@"1.0"];
[doc setCharacterEncoding:@"UTF-8"];
[root addChild:[NSXMLNode commentWithStringValue:@"a comment"]];
[[doc XMLStringWithOptions:NSXMLNodePrettyPrint]
writeToFile:@"some/path/output.xml" atomically:YES];
NSURL *url = [NSURL fileURLWithPath:@"some/path/test.xslt"];
NSError *err;
NSXMLDocument *result = (NSXMLDocument *) [doc
objectByApplyingXSLTAtURL:url, arguments:nil, error:&err];
main.m:49: (Messages without a matching method signature will be
assumed to return 'id' and accept '...' as arguments.)
main.m:49: warning: 'NSXMLDocument' may not respond to '-
objectByApplyingXSLTAtURL:::'
main.m:49: error: 'error' undeclared (first use in this function)
main.m:49: error: 'arguments' undeclared (first use in this function)
What am I missing here? I am on 10.4.9 and the SDK Path is set to /
Developer/SDKs/MacOSX10.4u.sdk
cheers
--
Torsten
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden