X-Received: by 10.224.69.6 with SMTP id x6mr6467695qai.0.1375971442222;
        Thu, 08 Aug 2013 07:17:22 -0700 (PDT)
X-Received: by 10.49.24.132 with SMTP id u4mr234064qef.17.1375971442208; Thu,
 08 Aug 2013 07:17:22 -0700 (PDT)
Path: news.cambrium.nl!textnews.cambrium.nl!feeder2.cambriumusenet.nl!feeder1.cambriumusenet.nl!feed.tweaknews.nl!209.85.216.88.MISMATCH!fx3no1674706qab.0!news-out.google.com!he10ni877qab.0!nntp.google.com!fx3no1674705qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.databases.oracle.server
Date: Thu, 8 Aug 2013 07:17:22 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=208.65.116.5; posting-account=QIrL2QoAAADrbn6JOMuPXQbWYp5Y42ky
NNTP-Posting-Host: 208.65.116.5
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <69bb04a1-3a0a-4cd8-a6ca-758f0582d71a@googlegroups.com>
Subject: XMLTABLE
From: artmerar@gmail.com
Injection-Date: Thu, 08 Aug 2013 14:17:22 +0000
Content-Type: text/plain; charset=ISO-8859-1
Xref:  news.cambrium.nl

Hi,

I have some XML stored in a PLSQL variable of XMLType:

      <DescriptiveMetadata>
        <Language FormalName="en"/>
        <Property FormalName="PublicCompany" Vocabulary="urn:newsml:comtexnews.net:20010201:DomesticPublicCompanies:1">
          <Property FormalName="CompanyName" Value="Stanley Black &amp; Decker"/>
          <Property FormalName="StockSymbol" Value="SWK"/>
          <Property FormalName="StockExchange" Value="New York"/>
          <Property FormalName="SICCode" Value="3545"/>
          <Property FormalName="CUSIP" Value="854101"/>
          <Property FormalName="SEDOL" Value="B3Q2FJ4"/>
          <Property FormalName="ISINNumber" Value="US85021011"/>
          <Property FormalName="MarketStatus" Value="ACTV"/>
          <Property FormalName="SecurityType" Value="Common Stock"/>
          <Property FormalName="Country" Value="UNITED STATES"/>
          <Property FormalName="IndustryGroup" Value="Hand/Machine Tools"/>
          <Property FormalName="IndustrySubGroup" Value="Tools-Hand Held"/>
          <Property FormalName="IndustrySector" Value="Industrial"/>
        </Property>
      </DescriptiveMetadata>

I am looking to get the StockSymbol value:  SWK.  I tried this but it gets me everything:

EXTRACT('/NewsML/NewsItem/NewsComponent/DescriptiveMetadata/Property/Property/@Value').getstringval();

I only want to get it when the FormalName = 'StockSymbol'.   I'm doing this in PL/SQL.   I'm having trouble getting any code to work on extracting the value I want.

Can anyone help?

Thanks!

