2017-01-21 51 views
0

我有一个名为MSTCUSTOMERPROFILE的表有一个BLOB类型的列ROLELIST。现在,以XML格式如数据这个BLOB数据富人...从blob列中选择一个特定的字符串

<RoleListDTO> 
    <rolelist> 
    <RoleDTO> 
     <idEntity/> 
     <idEntityDesc/> 
     <userType>ECU</userType> 
     <userTypeDesc/> 
     <idRole>5</idRole> 
     <description>02A ENQUIRIES - ACCOUNT INFORMATION</description> 
     <idChannel>01</idChannel> 
     <idChannelDesc/> 
     <token/> 
     <datCreated/> 
     <createdBy/> 
     <datLastUpdated/> 
     <isDefaultRole>false</isDefaultRole> 
     <isDisplayCustProfile>false</isDisplayCustProfile> 
     <idcust/> 
     <typecust/> 
     <roleCreatebyUser> 
     <ListUserDTO> 
      <idEntity/> 
      <idEntityDesc/> 
      <userType/> 
      <userTypeDesc/> 
      <idChannel/> 
      <idChannelGroup/> 
      <idChannelDesc/> 
      <firstName/> 
      <lastName/> 
      <idChannelUser/> 
      <salutation/> 
      <idUser/> 
      <email/> 
      <isActive/> 
      <isProxyLocked/> 
      <isGroupFlag/> 
      <lockReason/> 
      <actDeactReason/> 
     </ListUserDTO> 
     </roleCreatebyUser> 
    </RoleDTO> 
    <RoleDTO> 
     <idEntity/> 
     <idEntityDesc/> 
     <userType>ECU</userType> 
     <userTypeDesc/> 
     <idRole>88</idRole> 
     <description>02C ENQUIRIES - CREDIT CARD DETAILS</description> 
     <idChannel>01</idChannel> 
     <idChannelDesc/> 
     <token/> 
     <datCreated/> 
     <createdBy/> 
     <datLastUpdated/> 
     <isDefaultRole>false</isDefaultRole> 
     <isDisplayCustProfile>false</isDisplayCustProfile> 
     <idcust/> 
     <typecust/> 
     <roleCreatebyUser> 
     <ListUserDTO> 
      <idEntity/> 
      <idEntityDesc/> 
      <userType/> 
      <userTypeDesc/> 
      <idChannel/> 
      <idChannelGroup/> 
      <idChannelDesc/> 
      <firstName/> 
      <lastName/> 
      <idChannelUser/> 
      <salutation/> 
      <idUser/> 
      <email/> 
      <isActive/> 
      <isProxyLocked/> 
      <isGroupFlag/> 
      <lockReason/> 
      <actDeactReason/> 
     </ListUserDTO> 
     </roleCreatebyUser> 
    </RoleDTO> 
    </rolelist> 
    <rmemail/> 
</RoleListDTO> 

我想在BLOB获取内部<idRole>标签的数据,在这种情况下,它是88即我想获取结果。

我需要通过选择查询来做到这一点,是否可以在Oracle数据库中使用?怎么样 ??

+0

没有人可以回答如果XML将不可读格式..请格式 – XING

+0

是的,你是对的。 –

回答

0

我有一个变通基本上我想基于这恰好是在XML中节点的值做一些逻辑在这个blob里面,想用java。所以我将java中的blob读入一个字节数组中,创建了一个DTO,一个java类,它具有与xml和其中的节点相同的细节和属性,并通过使用DTO解组逻辑,传递字节数组和全部来填充它。

所以基本上我做了一个解决方法,它不是我正在寻找的答案,但它的工作原理。

相关问题