Oracle Solution for Error ora-19239

Solution for Oracle Error ORA-19239

ORA-19239: XPTY0019 - It is a type error if the result of an step (other than the last step) in a path expression contains an atomic value

What triggered the Error:

e step expression returned a sequence containing an atomic value.

What should we do to fix it:

x the path expression to return only nodes.