We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5724ca3 commit 2ca3a1fCopy full SHA for 2ca3a1f
src/tools/xpath-tester/xpath-tester.vue
@@ -9,7 +9,8 @@ const xml = ref('<book><title>Harry Potter</title></book>');
9
const selectedNodes = computed(() => {
10
try {
11
const doc = new DOMParser().parseFromString(xml.value, 'text/xml');
12
- return XPathEngine.select(xpath.value, doc);
+ const result = XPathEngine.select(xpath.value, doc);
13
+ return Array.isArray(result) ? result : [result];
14
}
15
catch (e: any) {
16
return [e.toString()];
0 commit comments