NSXMLParserDelegate -parser:foundCDATA: does not document that it may pass less than the whole CDATA block
| Originator: | chaos42 | ||
| Number: | rdar://17768545 | Date Originated: | 22-Jul-2014 02:16 PM |
| Status: | Open | Resolved: | |
| Product: | Documentation | Product Version: | iOS 7, OS X 10.9 |
| Classification: | Serious bug | Reproducible: | Sometimes |
Summary: NSXMLParserDelegate's -parser:foundCDATA: does not document that the CDATABlock parameter may only contain part of the actual CDATA block currently being parsed, and that the delegate must store and append to whatever variable they're using to store the contents of the CDATA block instead of creating a new string every time this method is called. Steps to Reproduce: 1. View https://developer.apple.com/library/ios/documentation/cocoa/reference/NSXMLParserDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/NSXMLParserDelegate/parser:foundCDATA: Expected Results: See description. There should be a note that sometimes (apparently arbitrarily) the parser will only return the first X characters of data the first time, where X is ~ 300 (but not always the same), Actual Results: No such warning or note exists. This is not documented anywhere, AFAICT. Version: NSXMLParserDelegate protocol reference - https://developer.apple.com/library/ios/documentation/cocoa/reference/NSXMLParserDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/NSXMLParserDelegate/parser:foundCDATA: Notes: Configuration: Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!