0

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.

EightyEight
  • 3,430
  • 4
  • 36
  • 67

1 Answers1

1

What does [node objectValue] give you?

Alex Reynolds
  • 95,983
  • 54
  • 240
  • 345
  • 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 Apr 23 '09 at 17:05
  • 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 Apr 23 '09 at 17:37
  • It did, thanks. From the docs, it seems like objectValue would be the same as stringValue. I guess it's not. Puzzling. – EightyEight Apr 23 '09 at 18:03
  • 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 Apr 23 '09 at 18:17