summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1047e1d)
raw | patch | inline | side by side (parent: 1047e1d)
author | Florian Forster <octo@huhu.verplant.org> | |
Mon, 11 Jan 2010 15:52:25 +0000 (16:52 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Mon, 11 Jan 2010 15:52:25 +0000 (16:52 +0100) |
src/curl_xml.c | patch | blob | history |
diff --git a/src/curl_xml.c b/src/curl_xml.c
index 3b0a71a8c959f79dcc78551a41ebbea7d9b45ed8..74ef2e8e6afc2f289dfb5ffd02d553b4ecba5666 100644 (file)
--- a/src/curl_xml.c
+++ b/src/curl_xml.c
memset (vl->type_instance, 0, sizeof (vl->type_instance));
+ /* If the base xpath returns more than one block, the result is assumed to be
+ * a table. The `Instnce' option is not optional in this case. Check for the
+ * condition and inform the user. */
if (is_table && (vl->type_instance == NULL))
{
WARNING ("curl_xml plugin: "
- "Base-XPath %s is a table, but no instance-XPath has been defined.",
+ "Base-XPath %s is a table (more than one result was returned), "
+ "but no instance-XPath has been defined.",
xpath->path);
return (-1);
}
xpath_ctx->node = base_nodes->nodeTab[i];
status = cx_handle_instance_xpath (xpath_ctx, xpath, &vl,
- /* is_table = */ (total_nodes > 1)); /* FIXME */
+ /* is_table = */ (total_nodes > 1));
if (status != 0)
continue; /* An error has already been reported. */