我想帮助将复杂XML中的数据提取到oracle中的行中。 我尝试了extractvalue,但它给出了错误:
ora-31011 xml解析失败
xml处理中出现ora-19202错误
输出xml下面的:
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Body>
<GetEmploymentStatusMultipleResponse xmlns="http://MSB.Services.Integration.External.ServicesContracts.GOSI.IGOSIService">
<GetEmploymentStatusMultipleResult xmlns:b="http://MSB.Services.Integration.External.DataContracts.GOSI.MultipleEmploymentStatusStructure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<b:EmploymentStatusStructure xmlns:c="http://MSB.Services.Integration.External.DataContracts.GOSI.EmploymentStatusStructure">
<c:EmploymentStatusStructure>
<c:Contributor xmlns:d="http://MSB.Services.Integration.External.DataContracts.GOSI.ContributorStructure">
<d:ContributorID xmlns:e="http://MSB.Services.Integration.External.DataContracts.GOSI.NationalIdentifierSummaryStructure">
<e:NationalID>1086828181</e:NationalID>
</d:ContributorID>
</c:Contributor>
<c:ContributorName xmlns:d="http://MSB.Services.Integration.External.DataContracts.GOSI.PersonNameDetailsStructure">
<d:Item xmlns:e="http://MSB.Services.Integration.External.DataContracts.GOSI.PersonNameBodyStructure">
<e:Title i:nil="true" xmlns:f="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
<e:Prefix i:nil="true" xmlns:f="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
<e:FirstName>test1</e:FirstName>
<e:SecondName>test2</e:SecondName>
<e:ThirdName>test3</e:ThirdName>
<e:FourthName i:nil="true"/>
<e:LastName>test4</e:LastName>
<e:Suffix i:nil="true" xmlns:f="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
</d:Item>
<d:Language>AR</d:Language>
</c:ContributorName>
<c:ContributorStatus>2</c:ContributorStatus>
</c:EmploymentStatusStructure>
</b:EmploymentStatusStructure>
</GetEmploymentStatusMultipleResult>
</GetEmploymentStatusMultipleResponse>
</s:Body>
</s:Envelope>
答案 0 :(得分:-2)
使用Utl_file或 只是 选择to_char(dbms_xmlgen.getxml('select * from ur_table'))作为double的xml_data;