Forums Register Login

How to get an XMLElement in resultset

+Pie Number of slices to send: Send
Hi ,

I have the following query

SELECT z.itr_sys_id,
(SELECT XMLElement("AMOUNT",XMLAgg(XMLElement("wmm_match_am", wmm_match_am)))
FROM wire_mti_match x
WHERE x.itr_sys_id = z.itr_sys_id
) AS Amount
FROM icms_transaction z


The result returned is as follows
--------------------------------------------------------------
156565 <AMOUNT><wmm_match_am>500</wmm_match_am><wmm_match_am>500</wmm_match_am><wmm_match_am>0</wmm_match_am></AMOUNT>


But when i do resultset.getString("Amount") , i get null
I am not able to read the result into an appropriate java object.

Could anyone help me with this please?

Thanks
+Pie Number of slices to send: Send
Try creating an alias for that XML column:

Then calling:
+Pie Number of slices to send: Send
Hey,

I have precisely done the same thing which you said. I also did some more research on this.

http://www.dbvis.com/forum/message.jspa?messageID=7512

You need to convert it to XMLType.

Unforunately this didnt work on Oracle10g .


Has someone tried the same on 10g?

Thanks
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2369 times.
Similar Threads
XMLDocument.selectNodes
Mock Answers
variations in generated classes
iBatis and Bidirectional Association
XSLT/XPath predicates: not(), =, !=
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:45:56.