// Build a map of elements using the selector as the key
do {
LiteralValue literal;
XmlObject obj = cursor.getObject();
if (obj instanceof SelStringType) {
SelStringType node = (SelStringType)obj;
literal = new DefaultLiteralValue(
node.getSelector(),
Collections.singletonList(node.getStringValue()),
false);
found = true;
} else if (obj instanceof SelComplexValueType) {
SelComplexValueType node = (SelComplexValueType)obj;
literal = new DefaultLiteralValue(
node.getSelector(),
node.getItemList(),
true);
found = true;
} else {
if (!found) {
continue;