mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:35:10 +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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -730,12 +730,14 @@ XMLParseAttQuote(XMLexer *lexer)
|
|||
char *code = NULL;
|
||||
int c2;
|
||||
int p2 = XMLInitialiseBuffer(lexer);
|
||||
while ((c2 = XMLGetc(lexer)) && c2 != EOF)
|
||||
int j = 0;
|
||||
while ((c2 = XMLGetc(lexer)) && c2 != EOF && j < 8)
|
||||
{
|
||||
if (c2 == ';')
|
||||
{
|
||||
break;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
if (c2 != ';')
|
||||
{
|
||||
|
|
@ -775,12 +777,14 @@ XMLParseAttDouble(XMLexer *lexer)
|
|||
char *code = NULL;
|
||||
int c2;
|
||||
int p2 = XMLInitialiseBuffer(lexer);
|
||||
while ((c2 = XMLGetc(lexer)) && c2 != EOF)
|
||||
int j = 0;
|
||||
while ((c2 = XMLGetc(lexer)) && c2 != EOF && j < 8)
|
||||
{
|
||||
if (c2 == ';')
|
||||
{
|
||||
break;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
if (c2 != ';')
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue