bugGNUstep - Bugs: bug #31266, GSXML fails when parsing HTML


You are not allowed to post comments on this tracker with your current authentication level.

bug #31266: GSXML fails when parsing HTML

Submitted by:  David Wetzel <dwetzel>
Submitted on:  Thu 07 Oct 2010 05:16:05 AM UTC  
Category:  Base/Foundation Severity:  5 - Blocker
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Sat 05 Mar 2011 04:40:13 PM UTC, comment #2: 

No update for months ... guess this one is working.

Richard Frith-Macdonald <CaS>
Project Member
Tue 12 Oct 2010 07:21:49 PM UTC, comment #1: 

I changed the code to assume that the missing value means that we have a 'minimised' attribute ... where the attribute value should be the same as its name.

Richard Frith-Macdonald <CaS>
Project Member
Thu 07 Oct 2010 05:16:05 AM UTC, original submission:  


HTML code like:



(gdb) p  key
$3 = (class NSString *) 0x7f7ff9006470
(gdb) po  key
(gdb) p obj 
$4 = (class NSString *) 0x0

[dict setObject: obj forKey: key]; <<-- will raise

My current local fix is:

static void
startElementFunction(void ctx, const unsigned char name,
 const unsigned char **atts)
 NSMutableDictionary *dict;

 NSCAssert(ctx,@"No Context");
 dict = [NSMutableDictionary dictionary];
 if (atts != NULL)
     int i = 0;

     while (atts[i] != NULL)
  NSString *key = UTF8Str(atts[i++]);
  NSString *obj = UTF8Str(atts[i++]);

   // we seem to have a problem with
   // <OPTION VALUE="unknown" SELECTED>
   // which produced an key "selected", but nil value for obj

   if (obj) {
     [dict setObject: obj forKey: key];
   } else {
     // log warning?

 [HANDLER startElement: UTF8Str(name)
     attributes: dict];

Which is probably not what we always want, because the 'selected' information is lost.
Probably we could just use NSNull as obj so that we know later that its just a dummy.



David Wetzel <dwetzel>
Project Member


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by dwetzel (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-03-05 CaS Open/ClosedIn Test => Closed
    2010-10-12 CaS StatusNone => Fixed
        Open/ClosedOpen => In Test

    Back to the top

    Powered by Savane 3.5