extract xml data in the collection

Hello

I want to extract xml data in a collection of collection


could any body you tell me if we succeed in sql
ex:

declare
type t_code is table of number;
type r_rec is record (c_name varchar2 (100),)
c_code vrachar2 (100),
c_code_number t_code);
type t_rec is the table of the r_rec;

l_xml xmltype: = xmltype (')

< body >
<>campaign
< code > < code > CAMP_1
< description > Campaign_1 < / description >
< rateplans >
< rateplanCode > 1 < / rateplanCode >
< rateplanCode > 2 < / rateplanCode >
< rateplanCode > 3 < / rateplanCode >
< / rateplans >
< / campaign >
<>campaign
< code > < code > CAMP_2
< description > Campaign_2 < / description >
< rateplans >
< > 11 rateplanCode < / rateplanCode >
< > 22 rateplanCode < / rateplanCode >
< rateplanCode > 33 < / rateplanCode >
< / rateplans >
< / campaign >
<>campaign
< code > < code > CAMP_3
< description > Campaign_3 < / description >
< rateplans >
< > 111 rateplanCode < / rateplanCode >
< > 222 rateplanCode < / rateplanCode >
< > 333 rateplanCode < / rateplanCode >
< / rateplans >
< / campaign >
< result >
< > 00 resultCode < / resultCode >
< resultText > success < / resultText >
< / result >
(< / body > ');

Start

Select / * logic exrat value of xml in the final collection * /.
Double;

end;

I want data in the model in my final collection t_rec

CAMP_1, Campaign_1, nested_table (1,2,3)
CAMP_2, Campaign_2, nested_table (11,22,33)
CAMP_3, Campaign_3, nested_table (111,222,333)

Published by: 948596 on May 17, 2013 05:17

Like this

SQL> declare
  2       type t_code is table of number ;
  3       type r_rec is record
  4       (
  5          c_name varchar2(100),
  6          c_code varchar2(100),
  7          c_code_number t_code
  8       );
  9       type t_rec is table of r_rec ;
 10       l_rec t_rec := t_rec();
 11       l_xml xmltype := xmltype
 12                        ('
 13                           
 14                           
 15                           CAMP_1
 16                           Campaign_1
 17                           
 18                           1
 19                           2
 20                           3
 21                           
 22                           
 23                           
 24                           CAMP_2
 25                           Campaign_2
 26                           
 27                           11
 28                           22
 29                           33
 30                           
 31                           
 32                           
 33                           CAMP_3
 34                           Campaign_3
 35                           
 36                           111
 37                           222
 38                           333
 39                           
 40                           
 41                           
 42                           00
 43                           Success
 44                           
 45                           '
 46                        ) ;
 47  begin
 48       for i in (
 49                 select rownum id
 50                      , t1.code
 51                      , t1.description
 52                      , t2.rate_plan_code
 53                      , row_number() over(partition by t1.code order by t2.rate_plan_code) rno
 54                   from xmltable
 55                        (
 56                             '/body/campaign' passing l_xml
 57                             columns
 58                               code        varchar2(100) path 'code',
 59                               description varchar2(100) path 'description',
 60                               rate_plans  xmltype       path 'rateplans'
 61                        ) t1
 62                      , xmltable
 63                        (
 64                             '/rateplans/rateplanCode' passing t1.rate_plans
 65                             columns
 66                               rate_plan_code varchar2(100) path '.'
 67                        ) t2
 68                )
 69       loop
 70            if i.rno = 1 then
 71               l_rec.extend;
 72               l_rec(l_rec.count).c_name := i.description;
 73               l_rec(l_rec.count).c_code := i.code;
 74               l_rec(l_rec.count).c_code_number := t_code();
 75            end if;
 76            l_rec(l_rec.count).c_code_number.extend;
 77            l_rec(l_rec.count).c_code_number(i.rno) := i.rate_plan_code;
 78       end loop;
 79       for i in 1..l_rec.count
 80       loop
 81          dbms_output.put_line(l_rec(i).c_code || '  ' || l_rec(i).c_name);
 82          for j in 1..l_rec(i).c_code_number.count
 83          loop
 84             dbms_output.put_line(l_rec(i).c_code_number(j));
 85          end loop;
 86       end loop;
 87  end;
 88  /
CAMP_1  Campaign_1
1
2
3
CAMP_2  Campaign_2
11
22
33
CAMP_3  Campaign_3
111
222
333

PL/SQL procedure successfully completed.

SQL> 

Tags: Database

Similar Questions

  • Insert XML data from the Table-&gt; back to null

    Dear Experts,

    -I have table xml as below:

    Example of CREATE TABLE (XML_spec XMLTYPE);

    Insert in the example
    Select ' < name of Message = "dataStaticInvestor" type = "IncomingMessage" >
    < name of field = "batchReference" > OPENINGBATCH000000 < / field > < List name = "data" >
    < = record name "data" >
    < name of field = "externalReference" > 01234567890aaaaaaa < / field >
    < name of field = "participantID" > OD001 < / field >
    < name of field = "participantName" > EQUITY SECURITIES INDONESIA, PT < / field >
    < / recording >
    < = record name "data" >
    < name of field = "externalReference" > 01234567890aaaaaaa < / field >
    < name of field = "participantID" > OD001 < / field >
    < name of field = "participantName" > EQUITY SECURITIES INDONESIA, PT < / field >
    < / recording >
    < = record name "data" >
    < name of field = "externalReference" > 01234567890aaaaaaa < / field >
    < name of field = "participantID" > OD001 < / field >
    < name of field = "participantName" > EQUITY SECURITIES INDONESIA, PT < / field >
    < / recording >
    < / list >
    < / message > ' double.

    Select * example;

    create table hasil1 (c1 varchar2 (500), c2 varchar2 (500), c3 varchar2 (500));

    -This step I create the procedure to insert xml data into the table as the batch.

    DECLARE
    x XmlType;
    BEGIN
    Select XML_SPEC in x for example;

    insert into hasil1
    SELECT
    p.Extract('/Record/Field/@externalReference').getstringval (C1),
    p.Extract('/Record/Field/@participantID').getstringval (C2),
    p.Extract('/Record/Field/@participantName').getstringval () as c3
    TABLE (XMLSequence (Extract(x,'Message/List/Record'))) p;
    commit;
    END;
    /

    -when the result of select hasil1, the output is back 3 rows and 3 columns, but all data is a null *.

    Best regards
    Sigcle

    You don't explain what output you need, but I guess something like this:

    SQL> insert into hasil1 (c1, c2, c3)
      2  select x.c1, x.c2, x.c3
      3  from example t
      4     , xmltable(
      5         'Message/List/Record'
      6         passing t.xml_spec
      7         columns c1 varchar2(500) path 'Field[@name="externalReference"]'
      8               , c2 varchar2(500) path 'Field[@name="participantID"]'
      9               , c3 varchar2(500) path 'Field[@name="participantName"]'
     10       ) x
     11  ;
    
    3 rows inserted
    
    SQL> select * from hasil1;
    
    C1                     C2        C3
    ---------------------- --------- --------------------------------
    01234567890aaaaaaa     OD001     EQUITY SECURITIES INDONESIA,PT
    01234567890aaaaaaa     OD001     EQUITY SECURITIES INDONESIA,PT
    01234567890aaaaaaa     OD001     EQUITY SECURITIES INDONESIA,PT
     
    
  • How to clear the old cumulative game data in the collection of solitaire Microsoft - Windows 8

    How to clear the old cumulative game data in the collection of solitaire weird... is to say total games, victories, % etc...

    Hello

    Microsoft Solitaire Collection is a combination of card games and he has not a good reset option for all games.

    Some games have the New Deal option when you right click to start a new game.

    However, on some games have the ability to reset the cumulative Scores. Follow the instructions and check if this.

    (a) click here to open the game.

    (b) press on Windows key + C.

    (c) click settings.

    (d) click on Game Options.

    (e) whether specific game and click reset a cumulative Score .

    Let us know the status of the issue. If you need help, please after return. We will be happy to help you.

  • Select this OPTION to generate XML data from the table using XMLELEMENT, XMLAGG gives error ORA-19011 string buffer too small

    My select statement fails with the error:


    The ORA-19011 string buffer too small


    The select statement looks like:


    SELECT TO_CLOB)

    XMLELEMENT ("accounts",

    XMLELEMENT ("count",

    XMLATTRIBUTES)

    rownum AS "recordId."

    To_date('20130520','YYYYMMDD') AS "datestarted."

    123456 AS "previousBatchId."

    56789 AS 'previousRecordId '.

    ),

    ....

    .... .

    .....

    XMLFOREST)

    SIG_ROLE AS "SignatoryRole."

    To_char(TRANSFER_DATE,'YYYY-mm-DD') AS "TransferDate."

    NVL(Reason,0) AS 'reason '.

    ) AS the 'transfer '.

    )

    ()) AS CRDTRPT

    OF ANY_TABLE;

    • It looks like I can choose only 4000 characters using the SELECT statement (please, correct me if I'm wrong)

    I'd use the XMLGEN package. But the environment team says no mounted drives in the future with the arrival of the EXADATA.

    NO HARD DRIVE MOUNTED, NO ACCESS TO THE DATABASE DIRECTORIES

    No UTL_FILE

    I need to use the REEL spool the resulting XML data of the SELECT query.

    SQL is a standard in my org, but I can do with a PL/SQL solution also to load data into a table (cannot use a COIL with PL/SQL)

    What I do is:

    1. a column of type CLOB to a xml_report of the loading of the above SELECT query table
    2. Then using SELECT * FROM xml_report to SPOOL the data to a file report.xml

    No need of XMLTYPE data behind. Xml data stream is fine for me.

    In addition, I need to validate the XML file, also using XSD.

    Problem is that the resulting lines of the select query are supposed to be from 15000 to 20000 bytes long.

    Oracle database version: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    A Suggestion or a solution to this problem would be appreciated.

    (Sorry for the use of "BOLD", just to make it more readable and highlight the imp points)

    Bravo!

    Rahul

    It looks like I can choose only 4000 characters using the SELECT statement (please, correct me if I'm wrong)

    You use the right method.

    There is an implicit conversion from XMLType to the data type VARCHAR2 as expected by the function TO_CLOB, where the limitation, and the error.

    To serialize XMLType to CLOB, use the XMLSerialize function:

    SELECT XMLSerialize (DOCUMENT

    XMLELEMENT ("accounts",

    ...

    )

    )

    OF ANY_TABLE;

    For the rest of the requirement, I wish you good luck trying to spool the XML correctly.

    You may need to play around with the SET LONG and SET LONGCHUNKSIZE commands to operate.

  • source of XML data in the db column?

    Hello world

    If I want to use XML data as the source of data for BI Publisher, these data can be stored in a column of data

    or do I have to store the data from the source XML files in a file system?

    If it can be stored in a column db - is there something I need to consider regarding the definition of the data source and the creation of the data model?

    Thank you

    Concerning

    Andy

    These data can be stored in a column of data

    or do I have to store the data from the source XML files in a file system?

    Yes

    the data can be stored in

    (1) table xmltype or clob or blob column or...

    so you can analyze this column somehow by xquery or xmltable or...

    (2) in the file of the bone

    bfilename as therapy

    xmltype( bfilename('GET_XML', xmlfilename.xml))
    
  • Filtering XML data in the grid

    I can't sem to figure out how to filter my XML data before entering my data grid. I want to load only the XML data with the ID 'BALUSTER' attribute and have tried to enter:

    data_grid. DataProvider dp =. (@ID IS 'BALUSTER');

    in my function xmlLoaded without success.  I'm fairly new to as3 and could certainly use the help.  Thank you.

    var dpataProvider;
    var products_xml:XML;
    var xmlReq:URLRequest = new URLRequest("data/products.xml");
    var xml_loader:URLLoader = new URLLoader();

    function xmlLoaded(event:Event):void {}
    var ldr:URLLoader = event.currentTarget as URLLoader;
    var xmlDP:XML = new XML (ldr.data);
    DP = new DataProvider (xmlDP);
    data_grid. DataProvider = dp;
    }

    xml_loader. Load (xmlReq);
    xml_loader.addEventListener (Event.COMPLETE, xmlLoaded);

    Assign the filtered data (not the original) to the data provider:

    function xmlLoaded(event:Event):void {}
    var ldr:URLLoader = event.currentTarget as URLLoader;
    var xmlDP:XML = new XML (ldr.data);
       
    var data: XML = ;
        data.setChildren (xmlDP.PRODUCTS. (@ID) IS 'BALUSTER'));
       
    DP = new DataProvider (data);
    data_grid. DataProvider = dp;
    }

  • Catch / know the XML data in the form of PDF (without doing send XML)

    It is possible from a PDF form using get JS / know the XML data in the current form?

    I need to get the same XML data that would be generated with the "export data" function to Adobe Professional.

    THX!

    OK now I get... You can use the command:

    xfa.datasets.data.saveXML ("pretty")

    Paul

  • Insert XML data into the MySQL database

    Hi all, I'm new with XML and I need help with the insertion of XML data in the mysql database using coldfusion. I looked on the Coldfusion Documentation and saw how to convert XML to a Coldfusion query... but there was no example of how to do an insert. If anyone can give me a good example or point me towards a good direction on how to do it, I would really appreciate it.

    Thank you very much in advance
    Alfie

    Nevermind, I finally managed to do work!

  • Extraction of data in the string

    I essentially have the following string

    R8D3YG6YVQ6W0TS1SZD & ReturnURL = 2fJobSeeker % 2fResumes % 2fPostResumeNew % 2fPostResumeReviewOpt % ions.aspx%3fResume_DID%3dR8D3YG6YVQ6W0TS1SZD%26ShowNextWave%3dTrue%26RO%3dpub & pub = RO

    What I want to accomplish is to extract all data to the left of the chain & ReturnURL. Does anyone know how I could get there because the length of the data I want to extract could vary?

    dbranch wrote:
    > I basically the following string
    >
    >
    > R8D3YG6YVQ6W0TS1SZD & ReturnURL = % 2fJobSeeker % 2fResumes % 2fPostResumeNew % 2fPostResum
    > eReviewOptions.aspx%3fResume_DID%3dR8D3YG6YVQ6W0TS1SZD%26ShowNextWave%3dTrue%26R
    > O % 3dpub & pub = RO
    >
    > What I want to accomplish is to extract all data to the left of the chain
    > & ReturnURL. Does anyone know how I could get there because the length
    > data I want to extract could vary?
    >
    >

    a solution would be:
    #left (Votrechaine, find("&ReturnURL=", yourstring)-1) #.

    Another way would be to write a regular expression to even...

    HTH

    --

    Azadi Saryev
    SABAI - Dee.com
    http://www.SABAI-Dee.com

  • Load xml data into the table

    Hi all

    I have an XML (emp.xml) with data below:

    -< root >
    -< row >
    < name > steve < / lastname >
    < 30 > < / Age >
    < / row >
    -< row >
    < name > Paul < / lastname >
    <>26 < / Age >
    < / row >
    < / root >

    I would like to create a stored procedure to store the xml data into the EMP table.

    EMP
    LastName age
    Steve 30
    Paul 26

    I tried to watch all threads related to this forum, but cannot find the right wire. Any help is greatly appreciated. Thank you

    With

    SQL>  select * from xmltable('root/row' passing xmltype('
    
    steve
    30
    
    
    Paul
    26
    
    ') columns lastname path 'lastname',
                       Age path 'Age')
    /
    LASTNAME   AGE
    ---------- ----------
    steve      30
    Paul       26   
    

    You can now just make a

    Insert into emp as select...

  • Extraction of data from the xmlclob attribute

    Hi all

    I am trying to extract the value of the attribute below clob.

    kindly advice how to retrieve the value by using the xml functions.

    I use version 11.2.0 and toad 9 oracle database.

    I've highlighted the comment tag. the highlighted, I need to recover ' time changed according to the dtd VSG mail 25/01/2013 14:27.» SVK, & #xD; & #xA; Recipient added by mail from Richard dtd 20/02/2013 09:45. SVK" of the value attribute.

    Please suggest how to achieve using SQL. Data stored in xml format in the clob column.



    <? XML version = "1.0"? >

    " < ValuationRequest xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "container =" " http://www.w3.org/2001/XMLSchema "ValueID ="169821"Version ="2.6" "

    " xmlns =" http://XBank.FxVals/ProcessValuationRequest.xsd "Status ="AC"> "

    < ValueID '5' = ClientRelationShipType > < / ClientRelationShipType >

    < ValueID owner = '14539"Name ="JEREMY LEVINE"> < / owner >

    < ValueID customer = "6892067" Name = "XXXXXXXXXX, NEW YORK" > < / customer >

    < ValueID = "1" CMVRegion > < / CMVRegion >

    < ValueID = "1" ValuationTypeID > < / ValuationTypeID >

    < CSRContacts >

    < CSRContact Value = "917" Name = "EVALUATIONS NY[valuations.ny@gmail... com]' > < / CSRContact >

    < / CSRContacts >

    < title >

    < ValueID security = PrimaryID "900158" = "NY-518362" ItemLevel = '2' ItemType = "38" >

    "< rank EffectiveDate =" "2013-01 - 24 T 00: 00:00 ' TerminationDate = ' 0001-01 - 01 T 00: 00:00" comments = "" SecurityDetailID = "429190" > < / row >

    < / security >

    < ValueID security = PrimaryID "900158" = "NY-518362" ItemLevel = '1' ItemType = "38" >

    "< rank EffectiveDate =" "2013-01 - 24 T 00: 00:00 ' TerminationDate = ' 0001-01 - 01 T 00: 00:00" comments = "" SecurityDetailID = "429191" > < / row >

    < / security >

    < / securities >

    < created Value = "2013-01 - 24 T 12: 20:48" > < / creation >

    < ValueID '37126' = CreatedBy > < / CreatedBy >

    < LastModified Value = "2013-02 - 21 T 01: 56:00" > < / LastModified >

    < ValueID = '18732' LastModifiedBy > < / LastModifiedBy >

    < ReportDefinition ValueID = "1" > < / ReportDefinition >

    < StartDate = value "2013-01 - 24 T 12: 00:00" > < / StartDate >

    <Comment Value = "time changed according to the dtd VSG mail 25/01/2013 14:27." SVK, & #xD; & #xA; Recipient added by mail from Richard dtd 20/02/2013 09:45. SVK">< / comment >

    < ValueID = "100" PricePercentage > < / PricePercentage >

    < ISDSL Value = "F" > < / ISDSL >

    < ValueID effects = '0' > < / Effects >

    < WorkFlowAction >

    ActiveChangesApproved < action > < / Action >

    < / WorkFlowAction >

    < ValueID = "4" RecertificationFrequency > < / RecertificationFrequency >

    < RecertificationDate Value = "0001-01 - 01 T 00: 00:00" > < / RecertificationDate > "".

    < RecertificationNextDate Value = 'January 24, 2014' > < / RecertificationNextDate >

    < StatementFrequency >

    < SFrequency Value = '1' Type = 'Daily' date limit indicator = "1005" = "F" PDeadline = '990' > < / SFrequency > "

    < / StatementFrequency >

    < value AutoGenerate = "T" > < / AutoGenerate >

    < monetary value = "Us $" > < / currency >

    < SLanguage ValueID = "1" > < / SLanguage >

    < GP2AccountID Value = "480352" > < / GP2AccountID >

    < SalesApproval Value = "F" > < / SalesApproval >

    < RegenerateAfterPartial Value = "F" > < / RegenerateAfterPartial >

    < SalesCoverageTeam >

    < = 'Sales' sales type Value = "14539" NotificationFlag = "N" name ="JEREMY LEVINE [[email protected]]" > < / sales > "

    < / SalesCoverageTeam >

    < OffSystem Value = "F" > < / OffSystem >

    < HolidayCalendar >

    < country value = 'US' > < / country >

    < / HolidayCalendar >

    < GP2AccountStatus Value = "P" > < / GP2AccountStatus >

    < CurrencySecondary / >

    < GP2ParentID Value = '16649' > < / GP2ParentID >

    < StatementPerspective Value = "D" > < / StatementPerspective >

    < DBEntity ValueID = "2" > < / DBEntity >

    < ValueID DisplayClientName = "6892067" Name = "XXXXXXX, NEW YORK" > < / DisplayClientName >

    < FXRates >

    < FXRate >

    < of Value = "EUR" > < / From >

    < value = "Us $" > < /pour >

    < / FXRate >

    < / FXRates >

    < ShowFXRates Value = "T" > < / ShowFXRates >

    < OfficialMTMs Value = "F" > < / OfficialMTMs >

    < ExcludeStructuredTrades Value = "F" > < / ExcludeStructuredTrades >

    < ValueID = "1" DisclaimerID > < / DisclaimerID >

    < TradeRisk Value = "F" > < / TradeRisk >

    < MTMsInTradeCurrency Value = "F" > < / MTMsInTradeCurrency >

    < / ValuationRequest >

    Thanks in advance.

    with t as)

    Select xmltype (')

    http://www.w3.org/2001/XMLSchema-instance"container ="http://www.w3.org/2001/XMLSchema"ValueID ="169821"Version ="2.6"xmlns ="http://XBank.FxVals/ProcessValuationRequest.xsd"Status ="AC">

    ActiveChangesApproved

    [email protected]]">

    ') double x

    )

    Select comment_text

    t,.

    XMLTable)

    XmlNamespaces (default 'http://XBank.FxVals/ProcessValuationRequest.xsd'),

    «ValuationRequest / / comment»

    go x

    columns

    comment_text varchar2 (200) path "@Value"

    )

    /

    COMMENT_TEXT
    --------------------------------------------------------------------------------------------------------------------------------------
    Time changed according to the dtd VSG mail 25/01/2013 14:27. Beneficiary SVK added according to mail from Richard dtd 20/02/2013 09:45. SVK

    SQL >

    SY.

  • Using EXTRACT XML data extraction

    Hi, I have a XML file where I want to analyze the fields in a table in DB:

    <? XML version = "1.0" encoding = "UTF-8"? >
    < FIXML > < batch > < MktDataFull BizDt = '2012-07-13' > < Instrmt Sym = "JCPRXU" ID = "JCPRXU" Desc = "JCP.SR. XR. «USD"SecTyp ="CD"Src ="H"subtype = MMY" S "="201209"MatDt = ' 2012-09-20" Mult = Exch "0.01" = "CMD" UOM = "CTL" UOMCcy = "USD" UOMQty = "1" PxUOM = "IPNT" ValMeth = "CD" CpnRt = "1.0" IntAcrl = ' 2012-06-20 ' CpnPmt = ' 2012-09-20 ' NotnlPctOut = "100.0" Snrty = 'SR' RstrctTyp = 'XR' DayCntMeth = "ACT/360" tenor = "0 M" > < DITTA HELP = "US708130AC31" AltIDSrc = "105" / > < HELP AltID = "JCP.SR." "" ""» XR. USD.12U.100"AltIDSrc ="101"/ > < HELP DITTA = '1 201209 JCPRXU' AltIDSrc = 'H' / > < DITTA HELP ="1 201209 JCPRXU"AltIDSrc ="100"/ > < Evnt EventTyp ="5"Dt ="2008-09-19"/ > < Evnt EventTyp = '7' Dt = '2012-09-19' / > < Evnt EventTyp ="19"Dt ="2012-10-05"/ > < Evnt EventTyp ="100"Dt ="2012-07-16"/ > < Evnt EventTyp = '8' Dt ="2012-07-14"/ > < Evnt EventTyp = '9' Dt = '2012-09-20' / > < Evnt EventTyp ="101"Dt = '2012-03-20' / > < Evnt EventTyp ="102"Dt ="2008-09-20"/ > < Evnt EventTyp = « 103 » Dt = « 2008-09-22 » / >< Evnt EventTyp = « 104 » Dt = « 2012-09-19 » / >< Evnt EventTyp = « 111 » Dt = « 2012-09-20 » / >< Evnt EventTyp = « 112 » Dt = « 2012-06-20 » / >< Evnt EventTyp = « 113 » Dt = « 2012-03-20 » / >< Evnt EventTyp = « 114 » Dt = « 2012-07-12 » / >< Evnt EventTyp = « 115 » Dt = « 2012-07-16 » / >< / Instrmt >< complet Typ = « 6 » Px = Mkt « 99.7433368 » = « CMD » QCond = « 6 » PxTyp = « 1 » OpenClsSettlFlag = « 1 » >< / Full >< complet Typ = « 6 » Px = « 234.5254 » Mkt = QCond « CMD » = « 6 » PxTyp = « 6 » ' OpenClsSettlFlag = '1' > < / Full > < full Typ = "Y" Px = Mkt "40.0" = 'CMD' PxTyp = '1' OpenClsSettlFlag = '1' > < / Full > < full Typ = '6' Px = "234.5212" Mkt = QCond 'CMD' = '7' PxTyp = '6' OpenClsSettlFlag = '1' > < / Full > < full Typ = Mkt "B" = 'CMD' OpenClsSettlFlag = '4' Sz = '0' > < / Full > < full type = 'C' Mkt = 'CMD' OpenClsSettlFlag = '4' Sz = '0' > < / Full > < full Typ = 'z' Px = Mkt '0.18' = 'CMD' PxTyp = '1' OpenClsSettlFlag = '1 '. > < / full > < full Typ = 'y' Px = "0.1899965" Mkt = QCond 'CMD' = '6' PxTyp = '5' OpenClsSettlFlag = '1' > < / Full > < InstrmtExt > < Attrb Typ = '100' Val = '24' / > < Attrb Typ = '101' Val = '0' / > < Attrb Typ = '109' Val = '0' / > < Attrb Typ = '103' Val = '24' / > < Attrb Typ = '102' Val = '24' / > < Attrb Typ = '110' Val = '3' / > < Attrb Typ = '29' Val = 'Y' / > < Attrb Typ = '112' Val = 'Y ' /. > < / InstrmtExt > < / MktDataFull > < / batch > < / FIXML >


    Right now, I'm just trying to extract the first 3 fields, BizDt, Bal and id I use to analyze the following:


    SELECT
    Extract (value (p), '/BizDt') .getStringVal () AS DATE_,.
    Extract (value (p), ' /Instrmt/Sym').getStringVal (AS SYMBOL),)
    Extract (value (p), ' /Instrmt/ID').getStringVal () AS ID_)

    OF s TABLE_NAME.
    TABLE (XMLSEQUENCE (Extract (xmlType.createXml (s.CDS_CLOB), ' FIXML/batch/MktDataFull / *'))) p
    WHERE s.ID_ = 1

    But I get nothing back. My guess is the because the XML data does not have opening tags and formal closing, because if I change my XML like this:

    <? XML version = "1.0" encoding = "UTF-8"? >
    < FIXML > < batch > < MktDataFull > < BizDt > 2012 - 07 - 13 < / BizDt > < Instrmt > < Sym > JCPRXU < / Sym > < ID > JCPRXU < /ID > < Desc > JCP.SR. XR. USD < / Desc > < SecTyp > CD < / SecTyp > < / Instrmt > < / MktDataFull > < / batch > < / FIXML >

    I was able to get the data. Therefore, in order so solve this problem, what should I do with my original XML? Can I format the tags?

    Thank you

    When you nest xsl: for each of the elements, the select expression is evaluated in the context of the enclosing instance.

    Consider this:

    
      
    

    This means you are trying to match items complete as children Instrmt, that is not correct, because they are actually siblings.
    In the same goes for HELP, Evnt etc.

    I don't know what kind of structure you want.
    Caps all does not much sense given that groups of brothers of repeat items that have no apparent correlation between them. Essentially, you end up with a big Cartesian product.

    I would approach this by storing repeated elements in different tables with a parent/child relationship to preserve the hierarchical nature of the data (if necessary).

  • Extracting XML data limit?

    Hi all

    Can someone help with the data limit for retrieving XML from a text field?

    Scenario: I have a text field with the limit set for the 1000 characters. Can you please let me know if there is any limitation extracting XML with a text field with 1000 characters?


    Thank you
    Yassine

    Hi John,

    I have not met a deadline, I had 8000-character text fields (as much as can fit on an A4 page) and I had pictures of 4 MB in a data node.

    Concerning

    Bruce

  • XML data in the mapping

    OK, so I ran into a number of simple examples and they all do everything that I have and they are all very very few lines of code. Unfortunately they don't work... not for me.

    everything I'm tryign to do is get the XML data in my tables. Note: I tried XMLListcollection as well as collection ArrayCollection and they both give the same error. I hope you guys can help.

    When I run the present I get an error of 1096 found flash.xml.XMLNode property data and there is no default value.

    I'm sure it's to find the "Data.xml" because it prints the file in the text field.

    Here is "Data.xml"

    I have it

    resultFormat = "xml".

    should be

    resultFormat ="object"

  • Extracting XML error. The XML file that is assigned in the configuration.xml is either incorrect or damaged.

    1. some web pages gives "error extracting XML. The XML file that is assigned in the configuration.xml is wrong or corrupt.

    2 Youtube gives, after having pressed the button start, message "an error has occurred. Please try again later.
    Even youtube opening page with IE, there is no problem.

    3. scrolling on Mozilla firefox pages only works with the sidebar not with the mouse wheel.

    Other user accounts on this computer is not these problems.

    BR Juha

    This can be caused by a recent update of Flash 11.3.

    See:

Maybe you are looking for

  • HPSTREAM 11-00 MOBILE: storage

    Why my storage space increased from 28 GB up to 1.65 when I've not much stored on my laptop, it's because I've upgraded to windows 10 and which takes up most of my space? If so how do I go back to windows 8.1?

  • Satellite L40 - 17Q - Windows XP says that there is no HARD drive

    Hello I want to install XP, but it is said that there is no HARD drive. Already tried nLite, but no result. I have Satellite L40 - 17Q and I'm under Win. 7.What can I do? Thank you

  • Why won't MSN fix feat "dropout" of Backgammon to the game MSN Zone?

    I have pondered this mystery for years, especially since their the Gaming area 2005 upgrade. It seems to me if you are willing to make this kind of improvement to the game Zone, you would find the value in the pursuit of improvements.   I guess that

  • printers Windows 7

    I have a new windows seven3250 series small laptop printer and would like to know if there is a driver I could load into my office windows 8 to load the disc and is it there, thanks for any help

  • Update the Bootloader failed SG300

    Hello I just got a SG300-10, and I've tried the firmware update and the boot loader. now im stuck with this:SW version 1.3.7.18 (date of 12 January 2014 time 18:02:59)Start the 1.1.0.6 version (date may 11, 2011 time 18:31)HW version V02 I tried to u