XMLDictionary icon indicating copy to clipboard operation
XMLDictionary copied to clipboard

XMLString returning plist

Open azplanlos opened this issue 10 years ago • 4 comments

XMLDictionary's [NSDictionary XMLString] method returns a plist XML on OS X 10.10.5 but returns a correct XML on OS X 10.7.5.

azplanlos avatar Oct 08 '15 19:10 azplanlos

did you ever figure out the cause of this? I get the same thing on OSX 10.11.1

sweetppro avatar Nov 07 '15 22:11 sweetppro

Yes, Apple implemented a similar method with the same name -(NSData_)XMLData. I was able to use -(NSData_)innerXML instead in my case where I don't need the root object. But this might be different in your project. The only way to get rid of this would be to rename the method in the XMLDictionary category which will break old projects. That's why I didn't file a pull request yet.

Am 08.11.2015 um 01:11 schrieb SweetPPro [email protected]:

did you ever figure out the cause of this? I get the same thing on OSX 10.11.1

— Reply to this email directly or view it on GitHub.

azplanlos avatar Nov 08 '15 07:11 azplanlos

ah - you rock! thanks! Ive been trying to figure this out all day. I took your advice and renamed: - (NSString *)XMLString; To - (NSString *)XMLDictionaryString;

then it worked right away. :)

this fix should really be added to Master, so it doesn't trip other ppl up. thanks again, such a simple fix

sweetppro avatar Nov 08 '15 07:11 sweetppro

I've just hit this exact issue on a legacy application that I occasionally work on, thank you for pointing out this issue!

Workshed avatar Jul 22 '21 12:07 Workshed