Open natlibfi-arlehiko opened 4 years ago
Some servers (such as https://services.dnb.de/sru/dnb) return XML without the ZS namespace. This breaks the library:
TypeError: Cannot read property 'zs:numberOfRecords' of undefined
at parsePayload /path/to/node_modules/.pnpm/@natlibfi+sru-client@4.1.0/node_modules/@natlibfi/sru-client/dist/index.js:170:83)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async processRequest (/path/to/node_modules/.pnpm/@natlibfi+sru-client@4.1.0/node_modules/@natlibfi/sru-client/dist/index.js:118:15)
at async iterate (/path/to/node_modules/.pnpm/@natlibfi+sru-client@4.1.0/node_modules/@natlibfi/sru-client/dist/index.js:93:9)
Currently the implementation supports only namespace prefix
zs
. Make the parsing understand any prefix.