1

If I use the following query, it shows ERROR: invalid XPath expression

The query is SELECT xpath('/foo/*/name()', '<foo><bar>test</bar></foo>')

I would get a list of node names.

0

1 Answer 1

3

I've found the answer: SELECT xpath('name()', unnest(xpath('/foo/*', '<foo><bar>test</bar><zar>test1</zar></foo>')))

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.