fix bug in validator XML parser

This commit is contained in:
Grahame Grieve 2020-06-09 17:22:03 +10:00
parent 6b7aa93dc7
commit 81ebd97599
1 changed files with 1 additions and 1 deletions

View File

@ -542,7 +542,7 @@ public class Element extends Base {
return null;
Element result = null;
for (Element child : children) {
if (child.getName().equals(name) || (child.getName().startsWith(name) && child.getProperty().getDefinition().isChoice())) {
if (child.getName().equals(name) || (child.getName().length() > child.fhirType().length() && child.getName().substring(0, child.getName().length() - child.fhirType().length()).equals(name) && child.getProperty().getDefinition().isChoice())) {
if (result == null)
result = child;
else