Re: How to add a DOCTYPE declaration to an NSXMLDocument?
Re: How to add a DOCTYPE declaration to an NSXMLDocument?
- Subject: Re: How to add a DOCTYPE declaration to an NSXMLDocument?
- From: Bruce Sharpe <email@hidden>
- Date: Wed, 31 Mar 2010 01:00:55 -0700
> Sounds promising, but the document type declaration doesn't get written
out to file.
If I create the document using a string instead, it works:
NSString *docString = [NSString stringWithFormat:@"<!DOCTYPE
myDocType><myDocType></myDocType>"];
NSXMLDocument *myDoc = [[NSXMLDocument alloc] initWithXMLString:docString
options:0 error:&err];
[[myDoc DTD] setName:@"myDocType"];
Seems equivalent to half a dozen other things I tried, but this is the only
one that works.
Bruce
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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