We are using an Oracle 11g2 DB. We have some xml content in Long column/variable.
Can anyone help me out to read xml attribute value ?
eg.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE labels SYSTEM "label.dtd">
<labels _QUANTITY="1" _JOBNAME="LBL213685">
<label _FORMAT="XE_INSP_REQ_LBL.lwl">
<variable name= "L_DATE">04-JAN-2012</variable>
<variable name= "L_TIME">10:45:17</variable>
<variable name= "L_LPN">K01-4713BE</variable>
<variable name= "L_SUPPLIER">RECISION OIL, INC</variable>
</label>
</labels>
We want to read value next to <variable name= "L_LPN"> . Need to return K01-4713BE programatically.
Try this:
note that the xslprocessor.selectNodes function gets a XPath selector so you can select whatever you want