I need some help in processing XML using XPATH in SPARK SQL. We have XML stored in a Database COLUMN. We need to process the XML and store it in a relational table.
Below is the sample SQL to read XML but it does not produce the desired results. I need all the nodes under <b>... should 3 rows.. not sure how to get the results... appreciate if someone can help
SELECT xpath_string('<a><b>b1</b><b>b2</b><b>b3</b><c>c1</c><c>c2</c></a>','/a/b');