This commit is contained in:
Michael Becker 2023-02-17 17:43:59 -05:00
parent 1fe6d9be8d
commit 4d2a77cf10
No known key found for this signature in database
GPG Key ID: DA394832305DA332

View File

@ -155,14 +155,13 @@ namespace UniversalEditor.ObjectModels.Markup
{
for (int j = 0; j < tagTopLevel.Attributes.Count; j++)
{
if (tagTopLevel.Attributes[j].Namespace.Equals("xmlns"))
if (tagTopLevel.Attributes[j].Name.Equals("xmlns") && tagTopLevel.Attributes[j].Value.Equals(schema))
{
if (tagTopLevel.Attributes[j].Value.Equals(schema))
{
return tagTopLevel.Attributes[j].Name;
}
return String.Empty;
}
else if (tagTopLevel.Attributes[j].Namespace != null && tagTopLevel.Attributes[j].Namespace.Equals("xmlns") && tagTopLevel.Attributes[j].Value.Equals(schema))
{
return tagTopLevel.Attributes[j].Name;
}
}
}
@ -180,7 +179,15 @@ namespace UniversalEditor.ObjectModels.Markup
return null;
}
string fullName = tagPrefix + ":" + name;
string fullName = null;
if (String.IsNullOrEmpty(tagPrefix))
{
fullName = name;
}
else
{
fullName = tagPrefix + ":" + name;
}
return FindElement(fullName);
}