santhosh-tekuri/jlibs

XMLDog only reports the first instance value for some xpaths

wayfarer3130 opened this issue · 2 comments

For a query like:
string(//child/@attr) only returns/notifies the first value on the instant notification setup.

as per xpath specification string function returns string value of first node in the location-path.

that is why you only get first value on the instant notification setup

if you use for-each extension to achieve what you wanted.

Expression expr := dog.addForEach("//child/@attr", "string(.)")

the above expression evaluates to set of strings, as you expected