Sunday, January 24, 2010

Objective-XML 5.3

New in this release:
  • Cocotron targets for Windows support.
  • XMLRPC support.
  • No longer uses 'private' API that was causing AppStore rejections for some iPhone apps using Objective-XML.
  • Support for numeric entitites.


DieLaughing said...

You say you took the private header file out, but it looks like it's still in there.

Lesmond said...

Still no basic implementation guide. please can you help!

leftspin said...

Hi, my app was flagged as using a private api for a call to initWithBytes:length:copy:freeWhenDone:bytesAreVM:.

In the 5.3 release, this call seems to still be declared in MPWSubData.m. Searching through the code, it is called in initWithContentsOfMappedFileCString inside of NSDataPrivateMemoryMapping.m.

Not to sound ungrateful (it's save me a ton of time in implementing my app and seems to work beautifully, and for that I thank you), but I may be forced to switch to something else unless this problem is fixed. Of course, I'd rather not switch and save the work ;)

Marcel Weiher said...

@DieLaughing + @leftspin: while there are some header-remnants, no actual code referencing the message -initWithBytes:length:copy:freeWhenDone:bytesAreVM: is compiled into the binary. If you look more closely at NSDataPrivateMemoryMapping.m, you will see a big #if 0 at the top...

(I just verified this with nm and otool using binaries compiled from a fresh download).

So the fact that you're still seeing this is a bit strange, maybe you can send me an e-mail and we can figure out what's wrong.

leftspin said...

Hi Marcel, thank you for the response. I was actually just reacting to the existence of the call in the source files. I did not check the binary to see if it was referenced, and probably should have.

Heather Goldman said...

I apologize if I am overlooking something very obvious but could you explain to me how I use this framework in an iPhone application?

I am working on my first iPhone app and I have never used a 3rd party framework and I don't know what I need to do to be able to use this in my project. I have downloaded Objective-XML and I'm not sure where to go from there. I tried to build the targets but get a bunch of errors. Except if I build iXmkKit (iPhone). Is that the only one I need to build since I am working on an iPhone app? How do I add this framework to my project?

Again I apologize if I am asking an obvious/dumb question. Thanks for you patience.

Xaroth said...

I've found two pretty bad bugs in version 5.3.

In MPWSubData.m, in -(int)intValue, you correctly trap the '-' for the sign of the integer, but then neglect to actually use it.

To correct, simply modify line 130 from:
return value;
return value * sign;

The iPhone target won't build unless the #import "AccessorMacros.h" line is uncommented from MPWMAXParser_private.h on line 11.

Hope this helps people when trying to figure out why negative integers in their attributes aren't working correctly, or why the iPhone target won't build. ;)

Also, you'll be pleased to know that - with only minor modifications to the target - I was able to compile this for iOS 4.


PS: Any chance of putting this up on SourceForge or github or something, so that people can contribute patches and documentation a little more easily?

Kez said...

Thanks for making such a comprehensive parser freely available.
So far as I can tell yours is the only parser which deals with international character encodings aka non UTF-8. This is essential for my apps as I am dealing with xml from around the world.

I would respectfully like to ask if you have any idea when you may be looking at the encoding and decoding methods? I noticed that these are noted as broken due to moving the DOM parser.
As a work-a-round I am having to cast every ivar (of which there are a lot of strings and dictionarys) back to its original class in order to encode it without issue.

Thanks for your hard work.

@Xaroth - thanks for the heads up in the iphone target that really helped.