views:

167

answers:

1

Hello all,

I have an XML document which contains an element that is over 90,000 characters in length*.

NSXMLNode* node = ...;
NSString* val = [node stringValue]; // this is not the full contents of the node!

The second line only gives me 80k or so. This is obviously not what I want, so I'd appreciate some suggestions. Is NSXMLNode broken? I'd guess that I'm doing something wrong.

Thanks in advance!

* i know that 90kbytes in an element is not great, this is out of my hands.

+1  A: 

What does [node objectValue] give you?

Alex Reynolds
Thanks Alex,I can't spot the difference between the [node stringValue] and [node objectValue] when the return is string. How did you know about this?
EightyEight
I'm curious, but did this help? I wasn't sure from your question.Nonetheless, I looked at the NSXMLNode class reference at: http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/Foundation/Classes/NSXMLNode_Class/Reference/Reference.html
Alex Reynolds
It did, thanks.From the docs, it seems like objectValue would be the same as stringValue. I guess it's not. Puzzling.
EightyEight
If you have a moment, you might file a bug with http://bugreporter.apple.com -- that might help Apple fix this or at least point to them that they should clarify whatever restriction is on [node stringValue].
Alex Reynolds