Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Fetch multiple Attributes of XML in PL/SQL

T JJan 19 2018 — edited Jan 22 2018

Hi  All,

I wanted to fetch multiple attributes of XML used in Pl-Sql. Below is the XML I'm using. I wanted to capture all the data within the  UserArea tag and wanted to store in variable. please help me to achieve this or guide me so that I can proceed ahead.

<Confirmation revision="001" xmlns="http://www.abc.com">

     <App>

          <Send>

               <Value>50</Value>

               <Status>Completed</Status>

          </Send>

          <CreationDateTime>2017-06-13</CreationDateTime>

     </App>

     <Data>

          <Confirm/>

          <ID>

               <Header>

                    <AppArea>

                         <Send>

                              <Component>ABC</Component>

                         </Send>

                              <CreationDate>2017-06-15</CreationDate>

                              <BId></BId>

                         </AppArea>

                        

               </Header>

               <Line>

              

                    <TotalLines>2</TotalLines>

                    <UserArea>

                         <LineNumber>1</LineNumber>

                         <Attribute>

                              <Name>ABC</Name>

                              <Value>1</Value>

                         </Attribute>

                          <Attribute>

                              <Name>DEF</Name>

                              <Value>2</Value>

                         </Attribute>

                         <Attribute>

                              <Name>GHI</Name>

                              <Value>3</Value>

                         </Attribute>

                         <LineNumber>2</LineNumber>

                         <Attribute>

                              <Name>CBA</Name>

                              <Value>3</Value>

                          </Attribute>

                          <Attribute>

                              <Name>FED</Name>

                              <Value>2</Value>

                         </Attribute>

                         <Attribute>

                              <Name>IHG</Name>

                              <Value>1</Value>

                         </Attribute>

                    </UserArea>

               </Line>

          </ID>

     </Data>

</Confirmation>

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 19 2018
Added on Jan 19 2018
8 comments
4,242 views