mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Get all attribute values data
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14731 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
70754288cf
commit
b9c933a295
1 changed files with 30 additions and 21 deletions
|
@ -745,17 +745,17 @@ static NSMapTable *nodeNames = 0;
|
|||
{
|
||||
const void *name = prop->name;
|
||||
NSString *key = UTF8Str(name);
|
||||
NSString *value = @"";
|
||||
xmlNodePtr child = prop->children;
|
||||
|
||||
if (prop->children != NULL)
|
||||
while (child != NULL)
|
||||
{
|
||||
const void *content = prop->children->content;
|
||||
const void *content = child->content;
|
||||
|
||||
[d setObject: UTF8Str(content) forKey: key];
|
||||
}
|
||||
else
|
||||
{
|
||||
[d setObject: @"" forKey: key];
|
||||
value = [value stringByAppendingString: UTF8Str(content)];
|
||||
child = child->next;
|
||||
}
|
||||
[d setObject: value forKey: key];
|
||||
prop = prop->next;
|
||||
}
|
||||
|
||||
|
@ -1168,17 +1168,26 @@ static NSMapTable *nodeNames = 0;
|
|||
|
||||
if ([key isEqualToString: n] == YES)
|
||||
{
|
||||
if (prop->children != NULL)
|
||||
{
|
||||
const void *content = prop->children->content;
|
||||
xmlNodePtr child = prop->children;
|
||||
|
||||
value = UTF8Str(content);
|
||||
while (child != NULL)
|
||||
{
|
||||
const void *content = child->content;
|
||||
|
||||
if (value == nil)
|
||||
{
|
||||
value = UTF8Str(content);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = [value stringByAppendingString: UTF8Str(content)];
|
||||
}
|
||||
child = child->next;
|
||||
}
|
||||
break;
|
||||
}
|
||||
prop = prop->next;
|
||||
}
|
||||
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
|
@ -1263,25 +1272,25 @@ static NSMapTable *nodeNames = 0;
|
|||
|
||||
while (prop != NULL)
|
||||
{
|
||||
xmlNodePtr child = prop->children;
|
||||
const void *name = prop->name;
|
||||
NSString *key = UTF8Str(name);
|
||||
NSString *value = @"";
|
||||
|
||||
if (keyTransformSel != 0)
|
||||
{
|
||||
key = [key performSelector: keyTransformSel];
|
||||
}
|
||||
if (prop->children != NULL)
|
||||
while (child != NULL)
|
||||
{
|
||||
const void *content = prop->children->content;
|
||||
const void *content = child->content;
|
||||
|
||||
[d setObject: UTF8Str(content) forKey: key];
|
||||
}
|
||||
else
|
||||
{
|
||||
[d setObject: @"" forKey: key];
|
||||
value = [value stringByAppendingString: UTF8Str(content)];
|
||||
child = child->next;
|
||||
}
|
||||
[d setObject: value forKey: key];
|
||||
prop = prop->next;
|
||||
}
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue