PL/SQL (MOSC)

MOSC Banner

Read XMLType values

edited Mar 13, 2018 2:18PM in PL/SQL (MOSC) 1 commentAnswered ✓

Hi All

Kindly, i am trying to get element value from xml but it's not working, below code is returning null, please help

it's working fine if the xml tags not contain s: & a: for example:

              <a:Warehouse whNo="100">

               <Building>Owned</Building>

               </a:Warehouse>

declare w XMLType; w2 varchar2(10000);begin  w := XMLType('<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">   <s:Body>      <GetOrdersResponse xmlns="http://www.extra.com/Services/Query">         <GetOrdersResult xmlns:a="http://schemas.datacontract.org/2004/07/eXtra.Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">            <a:Metadata>               <a:FaultCode>0</a:FaultCode>               <a:FaultDescription/>            </a:Metadata>            <a:Orders>               <a:Order>                  <a:BillDate>2018-03-10T23:00:47</a:BillDate>                  <a:BillingAddress>الزاهر , شارع الهجون , بجانب قصر الضيافة</a:BillingAddress>                  <a:CityId>8</a:CityId>                  <a:CityNameAr>مكة</a:CityNameAr>                  <a:CityNameEn>Mekkah</a:CityNameEn>                  <a:CollectorName>ماجد باقادر</a:CollectorName>                  <a:CountryId>1</a:CountryId>                  <a:CountryNameAr>السعودية</a:CountryNameAr>                  <a:CountryNameEn>Saudi</a:CountryNameEn>                  <a:CustomerId>1658882</a:CustomerId>                  <a:CustomerName>ماجد باقادر</a:CustomerName>                  <a:Date>2018-03-10T23:00:47</a:Date>                  <a:DeliveryTypeId>2</a:DeliveryTypeId>                  <a:DeliveryTypeNameAr>الإستلام من المعرض</a:DeliveryTypeNameAr>                  <a:DeliveryTypeNameEn>Collect from Store</a:DeliveryTypeNameEn>
Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center