import org.opendaylight.yangtools.yang.model.api.SchemaNode;
import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
import org.opendaylight.yangtools.yang.model.api.type.IdentityrefTypeDefinition;
+import org.opendaylight.yangtools.yang.model.util.InstanceIdentifierType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Attr;
}
final TypeDefinition<?> baseType = XmlUtils.resolveBaseTypeFrom(schema.getType());
- if (baseType instanceof org.opendaylight.yangtools.yang.model.util.InstanceIdentifier) {
+ if (baseType instanceof InstanceIdentifierType) {
logger.debug("toSimpleNodeWithType: base type of node is instance identifier, deserializing element", xmlElement);
value = InstanceIdentifierForXmlCodec.deserialize(xmlElement,schemaCtx);
value = codec.deserialize(text);
}
- if (schema.getType() instanceof org.opendaylight.yangtools.yang.model.util.InstanceIdentifier) {
+ final TypeDefinition<?> baseType = XmlUtils.resolveBaseTypeFrom(schema.getType());
+ if (baseType instanceof InstanceIdentifierType) {
logger.debug("toSimpleNodeWithType: base type of node is instance identifier, deserializing element", xmlElement);
value = InstanceIdentifierForXmlCodec.deserialize(xmlElement,schemaCtx);
}