Extract XML data based on column tag

Dear All,
i want to extract the XML data type based on column selection.
For example:
i have the below xml in my database stored as XMLTYPE() data.
<c1>10</c1><c2>0011</c2><c3>DEBIT</c3><c4>USD</c4>
i want to extract the column tag c2&c3 alone. Is there any query to extract the same.
Waiting for your response.Thanks in Advance.

Hi,
How do I set the web service option up correctly?  The XMLs are being created behind the scenes on what data to be used but I don't know how to make the menu only pick the xml based on the menu option.
I have one XML that populates the menu options and specific XML's that has the data that goes with each menu option. The menu population works great but it doesn't pull the other XML's to populate the charts. This is the part that I need help.
How do I use the web service to fix this? Any help would be very much appriecated.  I could even send you my dashboard if it helps so you can see what I've gotten so far (it's not all prettied up yet since I wanted to see if it's doable first)
I'm new to Xcelsius so I apologize if these are newbie questions.
Thanks,
Jay

Similar Messages

  • I've to extract the data based on the sysdate...like today dd is 11,

    BM_PERF is the table name and
    BM_PERF_YR,BM_PERF_MONTH,BM_NOP_CT_1........BM_NOP_CT_31 are the column names.
    I've to extract the data based on the sysdate...like today dd is 11
    so i've to get data from BM_NOP_CT_11 and the column names changes dynamically based on the sysdate. don't use any procedures and functions.

    You could always pivot it into a more convenient form for querying:
    WITH t1 AS
         ( SELECT 2008 AS yr, 4 AS mnth
                , 20 AS dy1
                , 10 AS dy2
                , 15 AS dy3
                , 1  AS dy4
                , 17 AS dy5
                , 99 AS dy6
                , 55 AS dy7
                , 45 AS dy8
                , 33 AS dy9
                , 22 AS dy10
                , 74 AS dy11
                , 35 AS dy12
                , 62 AS dy13
                , 24 AS dy14
                , 85 AS dy15
           FROM dual )
       , t2 AS
         ( SELECT yr
                , mnth
                , sys.DBMS_DEBUG_VC2COLL
                  (dy1,dy2,dy3,dy4,dy5,dy6,dy7,dy8,dy9,dy10,dy11,dy12,dy13,dy14,dy15)
                  AS day_data
           FROM   t1 )
    SELECT t2.yr, t2.mnth, sys_op_ceg(t2.day_data,5) day_value
    FROM   t2;
            YR       MNTH DAY_VALUE
          2008          4 17
    1 row selected.Note that SYS_OP_CEG (first discovered by Padders) is undocumented and unsupported - for production code you'd need to pick the collection row using a WHERE clause, and for that you'd need a custom object and collection type with an attribute to hold the day number.
    Message was edited by:
    William Robertson
    ...like this:
    CREATE TYPE id_value_ot AS OBJECT
    ( id INTEGER, val NUMBER );
    CREATE TYPE id_value_tt AS TABLE OF id_value_ot ;
    WITH t1 AS
         ( SELECT 2008 AS yr, 4 AS mnth
                , 20 AS dy1
                , 10 AS dy2
                , 15 AS dy3
                , 1  AS dy4
                , 17 AS dy5
                , 99 AS dy6
                , 55 AS dy7
                , 45 AS dy8
                , 33 AS dy9
                , 22 AS dy10
                , 74 AS dy11
                , 35 AS dy12
                , 62 AS dy13
                , 24 AS dy14
                , 85 AS dy15
           FROM dual )
       , t2 AS
         ( SELECT yr
                , mnth
                , id_value_tt
                  ( id_value_ot(1,dy1)
                  , id_value_ot(2,dy2)
                  , id_value_ot(3,dy3)
                  , id_value_ot(4,dy4)
                  , id_value_ot(5,dy5)
                  , id_value_ot(6,dy6)
                  , id_value_ot(7,dy7)
                  , id_value_ot(8,dy8)
                  , id_value_ot(9,dy9)
                  , id_value_ot(10,dy10)
                  , id_value_ot(11,dy11)
                  , id_value_ot(12,dy12)
                  , id_value_ot(13,dy13)
                  , id_value_ot(14,dy14)
                  , id_value_ot(15,dy15) )
                  AS day_data
           FROM   t1 )
    SELECT yr, mnth, dd.val
    FROM   t2, TABLE(t2.day_data) dd
    WHERE  dd.id = 5;
            YR       MNTH        VAL
          2008          4         17
    1 row selected.

  • Problem with extracting Xml data source fields

    Post Author: new_crystal
    CA Forum: Crystal Reports
    Hi,
    I am creating a report which has a xml data source.
    I have a field named fieldvalue in the xml, I need to present this fieldvalue in a column format based on the name of the column heading which is another field in the database called fielddata
    here is what i want
    fielddata1     fielddata2    fielddata3 .......
    fieldvalue1    fieldvalue2   fieldvalue3......
    i have dragged the fieldvalue 3 times in the report and applied different formula for each one of them
    here is the eg. of the formula
    if ( = "A" ) then
    but it is not giving me the correct values pulled from the data source. for the first column it is pulling correctly but for the rest of the columns it is giving values as 0's.
    Can anyone help me out in this? It is pretty urgent!
    Thanks

    Post Author: tel
    CA Forum: Crystal Reports
    I have no idea how to format it in Crystal Reports (i'm new to it too), but if worse comes to worse, you can create an XSLT stylesheet to convert the XML into a format that is easier for Crystal to use. 
    In case you don't know XSLT is a programming language that is designed to convert one XML format into another.

  • Best way to extract XML data to DB

    Hello,
    In our work we need to extract data from XML documents into a database. Here are some extra notes:
    + There is no constant schema for the XML documents.
    + Some processing on the XML files is required.
    + The XML documents are very big.
    + The database is Oracle 8i or 9i (Enterprise Edition both) and our framework is NET.
    Our questions are:
    1. What is the best way to extract the data into the database under the above circumstances ?
    2. In case there was a constant schema for the XML documents, would there be a better way ?
    3. Is writing the data to text files first, and then loading it via SQL-Loader is an effective way ?
    Any thoughts would be welcome. Thanks.

    Hi Nicolas,
    The answer depends on your actual storage method (binary, OR, CLOB?), and db version.
    You can try XMLTable, it might be better in this case :
    SELECT x.elem1, x.elem2, ... , x.elem20
    FROM your_table t
       , XMLTable(
          '/an/xpath/to/extract'
          passing t.myxmltype
          columns elem1  varchar2(30) path 'elem1'
                , elem2  varchar2(30) path 'elem2'
                , elem20 varchar2(30) path 'elem20'
         ) x
    ;

  • How to extract required data from a column to a flat file

    my ssis package is working OK. However, I want to refine one of the column extraction.
    when data is extracted to the flat file, I just want to the initials, firstname, lastname e.g.
    FZ = Ben Smith, Add1, add1, etc
    the only bit that i want is  Ben Smith
    how can i state in the package to just give me the name and exclude the rest
    sukai

    Add a derived column task to extract Name part alone and give expression as below
    LEFT([ColumnName],FINDSTRING([ColumnName],",",1)-1)
    If before SSIS 2012 use SUBSTRING
    SUBSTRING([ColumnName],1,FINDSTRING([ColumnName],",",1)-1)
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to insert 4K of XML data into XMLType column?

    I use OCCI and our Oracle version is 9.2.0.1.0. I have successfully been able to insert xml data (any size) into a clob column using "insert into...values(.., empty_clob()) returning c1 into :3"; and then using Statement::GetClob() to acquire a reference to the internal clob and populate it. I cannot seem to be able to do the same when the column type is of XMLType.
    I could not find a single sample code which demonstrates inserting into a table with a XMLType column. Using SetDataBuffer(OCCI_SQLT_STR) with data over 4000 bytes does not work.
    I'd greatly appreciate any feedback.

    Pretty sure this was a bug in the base 9.2 release which was fixed in a patch drop. Try 9.2.0.6 or later.

  • Struts - Formatting date in display:column tag

    Hi ,
    I am using the following code to format the date in my display tag
    <display:column headerClass="myclass" property="submittedDate" title="DATE SUBMITTED" decorator="org.displaytag.sample.LongDateWrapper" />     which displays the date like '12/22/2005 00:00'
    I don't need this format . Instead ,I want to extend the decorator and create my own . For that , I'm using
    import java.text.SimpleDateFormat;
    import org.displaytag.decorator.TableDecorator;
    public class DateDecorator extends TableDecorator{
         public DateDecorator(){          
              super();
              System.out.println("Date decorator constructor called...");
         public String getSubmittedDate(Object obj){
              SimpleDateFormat sdf = new SimpleDateFormat();
              sdf.applyPattern("MM/dd/yyyy");
              System.out.println("In getSubmittedDate()...");
              String date = sdf.format(obj);
              System.out.println("Formatted date is ::"+date);
              return date;
    but at runtime it gives me the classcast exception saying that
    class DateDecorator could not be loaded .
    Kindly guide me through it .
    Thanks

    Decorator class that you wrote is "DateDecorator" and the decorator class that you used in the tag is "LongDateWrapper".

  • How to retreive soap xml data from clob column in a table

    Hi,
    I am trying to retrieve the XML tag value from clob column.
    Table name = xyz and column= abc (clob datatype)
    data stored in abc column is as below
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:head="http://www.abc.com/gcgi/shared/system/header" xmlns:v6="http://www.abc.com/gcgi/services/v6_0_0_0" xmlns:sys="http://www.abc.com/gcgi/shared/system/systemtypes">
    <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <RqHeader soapenv:mustUnderstand="0" xmlns="http://www.abc.com/gcgi/shared/system/header">
    <DateAndTimeStamp>2011-12-20T16:02:36.677+08:00</DateAndTimeStamp>
    <UUID>1000002932</UUID>
    <Version>6_0_0_0</Version>
    <ClientDetails>
    <Org>ABC</Org>
    <OrgUnit>ABC</OrgUnit>
    <ChannelID>HBK</ChannelID>
    <TerminalID>0000</TerminalID>
    <SrcCountryCode>SG</SrcCountryCode>
    <DestCountryCode>SG</DestCountryCode>
    <UserGroup>HBK</UserGroup>
    </ClientDetails>
    </RqHeader>
    <wsa:Action>/SvcImpl/bank/
    SOAPEndpoint/AlertsService.serviceagent/OpEndpointHTTP/AlertDeleteInq</wsa:Action></soapenv:Header>
    <soapenv:Body>
    <v6:AlertDeleteInqRq>
    <v6:Base>
    <v6:VID>20071209013112</v6:VID>
    <!--Optional:-->
    <v6:Ref>CTAA00000002644</v6:Ref>
    </v6:Base>
    </v6:AlertDeleteInqRq>
    </soapenv:Body>
    </soapenv:Envelope>
    And i want to retrieve the values of tag
    <ChannelID> and <v6:VID>
    can somebody help, i have tried with extractvalue but not able to get the values

    I have used the below two queries but not able to get the expected results. Both queries result into no values.
    select xmltype(MED_REQ_PAYLOAD).extract('//ClientDetails/Org','xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" || xmlns="http://www.abc.com/gcgi/shared/system/header"').getStringValue() from ESB_OUTPUT_TEMP where SOAPACTION = '/SvcImpl/bank/alerts/v6_0_0_0/SOAPEndpoint/AlertsService.serviceagent/OpEndpointHTTP/AlertDeleteInq'
    select EXTRACTVALUE(xmltype(MED_REQ_PAYLOAD),'/RqHeader/) from ESB_OUTPUT_TEMP where SOAPACTION = '/SvcImpl/bank/SOAPEndpoint/AlertsService.serviceagent/OpEndpointHTTP/AlertDeleteInq'
    Well, for starters, both queries are syntactically wrong :
    - non terminated string
    - incorrect namespace mapping declaration
    - unknown XMLType method "getStringValue()"
    Secondly, all those functions are deprecated now.
    Here's an up-to-date example using XMLTable. It will retrieve the two tag values you mentioned :
    SQL> select x.*
      2  from esb_output_temp t
      3     , xmltable(
      4         xmlnamespaces(
      5           'http://schemas.xmlsoap.org/soap/envelope/' as "soap"
      6         , 'http://www.abc.com/gcgi/shared/system/header' as "head"
      7         , 'http://www.abc.com/gcgi/services/v6_0_0_0' as "v6"
      8         )
      9       , '/soap:Envelope'
    10         passing xmlparse(document t.med_req_payload)
    11         columns ChannelID  varchar2(10) path 'soap:Header/head:RqHeader/head:ClientDetails/head:ChannelID'
    12               , VID        varchar2(30) path 'soap:Body/v6:AlertDeleteInqRq/v6:Base/v6:VID'
    13       ) x
    14  ;
    CHANNELID  VID
    HBK        20071209013112
    You may also want to store XML in XMLType columns for both performance and storage optimizations.

  • Inserting XML data into xmltype column

    Oracle version: 10.1.0.5
    OpenVms Alpha V8.3
    1) Tried this and get the error shown below. Removed charset and placed a zero. Same error.
    INSERT INTO xml_demo (xml_data) -- column of xmltype
    VALUES
    xmltype
    bfilename('XML_DIR', 'MOL.XML'),
    nls_charset_id('AL32UTF8')
    ORA-22993: specified input amount is greater than actual source amount
    ORA-06512: at "SYS.DBMS_LOB", line 637
    ORA-06512: at "SYS.XMLTYPE", line 283
    ORA-06512: at line 1
    2) This PL/SQL block works. However maximum raw size around 32K. The file can be around 100K. May be I can load it into a table of raw and somehow concatnate it to insert. Not sure whether this is possible but I am sure there must me a simple way of doing this.
    Subset of the xml file is pasted below.
    set serveroutput on size 1000000
    DECLARE
    file1 bfile;
    v_xml XMLType;
    len1 number(6);
    v_rec1 raw(32000);
    BEGIN
    file1 := bfilename('XML_DIR','MOL.XML');
    DBMS_LOB.fileopen(file1, DBMS_LOB.file_readonly);
    len1 := DBMS_LOB.getLength(file1);
    v_rec1 := dbms_lob.substr(file1,len1,1);
    v_xml := xmltype(UTL_RAW.CAST_TO_VARCHAR2(v_rec1));
    INSERT INTO xml_demo (xml_data) VALUES (v_xml);
    COMMIT;
    DBMS_LOB.fileclose(file1);
    exception
    when others then
    dbms_output.put_LINE (sqlerrm);
    DBMS_LOB.fileclose(file1);
    END;
    <?xml version="1.0" encoding="UTF-8"?>
    <MolDocument DtdVersion="3" DtdRelease="0">
    <DocumentIdentification v="MOL_20100331_1500_1600"/>
    <DocumentVersion v="1"/>
    <DocumentType v="A43"/>
    <SenderIdentification codingScheme="A01" v="17X100Z100Z0001H"/>
    <SenderRole v="A35"/>
    <ReceiverIdentification codingScheme="A01" v="10XFR-RTE------Q"/>
    <ReceiverRole v="A04"/>
    <CreationDateTime v="2010-03-31T14:10:00Z"/>
    <ValidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Domain codingScheme="A01" v="10YDOM-1001A001A"/>
    <MolTimeSeries>
    <ContractIdentification v="RTE_20100331_1500_16"/>
    <ResourceProvider codingScheme="A01" v="10XFR-RTE------Q"/>
    <AcquiringArea codingScheme="A01" v="17Y100Z100Z00013"/>
    <ConnectingArea codingScheme="A01" v="10YFR-RTE------C"/>
    <AuctionIdentification v="AUCTION_20100331_1500_1600"/>
    <BusinessType v="A10"/>
    <BidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <MeasureUnitQuantity v="MAW"/>
    <Currency v="EUR"/>
    <MeasureUnitPrice v="MWH"/>
    <Direction v="A02"/>
    <MinimumActivationQuantity v="50"/>
    <Status v="A06"/>
    <Period>
    <TimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Resolution v="PT60M"/>
    <Interval>
    <Pos v="1"/>
    <Qty v="50"/>
    <EnergyPrice v="50.45"/>
    </Interval>
    </Period>
    </MolTimeSeries>
    </MolDocument>

    Marc
    Thanks. I understand what you are saying. I have been copying files in binary mode from NT servers into VMS. I have to get a proper xml file via FTP from the originating system to further investigate.
    I have one last item i need help on. If anything looks obvious let me know:
    +1) The xsd defintion of Qty (type: QuantityType) and EnergyPrice (type: Amount Type)+
                   <xsd:element name="Qty" type="ecc:QuantityType">
                        <xsd:annotation>
                             <xsd:documentation/>
                        </xsd:annotation>
                   </xsd:element>
                   <xsd:element name="EnergyPrice" type="ecc:AmountType" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation/>
                        </xsd:annotation>
                   </xsd:element>
    +2) Definition of AmountType and QuantityType in the parent xsd+
         <xsd:complexType name="AmountType">
              <xsd:annotation>
                   <xsd:documentation>
                        <Uid>ET0022</Uid>
                        <Definition>The monetary value of an object</Definition>
                   </xsd:documentation>
              </xsd:annotation>
              <xsd:attribute name="v" use="required">
                   <xsd:simpleType>
                        <xsd:restriction base="xsd:decimal">
                             <xsd:totalDigits value="17"/>
                        </xsd:restriction>
                   </xsd:simpleType>
              </xsd:attribute>
         </xsd:complexType>
         <!--_________________________________________________-->
         <xsd:complexType name="QuantityType">
              <xsd:annotation>
                   <xsd:documentation>
                        <Uid>ET0012</Uid>
                        <Definition>(Synonym "qty") The quantity of an energy product. Positive quantities shall not have a sign.</Definition>
                   </xsd:documentation>
              </xsd:annotation>
              <xsd:attribute name="v" type="xsd:decimal" use="required"/>
         </xsd:complexType>
         <!--________________
    +3. Data in the XML file+
    <Period>
    <TimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Resolution v="PT60M"/>
    <Interval>
    <Pos v="1"/>
    <Qty v="50"/>
    <EnergyPrice v="50.45"/>
    </Interval>
    +4) When I do the load:+
    the EnergyPrice is saved in the xmltype column as <EnergyPrice v="50"/>
    Losing its decimal value of .45
    +5) When I select as follows:+
    **DEV** SQL>> l
    1 SELECT
    2 EXTRACTVALUE(x2.column_value,'/MolTimeSeries/Period/Interval/EnergyPrice/@v') v1,
    3 EXTRACTVALUE(x2.column_value,'/MolTimeSeries/Period/Interval/EnergyPrice') v2,
    4 EXTRACTVALUE(x2.column_value,'/MolTimeSeries/Period/Interval/Qty') v3
    5 FROM balit_mol_xml x,
    6 TABLE(
    7 XMLSEQUENCE(
    8 EXTRACT(x.xml_payload, '/MolDocument/MolTimeSeries')
    9 )
    10 ) x2
    11* WHERE EXISTSNODE(x.xml_payload,'/MolDocument/DocumentIdentification[@v="MOL_20100331_1500_1600"]') = 1
    +6) get the result+
    50
    AmountType479_T(XDB$RAW_LIST_T('1301000000'), 50)
    QuantityType471_T(XDB$RAW_LIST_T('1301000000'), 50)
    +7) XDB$RAW_LIST_T('1301000000'),+
    Does that tell what I am doing wrong?

  • Extracting XML Data to a flat file

    I have an application which is puting an XML string into a field in the database... now my problem is that I have to extract that information and put it in either 1. a flat file, or 2. a seperate table containing a column for each XML attribute... Does anyone know of the best way to approach either solution?
    cheers.

    And your Oracle version is?
    There are many different ways to put something into a file. How about UTL_FILE?http://www.psoug.org/reference/utl_file.html
    How to get it out of the table in the first place?
    I usually try a SELECT statement. They seem to work.
    PS: Databases don't have fields ... table's don't either. Check your verbiage.
    Try looking of the word "FIELD" in the Oracle docs. Then try "COLUMN."

  • Using XPath with SQL to extract XML data

    Given data such as this one:
    <?xml version="1.0"?>
    <ExtendedData>
       <Parameter name="CALLHOLD"><BooleanValue>true</BooleanValue></Parameter>
      <Parameter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BARRING_PASSWORD" xsi:nil="true"/>
      <Parameter name="ALLCF"><BooleanValue>true</BooleanValue></Parameter>
      <Parameter name="RealProv"><BooleanValue>false</BooleanValue></Parameter>
    </ExtendedData>I normally use extractValue function as shown below for example to extract the value for the last parameter in the data above, e.g:
    select extractValue(extended_data,'/ExtendedData/Parameter[@name="RealProv"]/BooleanValue') "my_column_alias" from tableAny ideas on how I may return the value of the parameter xsi:nil from this node:
    <Parameter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BARRING_PASSWORD" xsi:nil="true"/>I'd like to extract the true in xsi:nil="true"...
    Thanks,
    Edited by: HouseofHunger on May 15, 2012 2:13 PM
    Edited by: HouseofHunger on May 15, 2012 2:13 PM

    Extractvalue() has a third parameter we can use to declare namespace mappings :
    SQL> with sample_data as (
      2    select xmltype('<?xml version="1.0"?>
      3  <ExtendedData>
      4    <Parameter name="CALLHOLD"><BooleanValue>true</BooleanValue></Parameter>
      5    <Parameter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BARRING_PASSWORD" xsi:nil="true"/>
      6    <Parameter name="ALLCF"><BooleanValue>true</BooleanValue></Parameter>
      7    <Parameter name="RealProv"><BooleanValue>false</BooleanValue></Parameter>
      8  </ExtendedData>') doc
      9    from dual
    10  )
    11  select extractvalue(
    12           doc
    13         , '/ExtendedData/Parameter[@name="BARRING_PASSWORD"]/@xsi:nil'
    14         , 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
    15         )
    16  from sample_data
    17  ;
    EXTRACTVALUE(DOC,'/EXTENDEDDAT
    true
    If you're on 11.2.0.2 and up, extractvalue() is deprecated.
    One should use XMLCast/XMLQuery instead :
    SQL> with sample_data as (
      2    select xmltype('<?xml version="1.0"?>
      3  <ExtendedData>
      4    <Parameter name="CALLHOLD"><BooleanValue>true</BooleanValue></Parameter>
      5    <Parameter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BARRING_PASSWORD" xsi:nil="true"/>
      6    <Parameter name="ALLCF"><BooleanValue>true</BooleanValue></Parameter>
      7    <Parameter name="RealProv"><BooleanValue>false</BooleanValue></Parameter>
      8  </ExtendedData>') doc
      9    from dual
    10  )
    11  select xmlcast(
    12           xmlquery('/ExtendedData/Parameter[@name="BARRING_PASSWORD"]/@xsi:nil'
    13            passing doc
    14            returning content
    15           ) as varchar2(5)
    16         )
    17  from sample_data
    18  ;
    XMLCAST(XMLQUERY('/EXTENDEDDAT
    true
    Note : the xsi prefix is predefined when using Oracle XQuery, so in this case we don't have to declare it explicitly.
    Edited by: odie_63 on 15 mai 2012 15:23

  • XML Schema based XMLType column leaves file open on error

    Hello,
    I have the following situation on both oracle 10.1.0.2.0 and 10.1.0.4.0:
    insert into xml_products (xmlfile) values(bfilename(file_loc, char_id));
    "xmlfile" is a xmltype column based on a registered xml schema.
    When the file fails xml schema validation, the file remains open and I cannot move it until i close the session.
    Is this a bug or an "intentional feature"?
    Any workarounds?
    Thanks,
    Flavio

    All right Mark,
    thanks for your reply.
    Meanwhile I fixed the problem and posted my workaround here:
    http://oraclequirks.blogspot.com/2005/11/ora-29292-and-xmltype.html
    Bye,
    Flavio

  • Update text fields with xml data based on DDL selection of an ID number

    Hi guys,
    this one should be straight forward, but I cant seem to find a straight forward answer.  In a nutshell:
    XML file contains ID, Name, Location (so far 3 records in sample xml file)
    Form contains a Dynamic Drop down list to allow selection of ID and text fields to display the associated name and location of that ID.  The binding of the Drop down works fine, however I need the other fields to update to the associated name and location when different ID's are selected.  I assume I'll need some sort of exit event on the drop down list to update the other fields with the Name and location of the ID selected, but I dont know enough to have a stab at it.
    please, please, please help, Im starting to pull my hair out.
    James.

    Hi James,
    This would depend on the structure of your XML but assuming you have something like;
    <Data>
                <Item>
                            <Id>1</Id>
                            <Name>Name1</Name>
                            <Location>Location1</Location>
                </Item>
                <Item>
                            <Id>2</Id>
                            <Name>Name2</Name>
                            <Location>Location2</Location>
                </Item>
                <Item>
                            <Id>3</Id>
                            <Name>Name3</Name>
                            <Location>Location3</Location>
                </Item>
    </Data>
    Then in the change event of your dropdown (your could use the exit event but then value might not have changed so would be performing unnecessary processing) add the following code.
    var itemGroup = $data.Data.resolveNode("Item.(Id.value === '"+xfa.event.change+"')");
    Name.rawValue = itemGroup.Name.value;
    Location.rawValue = itemGroup.Location.value;
    The xfa.event.change will be the value selected, the resolveNode will return the Item with the matching Id, and then it is just a matter of assigning it to your form fields.
    Hope this gets you started.
    Regards
    Bruce

  • XML data extraction in 8.1.7

    Hi,
    I am new to xmlparser. I have the following xml file as CLOB in oracle 8.1.7 dB. I need to extract the data, based on the user request. If the user requests "Collateral Assets", then i have to extract the data group, related to that "Collateral Assets".
    If the user requests "Liabilities", then i have to extract the data group, related to that "Liabilities".
    Can anybody help, with sample source code. I need to use XMLDOM api's.
    Thanks
    <cashflowSummaryReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Projects\Reports\cashflowSummaryReport.xsd">
         <name1>Cashflow CDO Summary Report</name1>
         <description1>Sample Cashflow for documentation</description1>
         <analysisDate1>2001-01-01</analysisDate1>
         <links>
              <link>
                   <name>Reports Main</name>
                   <location>summary.html</location>
              </link>
              <link>
                   <name>RiskMetrics Group</name>
                   <location>http://www.riskmetrics.com</location>
              </link>
         </links>
         <dataGroup>
              <name>Collateral Assets</name>
              <description>Summary of collateral assets</description>
              <links>
                   <link>
                        <name>View Collateral Assets separately</name>
                        <location>cashflowSummaryReport_collateral.html</location>
                   </link>
              </links>
              <header>
                   <keyHeader>
                        <title>Detail</title>
                   </keyHeader>
                   <columnHeader>
                        <title>Value</title>
                   </columnHeader>
              </header>
              <data>
                   <key>
                        <value>Total Par Value</value>
                   </key>
                   <column>
                        <value>150000000</value>
                   </column>
              </data>
              <data>
                   <key>
                        <value>Number of Obligors</value>
                   </key>
                   <column>
                        <value>98</value>
                   </column>
              </data>
         </dataGroup>
         <dataGroup>
              <name>Liabilities</name>
              <description>Summary of liabilities by tranche/notes</description>
              <system>S+P</system>
              <links>
                   <link>
                        <name>View Liabilities separately</name>
                        <location>cashflowSummaryReport_liabilities.html</location>
                   </link>
              </links>
              <header>
                   <keyHeader>
                        <title>Tranche / Notes</title>
                   </keyHeader>
                   <columnHeader>
                        <title>Notional</title>
                   </columnHeader>
                   <columnHeader>
                        <title>Market Price</title>
                   </columnHeader>
                   <columnHeader>
                        <title>Coupon</title>
                   </columnHeader>
                   <columnHeader>
                        <title>OC Trigger</title>
                   </columnHeader>
                   <columnHeader>
                        <title>Current OC</title>
                   </columnHeader>
                   <columnHeader>
                        <title>IC Trigger</title>
                   </columnHeader>
                   <columnHeader>
                        <title>Current IC</title>
                   </columnHeader>
              </header>
              <data>
                   <key>
                        <value>Senior notes - floating</value>
                        <link>CashFlowReport_Senior notes - floating.html</link>
                   </key>
                   <column>
                        <value>90000000</value>
                   </column>
                   <column>
                        <value>90000000</value>
                   </column>
                   <column>
                        <value>LIBOR+0.50%</value>
                   </column>
                   <column>
                        <value>-</value>
                   </column>
                   <column>
                        <value>-</value>
                   </column>
                   <column>
                        <value>-</value>
                   </column>
                   <column>
                        <value>-</value>
                   </column>
              </data>
         </dataGroup>
    </cashflowSummaryReport>

    There is no native XML data types in 8i.

  • How to use XML data stored in table column in XML Data Definition

    Hi,
    We are using BIP 5.6.3 (Oracle EBS R12).
    We have a table which stores XML data in a column. Is there a way we can use this XML data through a SQL query in XML Data Definition of BI Publisher report instead or writing whole SQL query to fetch same data from Oracle EBS?
    Can some please provide a sample SQL query that we should use in Data Definition?
    Thanks!

    Mark,
    Thanks. This is exactly what I was looking for.
    After doing @Name in both places (SELECT and WHERE clause) it worked.
    Now I have one more question.
    There are multiple DIMENSION tags in my xml, and I want to see the NAME attribute values for all of those DIMENSIONs. The following query returns
    ORA-19025: EXTRACTVALUE returns value of only one node.
    Cause: Given XPath points to more than one node.
    Action: Rewrite the query so that exactly one node is returned.
    SELECT
    extractValue(value(x), '/AW/@Name') as "AW",
    extractValue(value(x), '/AW/Dimension/@Name') as "DIMENSIONS"
    from
    OLAP_AW_PRC,
    table(xmlsequence(extract (xmltype(AW_XML_TMPL_VAL), '/AWXML/AWXML.content/Create/ActiveObject/AW'))) x
    where
    extractValue(value(x) , '/AW/@Name') = 'OMCR4'

Maybe you are looking for

  • How to extend cost element to controlling area?

    Hello all, I created a new cost element via FSP0 and then created cost element via KA01. Now whwen I am trying to do cost center assignment in OKB9, it throws me error that cost center in controlling are not exit for today's date with error message K

  • Having email trouble with iPad

    All of a sudden I'm not receiving emails on my iPad, it just keeps on saying the mail server "imapgmail.com is not responding verify if I have entered the correct account into mail settings

  • Xs:group refs and "ORA-30936: Maximum number (1) of XML nodes exceeded'

    We registered a subset of the IBM DITA schemas in Oracle XDB. These schemas contain a lot of xs:group definitions where references to these groups contain "minOccurs" and "maxOccurs" atttributes, for instance: <xs:group name="category"> <xs:sequence>

  • Compatability of acrobat 5.0 with Windows 8

    I have windows 8 on a new notebook and tried to load my Adobe Acrobat 5.0 from disc, it says there is a compatibility issue, what can be done?

  • Yosemite won't install on i-Mac running Mavericks OS

    I have repeatedly attempted to install Yosemite on my i-MAC (late 2013 model) but always get the following message 'This copy of the install OS X Yosemite application can't be verified it may have been corrupted or tampered with during downloading' s