Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

CLOB with data in xml format - parse idea's

$
0
0
Hello All,

Just looking for some advice here.

I have a clob field that contains a string of XML Text. It appears to be just a dump of data
I need to parse certains elements of the string and store them in another field of the same table.

I don't really know what is the best approach here.
I was looking at CTE's . I see it can also be done in Java but was hoping to stay within what db2 has available as I am not a great coder.

Sample data from the field is
Quote:

<tns:dMSStatusMsg xmlns:p="http://www.tmdd.org/3/messages" xmlns:tns="http://www.tmdd.org/3/dialogs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.tmdd.org/3/dialogs ../Schema/eTMDD.xsd ">
<dms-status-item>
<DmsStatusHeader>
<DeviceId>1168</DeviceId>
<DeviceStatus>operational</DeviceStatus>
<DeviceUrl></DeviceUrl>
<LastCommTime>
<date>20130812</date>
<time>160317</time>
<offset>-0400</offset>
</LastCommTime>
</DmsStatusHeader>
<DmsDiagnosticMessage>local mode is False</DmsDiagnosticMessage>
<DmsCurrentMessage-Text>W1ROK.. Blank</DmsCurrentMessage-Text>
<DmsCurrentMessage-Name>W1ROK.. Blank</DmsCurrentMessage-Name>
<DmsCurrentMessage-ImageFormat>png</DmsCurrentMessage-ImageFormat>
<DmsMessageSourceMode>8</DmsMessageSourceMode>
</dms-status-item>
</tns:dMSStatusMsg>

I need information from <DmsDiagnosticMessage>

Viewing all articles
Browse latest Browse all 13329

Trending Articles