mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-20 07:21:35 +01:00
XPath plugin
This commit is contained in:
1 parent
5e75d8c9a7
commit
d6331022ad
15 files changed
+8542
-133
No files matched your search
@@ -0,0 +1,8 @@
|
||||
import xpath from 'xpath';
|
||||
import { DOMParser } from '@xmldom/xmldom';
|
||||
|
||||
export function pluginHookResponseFilter(filter, text) {
|
||||
const doc = new DOMParser().parseFromString(text, 'text/xml');
|
||||
const filtered = `${xpath.select(filter, doc)}`;
|
||||
return { filtered };
|
||||
}
|
||||
Reference in new issue
Block a user