diff --git a/src/parser_common.c b/src/parser_common.c
index bdc8529..ef67a8c 100644
--- a/src/parser_common.c
+++ b/src/parser_common.c
@@ -304,6 +304,8 @@
         const char *name, size_t name_len, const void *value, size_t value_len, ly_bool *dynamic, LY_VALUE_FORMAT format,
         void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node)
 {
+    LY_ERR rc = LY_SUCCESS;
+    char *dpath = NULL, *path = NULL;
     ly_bool incomplete;
     struct lyd_meta *first = NULL;
 
@@ -312,11 +314,20 @@
         first = *meta;
     }
 
-    LY_CHECK_RET(lyd_create_meta(parent, meta, mod, name, name_len, value, value_len, dynamic, format, prefix_data,
-            hints, ctx_node, 0, &incomplete));
+    /* generate path to the metadata */
+    LY_CHECK_RET(ly_vlog_build_data_path(lydctx->data_ctx->ctx, &dpath));
+    if (asprintf(&path, "%s/@%s:%.*s", dpath, mod->name, (int)name_len, name) == -1) {
+        LOGMEM(lydctx->data_ctx->ctx);
+        rc = LY_EMEM;
+        goto cleanup;
+    }
+    LOG_LOCSET(NULL, NULL, path, NULL);
+
+    LY_CHECK_GOTO(rc = lyd_create_meta(parent, meta, mod, name, name_len, value, value_len, dynamic, format, prefix_data,
+            hints, ctx_node, 0, &incomplete), cleanup);
 
     if (incomplete && !(lydctx->parse_opts & LYD_PARSE_ONLY)) {
-        LY_CHECK_RET(ly_set_add(&lydctx->meta_types, *meta, 1, NULL));
+        LY_CHECK_GOTO(rc = ly_set_add(&lydctx->meta_types, *meta, 1, NULL), cleanup);
     }
 
     if (first) {
@@ -324,7 +335,11 @@
         *meta = first;
     }
 
-    return LY_SUCCESS;
+cleanup:
+    LOG_LOCBACK(0, 0, 1, 0);
+    free(dpath);
+    free(path);
+    return rc;
 }
 
 LY_ERR
diff --git a/tests/utests/data/test_parser_json.c b/tests/utests/data/test_parser_json.c
index 37d9d43..8feed9c 100644
--- a/tests/utests/data/test_parser_json.c
+++ b/tests/utests/data/test_parser_json.c
@@ -47,7 +47,8 @@
             "leaf foo3 { type uint32; }"
             "leaf foo4 { type uint64; }"
             "rpc r1 {input {leaf l1 {type string;} leaf l2 {type string;}}}"
-            "notification n2;}";
+            "notification n2;"
+            "}";
 
     UTEST_SETUP;
 
@@ -163,7 +164,7 @@
     /* reverse solidus in JSON object member name */
     data = "{\"@a:foo\":{\"a:hi\\nt\":1},\"a:foo\":\"xxx\"}";
     assert_int_equal(LY_EINVAL, lyd_parse_data_mem(UTEST_LYCTX, data, LYD_JSON, 0, LYD_VALIDATE_PRESENT, &tree));
-    CHECK_LOG_CTX("Annotation definition for attribute \"a:hi\nt\" not found.", "Data location \"/@a:foo\", line number 1.");
+    CHECK_LOG_CTX("Annotation definition for attribute \"a:hi\nt\" not found.", "Path \"/@a:foo/@a:hi\nt\", line number 1.");
 }
 
 static void
@@ -900,6 +901,19 @@
     lyd_free_all(envp);
 }
 
+static void
+test_metadata(void **state)
+{
+    const char *data;
+    struct lyd_node *tree;
+
+    /* invalid metadata value */
+    data = "{\"a:c\":{\"x\":\"xval\",\"@x\":{\"a:hint\":\"value\"}}}";
+    assert_int_equal(LY_EVALID, lyd_parse_data_mem(_UC->ctx, data, LYD_JSON, 0, LYD_VALIDATE_PRESENT, &tree));
+    assert_null(tree);
+    CHECK_LOG_CTX("Invalid non-number-encoded int8 value \"value\".", "Path \"/a:c/x/@a:hint\", line number 1.");
+}
+
 int
 main(void)
 {
@@ -918,6 +932,7 @@
         UTEST(test_restconf_rpc, setup),
         UTEST(test_restconf_notification, setup),
         UTEST(test_restconf_reply, setup),
+        UTEST(test_metadata, setup),
     };
 
     return cmocka_run_group_tests(tests, NULL, NULL);
diff --git a/tests/utests/data/test_parser_xml.c b/tests/utests/data/test_parser_xml.c
index a2cd30f..d651253 100644
--- a/tests/utests/data/test_parser_xml.c
+++ b/tests/utests/data/test_parser_xml.c
@@ -31,6 +31,7 @@
             "    namespace urn:tests:a;\n"
             "    prefix a;\n"
             "    yang-version 1.1;\n"
+            "    import ietf-yang-metadata {prefix md;}"
             "    list l1 { key \"a b c\"; leaf a {type string;} leaf b {type string;} leaf c {type int16;}"
             "        leaf d {type string;}"
             "        container cont {leaf e {type boolean;}}"
@@ -45,7 +46,9 @@
             "    anyxml anyx;\n"
             "    leaf foo2 { type string; default \"default-val\"; }\n"
             "    leaf foo3 { type uint32; }\n"
-            "    notification n2;}";
+            "    notification n2;"
+            "    md:annotation attr {type enumeration {enum val;}}"
+            "}";
 
     UTEST_SETUP;
 
@@ -655,7 +658,7 @@
     assert_int_equal(LY_EVALID, lyd_parse_op(UTEST_LYCTX, NULL, in, LYD_XML, LYD_TYPE_RPC_NETCONF, &tree, &op));
     ly_in_free(in, 0);
     CHECK_LOG_CTX("Invalid enumeration value \"merge2\".",
-            "Data location \"/ietf-netconf:copy-config/source/config/a:l1[a='val_a'][b='val_b'][c='5']/cont/e\", line number 13.");
+            "Path \"/ietf-netconf:copy-config/source/config/a:l1[a='val_a'][b='val_b'][c='5']/cont/e/@ietf-netconf:operation\", line number 13.");
     lyd_free_all(tree);
     assert_null(op);
 }
@@ -961,6 +964,19 @@
     lyd_free_all(tree);
 }
 
+static void
+test_metadata(void **state)
+{
+    const char *data;
+    struct lyd_node *tree;
+
+    /* invalid metadata value */
+    data = "<c xmlns=\"urn:tests:a\" xmlns:a=\"urn:tests:a\"><x a:attr=\"value\">xval</x></c>";
+    assert_int_equal(LY_EVALID, lyd_parse_data_mem(_UC->ctx, data, LYD_XML, 0, LYD_VALIDATE_PRESENT, &tree));
+    assert_null(tree);
+    CHECK_LOG_CTX("Invalid enumeration value \"value\".", "Path \"/a:c/x/@a:attr\", line number 1.");
+}
+
 int
 main(void)
 {
@@ -982,6 +998,7 @@
         UTEST(test_restconf_reply, setup),
         UTEST(test_filter_attributes, setup),
         UTEST(test_data_skip, setup),
+        UTEST(test_metadata, setup),
     };
 
     return cmocka_run_group_tests(tests, NULL, NULL);
