Submit values and retrieve responses from xml api

I use this code to submit to an api
<cfhttp url="<api url>" method="GET" resolveurl="No" ></cfhttp>
I get back

<VerifySignatureResponse>
−<VerifySignatureResult>
<VerificationStatus>Success</VerificationStatus>
</VerifySignatureResult>
</VerifySignatureResponse>
How do I retrieve the response? I ned to get back the Success for the VerificationStatus parameter

this works for me
<cfhttp url="<api url>" method="GET" resolveurl="No" ></cfhttp>
<cfset mydoc = XmlParse(CFHTTP.FileContent)>
<cfset pb = mydoc.variable1.XmlChildren>
<cfset size = ArrayLen(pb)>
<cfset myquery = QueryNew("variable1,variable2, variable3")>
<cfset temp = QueryAddRow(myquery, #size#)>
<cfset temp = QuerySetCell(myquery, "variable3", #mydoc.variable3.XmlText#)>
<cfif #mydoc.variable1.variable2.variable3.XmlText# eq "Success">
Action
</cfif>
You apparently didn't take the hint, Ian's or mine. What you've done may be correct, it unnecessarily involves too many functions. You could really do it more efficiently, like this
<cfxml variable="xmlString"><cfoutput>#cfhttp.FileContent#</cfoutput></cfxml>
<cfset statusArray=xmlSearch(xmlString,"//VerificationStatus")>
<cfif statusArray[1].xmlText eq "Success">
Action
</cfif>

Similar Messages

  • How to parse and retrieve records from xml files into columns in Table

    Hi
    I attached the thing what i tried.
    Table to hold the XML COntent:
    create table xmlfile(xml_con sys.xmltype);
    Inserting Xml file content into the Above table:
    insert into xmlfile values(sys.xmltype.CreateXml('<Root><name>RAM</name><age>23</age></Root>'))
    SQL> select * from xmlfile;
    XML_CON
    <Root>
    <name>RAM</name>
    <age>23</age>
    </Root>
    SQL> select extractValue(xml_con, '/Root/name') content from xmlfile;
    CONTENT
    RAM
    This one works fine
    But if the file content is as below( contains MUltiple Records)
    insert into xmlfile values(sys.xmltype.CreateXml('<Root><Record><name>RAM</name><age>23</age></Record><Record><name>SAM</name><age>23</age></Record></Root>'))
    SQL> select extractValue(xml_con, '/Root/Record/name') content from xmlfile;
    ERROR at line 1:
    ORA-19025: EXTRACTVALUE returns value of only one node
    Can anyone help me 4 this issue-How to extract multiple records from the XML file inthis manner(from PL/SQL without using JAVA)
    OR
    If there is anyother way to do this please tell me?

    SQL> SELECT EXTRACTVALUE (COLUMN_VALUE, '//name') NAME,
           EXTRACTVALUE (COLUMN_VALUE, '//age') age
      FROM TABLE
              (XMLSEQUENCE
                  (EXTRACT
                      (XMLTYPE
                          ('<Root>
                              <Record>
                                <name>RAM</name>
                                <age>23</age>
                              </Record>
                              <Record>
                                <name>SAM</name>
                                <age>23</age>
                              </Record>
                            </Root>'
                       '/Root/Record'
    NAME       AGE      
    RAM        23       
    SAM        23       
    2 rows selected.

  • I have a windows 7 desktop with an external hard drive setup on my home network, will i be able to access this on my home network to save and retrieve files from my mac air?

    i have a windows 7 desktop with an external hard drive setup on my home network, will i be able to access this on my home network to save and retrieve files from my mac air?

    Troubleshooting Home Sharing - http://support.apple.com/kb/TS2972

  • WPF- How to save and retrieve details from database

    I want to develop an desktop app to save and retrieve details from database, but am having a little hitch
    am getting errors in my code, kindly advice below are the required code
    xaml
    <Grid>
            <TextBox HorizontalAlignment="Left" Height="23" Margin="144,28,0,0" TextWrapping="Wrap" x:Name="TbxId" VerticalAlignment="Top" Width="193"/>
            <TextBox HorizontalAlignment="Left" Height="23" Margin="144,134,0,0" TextWrapping="Wrap" x:Name="TbxFn" VerticalAlignment="Top" Width="193"/>
            <TextBox HorizontalAlignment="Left" Height="23" Margin="144,77,0,0" TextWrapping="Wrap" x:Name="TbxLn" VerticalAlignment="Top" Width="193"/>
            <Label Content="Student ID" HorizontalAlignment="Left" Margin="10,28,0,0" VerticalAlignment="Top" Width="101"/>
            <Label Content="Last Name" HorizontalAlignment="Left" Margin="10,134,0,0" VerticalAlignment="Top" Width="101"/>
            <Label Content="First Name" HorizontalAlignment="Left" Margin="10,77,0,0" VerticalAlignment="Top" Width="101"/>
            <Button x:Name="BtnSave" Content="Save" HorizontalAlignment="Left" Margin="23,206,0,0" VerticalAlignment="Top" Width="75" />
            <Button x:Name="BtnBrowse" Content="Browse" HorizontalAlignment="Left" Margin="149,206,0,0" VerticalAlignment="Top" Width="75" Click="Save"/>
            <Button x:Name="BtnShow" Content="Show" HorizontalAlignment="Left" Margin="294,206,0,0" VerticalAlignment="Top" Width="75"/>
            <WindowsFormsHost Grid.Column="0" Margin="448,28,75,243">
                <wf:PictureBox x:Name="pictureBox1" Height="150" Width="150" SizeMode="StretchImage"/>
            </WindowsFormsHost>
        </Grid>
    cs
    private void Browse(object sender, RoutedEventArgs e)
                SqlConnection cn = SqlConnection(global::DatabaseApp.Properties.Settings.Default.Database1ConnectionString);
                try
                    OpenFileDialog dlg = new OpenFileDialog();
                    dlg.Filter = "JPG Files (*.jpg)|*.jpg|GIF Files (*.gif)|*.gif|All Files(*.*)|*.*";
                    dlg.Title = "Select Student Picture";
                    if (dlg.ShowDialog() == DialogResult.OK)
                        imgLoc = dlg.FileName.ToString();
                        picStu.ImageLocation = imgLoc;
                catch(Exception ex)
                    System.Windows.MessageBox.Show(ex.Message);
    Thank you
    Jayjay john

    Hi Joakins,
    I think Lloyd has a point here in that all I see there which is really database related is a connection string.
    Maybe your question is more general though and you're just asking how to work with a database as a general principle.
    Personally, I like entity framework and would recommend that.
    You can read a shed load of stuff about it.
    https://msdn.microsoft.com/en-gb/data/ef.aspx?f=255&MSPPError=-2147217396
    With WPF almost every dev uses MVVM and I'm no exception.
    You may find this interesting:
    http://social.technet.microsoft.com/wiki/contents/articles/28209.wpf-entity-framework-mvvm-walk-through-1.aspx
    The article for the second in the series is only partly written, but the sample is complete:
    https://gallery.technet.microsoft.com/WPF-Entity-Framework-MVVM-78cdc204
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • XML DevCon 2001: Submit schema and stylesheet problems- win XML Spy

    There are only a few days to submit schema and stylesheet problems for XML
    DevCon 2001 in London. If the workshop instructors use your submission
    during the conference, you win a copy of XML Spy.
    <shamelessPlug>
    XML DevCon 2001 has a content-rich technical program with a faculty that
    includes Henry Thompson (W3C Fellow), Peter Chen (IEEE Fellow, ACM
    Fellow),
    Martin Bryan (DIFFUSE Project), and authors such as Bob DuCharme, Ian
    Graham, Elliotte Rusty Harold, G. Ken Holman, Benoît Marchal, JP
    Morgenthal,
    and Simon St. Laurent. There are a variety of eBusiness sessions,
    including
    panel discussions and presentations about ebXML, Web Services, and UDDI.
    The program includes presentations by Jonathan Borden, Ron Bourret, Lee
    Buck, Alex Chaffee, Mark Colan, John Evdemon, Meike Klettke, Andy
    Longshaw,
    Ingo Macherius, Simon Nicholson, David Orchard, Sebastian Rahtz, Daniel
    Rivers-Moore, Michael Rys, Krishna Sankar, Matt Sergeant, Richard Tobin,
    Priscilla Walmsley, David RR Webber and other distinguished faculty.
    </shamelessPlug>
    http://www.xmldevcon2001.com/London/html/conference.php
    For a free pass to exhibits and special events (keynotes, joint XML UK and
    British Computer Society meeting, OASIS XPath/XSLT meeting, vendor
    presentations):
    http://www.xmldevcon2001.com/London/html/special_events.php
    Public submissions (schemas and stylesheets)
    Three members of the W3C Schema Working Group (Michael Rys, Henry
    Thompson, Priscilla Walmsley) will teach a Schema Workshop. Submit
    problem schemas to them by e-mail:
    [email protected]
    or
    http://www.xmldevcon2001.com/London/html/session.php?code=W5
    Sebastian Rahtz, Bob DuCharme, Benoît Marchal, and Ken Holman will
    present the "Stylesheets and Transformations: Best Practices" workshop on
    Thursday, February 22 in London. To submit a stylesheet or problem
    description for their workshop:
    [email protected]
    or browse to:
    http://www.xmldevcon2001.com/London/html/session.php?code=T17
    ========== Ken North ======================
    See you at Javacon 2001 (New York, March 1)
    www.javacon2001.com
    XML DevCon 2001: London (February 21-23) New York (April 8-11)
    www.xmldevcon2001.com
    =======================================

    Looks okay to me. But then I have no idea of what those "problems" are that you mentioned. Was there a particular reason you didn't tell us what they are?

  • How to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 using ftp

    how to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 device using ftp through Ethernet

    Hello
    For using FTP function in LabVIEW, I recommend you to check this document: FTP Basics
    Also, take a look at FTP Browser.vi, which is available at the Example Finder.
    To edit a XML file, try to use VIs in XML palette. Maybe Write to XML.vi helps you.
    Post your current VI if possible.
    Regards
    Mondoni

  • Exception when connecting to Reporting and Analysis services from Java API

    Hello,
    I'm trying to connect to Hyperion Reporting and Analysis services from Java API using [Developer's guide|http://www.bidw.in/docs/hs_developer.pdf] .
    I get this error:
    com.sqribe.rm.ReportMartException: com/hyperion/css/CSSException
         at com.sqribe.rm.SessionImpl.convertError(Unknown Source)
         at com.sqribe.rm.AASessionImpl.open(Unknown Source)
         at com.sqribe.rm.AASessionImpl.internalInit(Unknown Source)
         at com.sqribe.rm.AASessionImpl.<init>(Unknown Source)
         at com.sqribe.rm.SessionFactory.getInstance(Unknown Source)
         ...My code:
    String user = "user";
    String pwd = "password";
    String host = "my.hyperion.server";
    int port = 6800;
    try {
         Session theSession = SessionFactory.getInstance(user, pwd, host, port);
         Repository theRepository = theSession.getRepository();
    } catch (UserValidationException e) {
         e.printStackTrace();
    } catch (UnknownReportMartException e) {
         e.printStackTrace();
    } catch (ReportMartException e) {
         e.printStackTrace();
    }I have tried to look at my services running, and it all looks OK. I've checked user/passowrd/port for GSM. What can be wrong?
    I also tried to run samples from \BIPlus\SDK\samples\java, e.g. Login.java:
    #> java Login user password my.hyperion.server 6800with this effect
    com.sqribe.rm.ReportMartException: SystemExceptionError
            at com.sqribe.rm.SessionImpl.convertError(Unknown Source)
            at com.sqribe.rm.AASessionImpl.open(Unknown Source)
            at com.sqribe.rm.AASessionImpl.internalInit(Unknown Source)
            at com.sqribe.rm.AASessionImpl.<init>(Unknown Source)
            at com.sqribe.rm.SessionFactory.getInstance(Unknown Source)
            at Login.<init>(Login.java:36)
            at Login.main(Login.java:69)I'm sure that I'm connecting to the server because when put wrong passowrd or user as input to Login class I get this:
    com.sqribe.rm.ReportMartException: AUTHEN_CSSLoginFailed
            at com.sqribe.rm.SessionImpl.convertError(Unknown Source)
            at com.sqribe.rm.AASessionImpl.open(Unknown Source)
            at com.sqribe.rm.AASessionImpl.internalInit(Unknown Source)
            at com.sqribe.rm.AASessionImpl.<init>(Unknown Source)
            at com.sqribe.rm.SessionFactory.getInstance(Unknown Source)
            at Login.<init>(Login.java:36)
            at Login.main(Login.java:69)so it is there but something is wrong later. Any idea what?
    Please help.
    regards,
    Pawel
    Edited by: Paoro on 2010-09-27 02:02

    HI,
    I am getting the same error while running the Login file, Did any one resolve this issue?
    Please share the solution.
    Thanks.

  • How to create a VI that detects and records responses from user

    Does anyone has experience in creating a VI that allows the user to e.g., watch a video or series of images, pause or rewind video etc. and the VI records the duration of all pauses or user responses.

    avenue wrote:
    How to create a VI that detects and records responses from user
    You definitely need to check what 'EVENT STRUCTURE' is and how to use it... because thats needed to write such code.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • I want to store and retrieve images from a oracle datrabase's BLOB type

    Hi all
    I am using WebLogic and Oracle 10g.I have to store images and retrieve them from a BLOB type.
    Please help .

    Please have a look to the Database Application Developer's Guide - Large Objects
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14249/toc.htm

  • Retrieving data from XML containing namespaces?

    Hi,
    I am using Yahoo Local Search Service which returns the XML
    response. I want to retrieve data from the XML that I received. I
    stuck at this point and unable to retrieve the response in to
    datagrid. Does the namespaces in XML matter while retrieving data?
    The response XML is as follows
    <ResultSet xsi:schemaLocation="urn:yahoo:lcl
    http://api.local.yahoo.com/LocalSearchService/V3/LocalSearchResponse.xsd"
    totalResultsAvailable="224" totalResultsReturned="1"
    firstResultPosition="1" xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance"
    xmlns="urn:yahoo:lcl">
    <ResultSetMapUrl>
    http://maps.yahoo.com/broadband/?q1=San+Jose%2C+CA+95112&amp;tt=starbucks&amp;tp=1</Result SetMapUrl>
    <Result id="21590724">
    <Title>Starbucks</Title>
    <Address>145 W Santa Clara St</Address>
    <City>San Jose</City>
    <State>CA</State>
    <Phone>(408) 288-8803</Phone>
    <Latitude>37.335236</Latitude>
    <Longitude>-121.892765</Longitude>
    <Rating>
    <AverageRating>4</AverageRating>
    <TotalRatings>3</TotalRatings>
    <TotalReviews>2</TotalReviews>
    <LastReviewDate>1198029377</LastReviewDate>
    <LastReviewIntro>My previous review had incorrect
    data. That was not true, I am sorry, I didn't know. As far as food
    and drink goes, Starbucks is pretty good.</LastReviewIntro>
    </Rating>
    <Distance>0.96</Distance>
    <Url>
    http://local.yahoo.com/info-21590724-starbucks-san-jose</Url>
    <ClickUrl>
    http://local.yahoo.com/info-21590724-starbucks-san-jose</ClickUrl>
    <MapUrl>
    http://maps.yahoo.com/maps_result?q1=145+W+Santa+Clara+St+San+Jose+CA&amp;gid1=21590724</M apUrl>
    <BusinessUrl>
    http://www.starbucks.com/</BusinessUrl>
    <BusinessClickUrl>
    http://www.starbucks.com/</BusinessClickUrl>
    <Categories>
    <Category id="96926219">Cafes</Category>
    <Category id="96926236">Restaurants</Category>
    <Category id="96926169">Coffee Houses</Category>
    </Categories>
    </Result>
    </ResultSet>
    The code that I am writing to get Title and Address is as
    follows.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="vertical"
    backgroundAlpha="0" backgroundColor="#FFFFFF">
    <mx:HTTPService
    id="weatherService"
    url="
    http://local.yahooapis.com/LocalSearchService/V3/localSearch"
    resultFormat="e4x"
    result="resultHandler(event);"/>
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var myResult:XML ;
    private var temp:XMLNode;
    private var list:ArrayCollection;
    public function requestWeather():void {
    weatherService.cancel();
    var params:Object = new Object();
    params.appid = "YahooDemo";
    params.query = "starbucks";
    params.zip = "95112";
    params.results = "1"
    weatherService.send(params);
    public function resultHandler(event:ResultEvent):void {
    myResult = XML( event.result);
    temp = myResult.Result;
    list = ArrayCollection(event.result);
    ]]>
    </mx:Script>
    <mx:Form width="400">
    <mx:FormItem label="Get Local Data">
    <mx:Button label="Get Data"
    click="requestWeather();"/>
    </mx:FormItem>
    <mx:FormItem label="Address">
    <mx:Text text="{myResult.Result.Address}"/>
    </mx:FormItem>
    <mx:FormItem label="Title">
    <mx:Text text="{myResult.Result.Title}"/>
    </mx:FormItem>
    </mx:Form>
    <mx:DataGrid
    dataProvider="{myResult.Result}"
    x="80" y="141" width="262" height="92"
    id="shippingOptionsList" editable="false" enabled="true">
    <mx:columns>
    <mx:DataGridColumn headerText="Title" dataField="Title"
    />
    <mx:DataGridColumn headerText="Address"
    dataField="Address" />
    </mx:columns>
    </mx:DataGrid>
    <mx:Label text="Response as it is"/>
    <mx:TextArea id="resultFld" text="{myResult}" width="400"
    height="152"/>
    </mx:Application>
    Can somebody help me to find where I am going wrong?
    Thank you
    -Pranay

    Hi Pranay,
    It looks like your problem is indeed to do with the XML
    namespace being used.
    Try adding this line after the import statements:
    namespace yahoo = "urn:yahoo:lcl";
    (This is the namespace URI defined in the returned XML)
    The result handler should then look like this:
    public function resultHandler(event:ResultEvent):void {
    use namespace yahoo;
    myResult = XML( event.result);
    temp = myResult.Result;
    list = ArrayCollection(event.result);

  • How to retrieve image from XML  file

    Hi All,
    I am new to XML. So any best guidance is appreciated.
    The application requirement is to display image retrived from uploaded xml file in file upload section of our application. And store that image in database.
    In my XML file , images & strings & numbers & booleans are there . I am able to save everything in database except images .
    I am using JSF, Seam & Hibernate combination. In my Hibernate entity class i took BLOB datatype for image.
    I am using following tags in my Xhtml file to display image
    <s:graphicImage value="#{hibernateentitybean.picBlobtype}" height="200" width="200">
    <s:transformImageSize width="200" height="200" />
    <s:transformImageType contentType="image/jpeg"/>
    But image is not displayed in Xhtml file
    I am using org.w3c.dom.Document for retrieving node name & corresponding value in that node in XML file.
    I am getting code like below for Image when i am logging all values from XML files in my bean class .
    x0lGQRQAAAABAAAAAAAAAFJHAQARAAAAVwBhAHQAZQByACAAbABpAGwAaQBlAHMALgBqAHAAZwAAAP/Y/+AAEEpGSUYAAQIBAGAAYAAA/+0YLl
    I want to convert this value to image. So i can convert image to bytes and store in BLOB.
    Can anyone guide me ? or any other approach .
    Thanks in advance for any reply.
    Regards,
    Naresh

    Dan_Koldyr wrote:
    agree, it's really odd. Just reread OP and it says:
    NareshDharmiVatsal  wrote:
    want to convert this value to image. In any case it doesn't get worth then another single code line:
    final String cdata = "x0lGQRQAAAABAAAAAAAAAFJHAQARAAAAVwBhAHQAZQByACAAbABpAGwAaQBlAHMALgBqAHAAZwAAAP/Y/+AAEEpGSUYAAQIBAGAAYAAA/+0YLl";
    final sun.misc.BASE64Decoder decoder = new sun.misc.BASE64Decoder();
    final byte[] data = decoder.decodeBuffer(cdata);
    Blob blob = new SerialBlob(data);//or what ever other DB-specific blob implementaiton Did i answered original question? Any more comments to my first replay?I can comment on this latest code. The package sun.misc is private to Sun (Oracle now of course). It is undocumented and may change or be removed altogether in a future release. There is a good free open source Base64 decoder in the Jakarta Commons Codec library.

  • Retrieve data from xml attributes

    Hi
    I used oracle xml function to query the database and return the following xml data.
    <Item    item1="1000"  item2="A"  item3="B"  />Now i would like to extract the value of item1 attribute from the above xml data. I am not sure how to retrieve the attribute data directly from this root element "Item". Any suggestion is highly appreciated.

    I resolved it myself .
    Thanks.

  • Retrieve data from XML

    Hello,
       I am new to this forum.  I have an XMl document as below:
    <gallery>
                <image>
                <title>pic1</title>
                <text> txt1 <text>
               </image>
              <image>
                <title>pic2</title>
                 <text> txt2 <text>
               </image>
    </gallery>
    I want to fetch the value of "text" node and print it.Can anyone help?
    -Akshay

    Hello,
        Thanks for your reply.
         I need to retireve the image soruce and image text dynamically from xml. For that I am trying to read the XML using Http Request and then in result handler I am getting it in Array Collection: but afterwards I am strugelling to get individual element from array collection: here's my code:
    <![CDATA[
                 import mx.collections.ArrayCollection;
                 import mx.rpc.events.FaultEvent;
                 import mx.rpc.events.ResultEvent;
                 [Bindable]
                 public var galleryData:ArrayCollection;
                 protected function  resultHandler(event:ResultEvent):void
                     //getting XML in array collection
                       galleryData = event.result.gallery.images;
                   //tried getItemAt (index) but it's not working not sure how to progress further
                 // fault event handler for employeeService HTTPService call
                 private function faultHandler(event:FaultEvent):void {
                     // Add code here for what to do when there is an error  retrieving data
             ]]>
        </fx:Script>
    <fx:Declarations>   
         <mx:HTTPService id="galleryService"
                         url="data/gallery.xml"
                         result="resultHandler(event)"
                         fault="faultHandler(event)"/>
    </fx:Declarations>  
    and I am  struggeling to get individual values from that array collection. tried getItemAt (index) but it's not working not sure how to progress  further
    -Akshay

  • How to retrieve data from XML

    I have a scenario where I need to read data from database of xmltype (data type)
    Table Structure :
    Create table Ex_Tb (id number(30),emp_data XMLType );
    I can save xml content in database,
    Sample
    insert into Ex_Tb values( 1, xmltype ('<?xml version="1.0" encoding="UTF-8" ?><userdata><uniqueid>54321</uniqueid><name>moorthi</name><age>25</age><city>Chennai</city></userdata>'));
    Data inserted .
    When retrieved from DB I see the data in the generated BO as given below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <ExteOutputCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/pcbpel/adapter/db/Exte file:/C:/JDeveloper/mywork/Application1/Project1/xsd/Exte.xsd" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/Exte">
    <ExteOutput>
    <SDD_XML_REQ_DATA_GETCLOBVAL__><?xml version="1.0" encoding="UTF-8" ?><userdata><uniqueid>54321</uniqueid><name>moorthi</name><age>25</age><city>Chennai</city></userdata></SDD_XML_REQ_DATA_GETCLOBVAL__>
    </ExteOutput>
    </ExteOutputCollection>
    My Question :
    1. How to retrive values of individual tags contained within the embedded XML so that it can be mapped to a BO?
    Basically I would like to map uniqueId, name,age,city from xml to a BO.
    Rgds,
    Krishna

    Hi Krishna,
    I'm not sure but are you selecting the data from the XMLType column as given in the section Using XMLType in an SQL Statement in the below doc?
    http://docs.oracle.com/cd/B10500_01/appdev.920/a96620/xdb04cre.htm#1030582
    Regards,
    Neeraj Sehgal

  • Unable to retrieve data from XML Type

    Hi All,
    I have table which has Column of type XMLType
    XML Data is loaded in the table.
    But when iam trying to extract not able to retrieve the data
    Following is the select query i am using
    SELECT CL.XMLDATA.EXTRACT('/ServiceType/entityName/text()').getStringVal() "entityname" FROM CL_DATA_SERVICE_TEMPLATE CL;
    Any help / pointer will help me a lot... Thanks in advance
    Sample XML File:
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <ServiceType xmlns="http://www.bmiasia.com/tBos/service_1_0">
    <entityName>bmiasia.app.irb.servicetemplate12</entityName>
    <systemVersion>4</systemVersion>
    <displayName>
    <bundle />
    <key>AG-EVC</key>
    </displayName>
    <description>AG-EVC GROUP: AG-EVC</description>
    <category entityName="bmiasia.app.service.category.ServiceRootCategory.AG_-_EVC_Services">
    <operation>ADD</operation>
    </category>
    <entityMetaInfo name="bmiasia.app.irb.servicetemplate12.NC_PRODUCT_ID">
    <type entityName="1"></type>
    </entityMetaInfo>
    <entityMetaInfo name="bmiasia.app.irb.servicetemplate12.NC_GL_PRODUCT_CODE">
    <type entityName="2"></type>
    </entityMetaInfo>
    <entityMetaInfo name="bmiasia.app.irb.servicetemplate12.NC_GL_PROFIT_CENTRE">
    <type entityName="3"></type>
    </entityMetaInfo>
    <entityMetaInfo name="bmiasia.app.irb.servicetemplate12.NC_SERVICE_CODE">
    <type entityName="4"></type>
    </entityMetaInfo>
    <entityMetaInfo name="bmiasia.app.irb.servicetemplate12.RSP_EU_CUST_REF">
    <type entityName="5"></type>
    </entityMetaInfo>
    <entityMetaInfo name="irbPkClass">
    <type entityName="com.convergys.geneva.j2ee.product.ProductPK"></type>
    </entityMetaInfo>
    <entityMetaInfo name="irbId">
    <type entityName="12"></type>
    </entityMetaInfo>
    <extensionProperty name="hasAddress" value="true"></extensionProperty>
    <parent>
    <itemkey>AllServiceTemplate</itemkey>
    <name>AllServiceTemplate</name>
    <targetEntity entityName="bmiasia.app.service.template.AllServiceTemplate"></targetEntity>
    <number>0</number>
    </parent>
    <group>NORMAL</group>
    <siu>
    <itemkey>L2_OPTION</itemkey>
    <operation>ADD</operation>
    <name>L2_OPTION</name>
    <required>true</required>
    <source>INTERNAL</source>
    <displayName>
    <key>L2 Option</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>L3_OPTION</itemkey>
    <operation>ADD</operation>
    <name>L3_OPTION</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>L3 Option</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>QPEVPL_SERVICE_ID</itemkey>
    <operation>ADD</operation>
    <name>QPEVPL_SERVICE_ID</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>QP EVLP Service ID</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>QPEVPL_LAG_ID</itemkey>
    <operation>ADD</operation>
    <name>QPEVPL_LAG_ID</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>QP EVLP LAG ID</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>CO_NAME</itemkey>
    <operation>ADD</operation>
    <name>CO_NAME</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Aggregation Layer / Co Layer</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>INSTALL_SALUTAION</itemkey>
    <operation>ADD</operation>
    <name>INSTALL_SALUTAION</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Installation Salutation</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>INSTALL_LASTNAME</itemkey>
    <operation>ADD</operation>
    <name>INSTALL_LASTNAME</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Installlation Last Name</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>INSTALL_FIRSTNAME</itemkey>
    <operation>ADD</operation>
    <name>INSTALL_FIRSTNAME</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Installation First Name</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>INSTALL_TELEPHONE</itemkey>
    <operation>ADD</operation>
    <name>INSTALL_TELEPHONE</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Installation Telephone</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>INSTALL_MOBILE</itemkey>
    <operation>ADD</operation>
    <name>INSTALL_MOBILE</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Installation Mobile</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>INSTALL_EMAIL</itemkey>
    <operation>ADD</operation>
    <name>INSTALL_EMAIL</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Installlation Email</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>INSTALL_NOTIFICATION</itemkey>
    <operation>ADD</operation>
    <name>INSTALL_NOTIFICATION</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Installation Notification</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>TECHNICAL_SALUTAION</itemkey>
    <operation>ADD</operation>
    <name>TECHNICAL_SALUTAION</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Operational / Technical Salutation</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>TECHNICAL_LASTNAME</itemkey>
    <operation>ADD</operation>
    <name>TECHNICAL_LASTNAME</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Operational / Technical Last Name</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>TECHNICAL_FIRSTNAME</itemkey>
    <operation>ADD</operation>
    <name>TECHNICAL_FIRSTNAME</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Operational / Technical First Name</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>TECHNICAL_TELEPHONE</itemkey>
    <operation>ADD</operation>
    <name>TECHNICAL_TELEPHONE</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Operational / Technical Telephone</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>TECHNICAL_MOBILE</itemkey>
    <operation>ADD</operation>
    <name>TECHNICAL_MOBILE</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Operational / Technical Mobile</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>TECHNICAL_EMAIL</itemkey>
    <operation>ADD</operation>
    <name>TECHNICAL_EMAIL</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Operational / Technical Email</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>TECHNICAL_NOTIFICATION</itemkey>
    <operation>ADD</operation>
    <name>TECHNICAL_NOTIFICATION</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Operational / Technical Notification</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>SERVICE_ACTIVATION_PERIOD</itemkey>
    <operation>ADD</operation>
    <name>SERVICE_ACTIVATION_PERIOD</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Service Activation Period</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>REJECT_CODE</itemkey>
    <operation>ADD</operation>
    <name>REJECT_CODE</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Rejection Reason</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>APPLICATION_ACCEPTED</itemkey>
    <operation>ADD</operation>
    <name>APPLICATION_ACCEPTED</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Application Accepted</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.BooleanCheckSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>APPLICATION_REJECTED</itemkey>
    <operation>ADD</operation>
    <name>APPLICATION_REJECTED</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Application Rejected</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.BooleanCheckSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>APPROVAL_CODE</itemkey>
    <operation>ADD</operation>
    <name>APPROVAL_CODE</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Approval Code</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>PROCESSED_BY</itemkey>
    <operation>ADD</operation>
    <name>PROCESSED_BY</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Processed By</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>ACTUAL_RFS_DATE</itemkey>
    <operation>ADD</operation>
    <name>ACTUAL_RFS_DATE</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Actual RFS Date</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.DateSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>DISCLAIMER</itemkey>
    <operation>ADD</operation>
    <name>DISCLAIMER</name>
    <required>false</required>
    <source>INTERNAL</source>
    <displayName>
    <key>Disclaimer</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>NC_PRODUCT_ID</itemkey>
    <operation>ADD</operation>
    <name>NC_PRODUCT_ID</name>
    <required>false</required>
    <source>EXTERNAL</source>
    <displayName>
    <key>NC Product ID</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>NC_GL_PRODUCT_CODE</itemkey>
    <operation>ADD</operation>
    <name>NC_GL_PRODUCT_CODE</name>
    <required>false</required>
    <source>EXTERNAL</source>
    <displayName>
    <key>NC GL Product Code</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>NC_GL_PROFIT_CENTRE</itemkey>
    <operation>ADD</operation>
    <name>NC_GL_PROFIT_CENTRE</name>
    <required>false</required>
    <source>EXTERNAL</source>
    <displayName>
    <key>NC GL Profit Centre</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>NC_SERVICE_CODE</itemkey>
    <operation>ADD</operation>
    <name>NC_SERVICE_CODE</name>
    <required>false</required>
    <source>EXTERNAL</source>
    <displayName>
    <key>EUC ID</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.common.StringSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAttribute"></mapping>
    <scope>PRODUCT</scope>
    </siu>
    <siu>
    <itemkey>bmiasia.app.irb.servicetemplate54</itemkey>
    <operation>ADD</operation>
    <name>bmiasia.app.irb.servicetemplate54</name>
    <required>false</required>
    <source>INTERNAL</source>
    <equalsProvider>bmiasia.app.service.spi.AddSvcSIUEqualsProvider</equalsProvider>
    <displayName>
    <key>CIR Per 250Mbps CoS A</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.AdditionalServiceSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAdditionalService"></mapping>
    <scope>SERVICE</scope>
    <outSvcAttr>true</outSvcAttr>
    </siu>
    <siu>
    <itemkey>bmiasia.app.irb.servicetemplate55</itemkey>
    <operation>ADD</operation>
    <name>bmiasia.app.irb.servicetemplate55</name>
    <required>false</required>
    <source>INTERNAL</source>
    <equalsProvider>bmiasia.app.service.spi.AddSvcSIUEqualsProvider</equalsProvider>
    <displayName>
    <key>CIR Per 250Mbps CoS B</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.AdditionalServiceSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAdditionalService"></mapping>
    <scope>SERVICE</scope>
    <outSvcAttr>true</outSvcAttr>
    </siu>
    <siu>
    <itemkey>bmiasia.app.irb.servicetemplate56</itemkey>
    <operation>ADD</operation>
    <name>bmiasia.app.irb.servicetemplate56</name>
    <required>false</required>
    <source>INTERNAL</source>
    <equalsProvider>bmiasia.app.service.spi.AddSvcSIUEqualsProvider</equalsProvider>
    <displayName>
    <key>CIR Per 250Mbps CoS C</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.AdditionalServiceSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAdditionalService"></mapping>
    <scope>SERVICE</scope>
    <outSvcAttr>true</outSvcAttr>
    </siu>
    <siu>
    <itemkey>bmiasia.app.irb.servicetemplate57</itemkey>
    <operation>ADD</operation>
    <name>bmiasia.app.irb.servicetemplate57</name>
    <required>false</required>
    <source>INTERNAL</source>
    <equalsProvider>bmiasia.app.service.spi.AddSvcSIUEqualsProvider</equalsProvider>
    <displayName>
    <key>CIR Per 250Mbps CoS D</key>
    </displayName>
    <type entityName="bmiasia.app.siulib.siu.AdditionalServiceSIU"></type>
    <mapping entityName="bmiasia.app.service.oo.ServiceAndAdditionalService"></mapping>
    <scope>SERVICE</scope>
    <outSvcAttr>true</outSvcAttr>
    </siu>
    <defaultWorkflowInfo>
    <workflow entityName="bmiasia.app.irb.servicetemplate12_Workflow"></workflow>
    <cancelFlow entityName="bmiasia.app.irb.servicetemplate12_CancelFlow"></cancelFlow>
    </defaultWorkflowInfo>
    <source>EXTERNAL</source>
    <additionalServices entityName="bmiasia.app.irb.servicetemplate54">
    <operation>ADD</operation>
    <name>CIR Per 250Mbps CoS A</name>
    </additionalServices>
    <additionalServices entityName="bmiasia.app.irb.servicetemplate55">
    <operation>ADD</operation>
    <name>CIR Per 250Mbps CoS B</name>
    </additionalServices>
    <additionalServices entityName="bmiasia.app.irb.servicetemplate56">
    <operation>ADD</operation>
    <name>CIR Per 250Mbps CoS C</name>
    </additionalServices>
    <additionalServices entityName="bmiasia.app.irb.servicetemplate57">
    <operation>ADD</operation>
    <name>CIR Per 250Mbps CoS D</name>
    </additionalServices>
    <defaultWorkflowDefinition>
    <installSoEntityName>bmiasia.app.template.serviceorder.Installservicetemplate12SO</installSoEntityName>
    <changeSoEntityName>bmiasia.app.template.serviceorder.Modifyservicetemplate12SO</changeSoEntityName>
    <removeSoEntityName>bmiasia.app.template.serviceorder.Removeservicetemplate12SO</removeSoEntityName>
    <workflow>
    <entityName>bmiasia.app.irb.servicetemplate12_Workflow</entityName>
    </workflow>
    <cancelFlow>
    <entityName>bmiasia.app.irb.servicetemplate12_CancelFlow</entityName>
    </cancelFlow>
    </defaultWorkflowDefinition>
    </ServiceType>

    Hi !!
    Now when iam extracting the data for the above xml, using the below query
    SELECT extractvalue(VALUE(p),'/itemkey/*') Name, extractvalue(VALUE(p),'/required/*') Required FROM CL_DATA_SERVICE_TEMPLATE w, TABLE(XMLSEQUENCE(EXTRACT(xmldata,'/ServiceType/siu','xmlns="http://www.bmiasia.com/tBos/service_1_0"'))) p
    I am expecting the output to be something like below
    Name | Required
    L2_OPTION | true
    L3_OPTION | false
    but iam getting the required number of rows but all blank
    Lets take it as O/P should be 20 Rows, then iam getting 20 Rows.... But all are blank
    What is wrong in the query ?
    Can some one point it out

Maybe you are looking for