Home » Developer & Programmer » JDeveloper, Java & XML » FOR ORDINALITY Read order
FOR ORDINALITY Read order [message #653211] Wed, 29 June 2016 04:09 Go to previous message
pablolee
Messages: 2882
Registered: May 2007
Location: Scotland
Senior Member
Morning folks.

Given the below:
with t as (select xmltype('<ROOT>
                           <Name>
                                <FirstName>FLOKI</FirstName>
                                <LastName/>
                           </Name>
                           <Name>
                                <FirstName>RAGNAR</FirstName>
                                <LastName>LOTHBROK</LastName>
                           </Name>
                           <Name>
                                <FirstName>SIGURDUR</FirstName>
                                <LastName>JOHANSSEN</LastName>
                           </Name>
                           </ROOT>
                           ') xml from dual)
select x.nameid
     , x.lastname
     , x.firstname
from t
     , xmltable(xmlnamespaces('urn:oecd:ties:stffatcatypes:v1' as "n2")
                , 'ROOT/Name'
                 passing t.xml
                 columns
                   nameid for ordinality
                 , lastname      varchar2(50)    path '//LastName'
                 , firstname     varchar2(50)    path '//FirstName'
                 ) x;

Can I be assured that the nameid ordinality derivation will always be the same. i.e. it does not require any 'order by' code to ensure the order (as we would with sql extracting data from a table) , rather the order is effectively a 'read' order based on a top-down approach. And so assuming that the source xml remains the same the nameid values will remain the same for each time the code is executed.

I appreciate that I might not be entirely clear here so if any further info is required, please let me know.
 
Read Message
Read Message
Read Message
Previous Topic: How to download Plugins for offline installation for Firefox and Internet Explorer to run Fusion Middleware Forms 11g in client pc's not having Internet Access?
Next Topic: Load XML file using xmltype
Goto Forum:
  


Current Time: Thu Apr 25 10:11:34 CDT 2024