Re: [Q] NSXMLDocument & TidyHTML on Leopard
Re: [Q] NSXMLDocument & TidyHTML on Leopard
- Subject: Re: [Q] NSXMLDocument & TidyHTML on Leopard
- From: Kotatsu RIN <email@hidden>
- Date: Thu, 14 Feb 2008 03:01:25 +0900
Hi Jens,
Thank you for your reply.
I add lines...
==
NSLog(@"Error Code: %d", [err code]);
NSLog(@"Errors:");
NSLog([err localizedDescription]);
NSLog([err localizedFailureReason]);
==
and here is the Log.
==
2008-02-14 02:40:36.568 app[2476] Error Code: 1
2008-02-14 02:40:36.568 app[2476] Errors:
2008-02-14 02:40:36.568 app[2476] line 51 column 9 - Warning: <form> isn't allowed in <table> elements
line 52 column 9 - Warning: missing </form> before <tr>
line 53 column 9 - Warning: inserting implicit <table>
line 60 column 36 - Warning: missing </a> before </td>
line 53 column 9 - Warning: <input> isn't allowed in <tr> elements
line 78 column 9 - Error: discarding unexpected </form>
line 79 column 9 - Error: discarding unexpected </tr>
line 87 column 25 - Warning: missing <tr>
line 97 column 221 - Warning: unescaped & or unknown entity "&TZ"
line 208 column 1 - Warning: missing <td>
line 208 column 1 - Warning: <form> shouldn't be nested
line 331 column 1 - Warning: <form> shouldn't be nested
line 379 column 18 - Warning: <form> shouldn't be nested
line 383 column 27 - Error: discarding unexpected <table>
line 384 column 33 - Warning: missing <td>
line 379 column 18 - Warning: missing </form>
line 421 column 10 - Error: discarding unexpected </td>
line 423 column 3 - Error: discarding unexpected </tr>
line 51 column 9 - Warning: <br> isn't allowed in <table> elements
line 429 column 3 - Warning: <table> dropping value "0" for repeated attribute "border"
line 429 column 3 - Error: discarding unexpected <table>
1427 warnings, 12 errors were found! Not all warnings/errors were shown.
This document has errors that must be fixed before
using HTML Tidy to generate a tidied up version.
==
note: As a whole, same message on Tiger & Leopard.
I know there is so many warnings and errors, and it said
"...must be fixed before...".
However, My application can get the data from node on Tiger.
Is it because "minor changes" that you pointed out ?
Answers for your Q. :
==
> * Does the document load at all? (Is htmlFileDoc non-nil?)
> * If you convert the doc back to a string, does it look like it contains the nodes you're querying for?)
It does.
> * What's the XPath expression?
ex.
cXpath = [NSString stringWithFormat:@"/html[1]/body[1]/form[1]/table[3]/tr[1]/td[1]/table[1]/tr[1]/td[1]/b[2]/node()[1]"];
==
Thank you!
Kotatsu R.
On 2008/02/14, at 1:53, Jens Alfke wrote:
>
> On 13 Feb '08, at 7:59 AM, Kotatsu RIN wrote:
>
>> It work fine on Tiger, but doesn't work on Leopard.
>
>> Leopard return nothing for cNodes...
>
> I know there were minor changes to libTidy and XQuery in 10.5, but I wouldn't think those would affect what you're doing.
>
> * Does the document load at all? (Is htmlFileDoc non-nil?)
> * If you convert the doc back to a string, does it look like it contains the nodes you're querying for?)
> * What is the error message (if any) in the 'err' string after the nodesForXPath: call?
> * What's the XPath expression?
>
> ―Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden