Thanks for trying... It's a shame... I have an OPML importer (no export) 
working based on old code I had found based on CFXMLTreeRef, but I was hoping 
to write an importer/exporter based on NSXMLDocument, and this is the one 
sticking point - everything else has been trivial with the NSXMLDocument class. 
Is this just an oddity with the OPML specs, that they allow such whitespace in 
an attributes when XML in general doesn't? Or is it just a limitation of 
NSXMLNode attributes? And does this mean that there is just no way of doing it 
using NSXMLDocument and that I'll have to look for a different solution 
altogether?

Anyway, thanks for your help - much appreciated.
All the best,
Keith


--- On Mon, 11/24/08, Jeff Johnson <[EMAIL PROTECTED]> wrote:

> From: Jeff Johnson <[EMAIL PROTECTED]>
> Subject: Re: NSXMLElement -stringValue and whitepsace
> To: [EMAIL PROTECTED]
> Cc: "Cocoa-Dev Mail" <[email protected]>
> Date: Monday, November 24, 2008, 1:14 AM
> On Nov 23, 2008, at 6:56 PM, Jeff Johnson wrote:
> 
> > On Nov 23, 2008, at 4:42 PM, Keith Blount wrote:
> > 
> >> Hi Jeff,
> >> 
> >> Thanks for the reply.
> >> 
> >>> Keith,
> >>> 
> >>> When you say that none of the options
> you've tried make
> >>> a difference, does that include this one?
> >>> 
> >>>
> http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSXMLNode_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSXMLNodePreserveWhitespace
> >>> 
> >> 
> >> Yes, that was one of the first things I tried, in
> fact:
> >> 
> >> NSXMLDocument *OPMLDocument = [[NSXMLDocument
> alloc] initWithData:xmlData
> options:NSXMLNodePreserveWhitespace error:NULL];
> >> 
> >> The whitespace of attribute stringValues still
> gets squished, though.
> >> 
> >> Thanks,
> >> Keith
> > 
> > Keith,
> > 
> > It appears that the XML spec requires that attribute
> values be normalized:
> > 
> > http://www.xml.com/axml/target.html#AVNormalize
> > 
> > Thus, if you still want the whitespace, you would
> probably have to subclass NSXMLNode or NSXMLDocument.
> > 
> > -Jeff
> 
> Actually, in my brief testing, subclassing doesn't work
> too well either, so you may be out of luck as far as
> NSXMLDocument is concerned.
> 
> -Jeff


--- On Mon, 11/24/08, Jeff Johnson <[EMAIL PROTECTED]> wrote:

> From: Jeff Johnson <[EMAIL PROTECTED]>
> Subject: Re: NSXMLElement -stringValue and whitepsace
> To: [EMAIL PROTECTED]
> Cc: "Cocoa-Dev Mail" <[email protected]>
> Date: Monday, November 24, 2008, 1:14 AM
> On Nov 23, 2008, at 6:56 PM, Jeff Johnson wrote:
> 
> > On Nov 23, 2008, at 4:42 PM, Keith Blount wrote:
> > 
> >> Hi Jeff,
> >> 
> >> Thanks for the reply.
> >> 
> >>> Keith,
> >>> 
> >>> When you say that none of the options
> you've tried make
> >>> a difference, does that include this one?
> >>> 
> >>>
> http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSXMLNode_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSXMLNodePreserveWhitespace
> >>> 
> >> 
> >> Yes, that was one of the first things I tried, in
> fact:
> >> 
> >> NSXMLDocument *OPMLDocument = [[NSXMLDocument
> alloc] initWithData:xmlData
> options:NSXMLNodePreserveWhitespace error:NULL];
> >> 
> >> The whitespace of attribute stringValues still
> gets squished, though.
> >> 
> >> Thanks,
> >> Keith
> > 
> > Keith,
> > 
> > It appears that the XML spec requires that attribute
> values be normalized:
> > 
> > http://www.xml.com/axml/target.html#AVNormalize
> > 
> > Thus, if you still want the whitespace, you would
> probably have to subclass NSXMLNode or NSXMLDocument.
> > 
> > -Jeff
> 
> Actually, in my brief testing, subclassing doesn't work
> too well either, so you may be out of luck as far as
> NSXMLDocument is concerned.
> 
> -Jeff


      
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to