mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 22:55:11 +00:00
[ADD/WIP] Editing support XMPP->Matrix
This commit is contained in:
parent
771c3271ad
commit
ae740878c8
13 changed files with 249 additions and 106 deletions
|
|
@ -137,7 +137,7 @@ XMLookForTKV(XMLElement *parent, char *tag, char *k, char *v)
|
|||
{
|
||||
size_t i;
|
||||
|
||||
if (!parent || !tag || !k || !v)
|
||||
if (!parent || !k || !v)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -147,9 +147,12 @@ XMLookForTKV(XMLElement *parent, char *tag, char *k, char *v)
|
|||
XMLElement *child = ArrayGet(parent->children, i);
|
||||
HashMap *attrs = child->attrs;
|
||||
char *value = HashMapGet(attrs, k);
|
||||
if (StrEquals(child->name, tag) && StrEquals(value, v))
|
||||
if (StrEquals(child->name, tag) || !tag)
|
||||
{
|
||||
return child;
|
||||
if (StrEquals(value, v))
|
||||
{
|
||||
return child;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue