hello, i have an xml file stored in my database and i want to use sqls to access the nodes in the file. i need a sql that would give me the name of the children nodes given the parent, i found the following sql:
SELECT VALUE(P).GETCLOBVAL()
FROM "ODB"."TRAXDOC_DETAIL" w,
TABLE(XMLSEQUENCE(EXTRACT("XML_DOCUMENT", '/AMM/*'))) P
WHERE w."TRAXDOC_NO"= 11 and w."TRAXDOC_LINE" = 1 ;
this sql gives the contents of the children of amm, however i only want the name of the nodes not the actual xml text. is there anyway to rewrite the path to get only the name of the children nodes?
SELECT VALUE(P).GETCLOBVAL()
FROM "ODB"."TRAXDOC_DETAIL" w,
TABLE(XMLSEQUENCE(EXTRACT("XML_DOCUMENT", '/AMM/*'))) P
WHERE w."TRAXDOC_NO"= 11 and w."TRAXDOC_LINE" = 1 ;
this sql gives the contents of the children of amm, however i only want the name of the nodes not the actual xml text. is there anyway to rewrite the path to get only the name of the children nodes?