问题描述
您好。
我有一个表(在Oracle中),其列定义为CLOB并且包含一串XML数据。
我要做的是取这个字符串并搜索< OLD>和< NEW>字符串中的标签如下:
< CHG client =" c; GK" id =" c; 12345">< COL NAM =" this_col_one" TYP = QUOT; C">< OLD>旧值与LT; / OLD>< NEW>新建-值LT; / NEW>">< OLD>旧值与LT; / OLD>< NEW>新建-value< / NEW>< / COL> ...
有人可以建议如何分解这个XML字符串,以便我可以提取OLD和NEW值以及然后将这些输入到另一个表格中?
我开始阅读有关XPATH的内容,但希望有人可以放松学习并提供一些示例。
谢谢你的帮助。
M:o)
Hi there.
I have a table (in Oracle) with a column defined as a CLOB and which holds a string of XML data.
What I am looking to do is to take this string and search for the <OLD> and <NEW> tags in a string such as the following:
<CHG client="c;GK" id="c;12345"><COL NAM="this_col_one" TYP="c"><OLD>old-value</OLD><NEW>new-value</NEW>"><OLD>old-value</OLD><NEW>new-value</NEW></COL>...
Could somebody advise on how to break down this XML string please, so that I can extract the OLD and NEW values and then input these into another table?
I am starting to read about XPATH but hopefully somebody can ease the learning and offer some examples.
Thank you for your help.
M :o)
推荐答案
这篇关于如何从表中的XML字符串中提取详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!