Re: Help with CFXMLTreeCreateFromData with an NSMutableURLRequest response.
Re: Help with CFXMLTreeCreateFromData with an NSMutableURLRequest response.
- Subject: Re: Help with CFXMLTreeCreateFromData with an NSMutableURLRequest response.
- From: Scott Andrew <email@hidden>
- Date: Sat, 19 Mar 2005 06:53:35 -0800
On 3/19/05 6:32 AM, "Frederick Cheung" <email@hidden> wrote:
>
> On 19 Mar 2005, at 09:58, Scott Andrew wrote:
>>
>> CXMLTreeRef dataTree = CFXMLTreeCreateFromData (kCFAllocatorDefault,
>> (CDataRef)result,
>> NULL,
>>
>> kCFXMLParserSkipWhitespace,
>>
>> kCFXMLNodeCurrentVersion)
>>
>> My dataTree is NULL. I can convert my data to string and see the XML.
>> Getting the XML from a URL is not an option since I have to be logged
>> into
>> the server with cookies.
>>
> I'd try using CFXMLTreeCreateFromDataWithError so that you can see
> exactly what the parser doesn't like about the data you are feeding it.
>
> Fred
>
I found the problem but wonder if there is any way to solve it without
pasring the string and encoding it properly by hand, in that case I might as
well parse it my self.
The server that I am interacting with is using literals for "&" and not
&. Is there a way to get NSString or NSData to properly encode this?
Since its a one time shot read I could write my own parser the nodes are
always the same format..
It just repeats... "<gallery>.. Some childer </gallery>.... But would like
to use the parser if I could.
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden