How to parse this kind of XML documents and store in a relational tables

Can u guys help me out ,..how to parse these kind of XML documents..like under PR there Sr,CreationDate and DoBID.. Again under Sr...there are LD, CID,TID, RID and so on.....
so how to parse this kind of data..how to create the structure of the table....pls help me out..
<nk8:PR>
          <nk8:Sr>
               <nk8:LD>---------</nk8:LID>
               <nk8:CID>---------</nk8:CID>
               <nk8:TID>---------</nk8:TID>
               <nk8:RID>---------</nk8:RID>
               <nk8:CC>OnError</nk8:CC>
               <nk8:AID>---------</nk8:AID>
          </nk8:Sr>
          <nk8:CreationDateTime>2002-07-01</nk8:CreationDateTime>
          <nk8:DOBID>---------</nk8:DOBID>
     </nk8:PR>
     <ssm:ER>
          <ssm:PN>---------</ssm:PN>
          <ssm:SN>---------</ssm:SN>
          <ssm:SCt>---------</ssm:SC>
          <ssm:IA>
               <ssm:NT>---------</ssm:NT>
               <nk8:LID>---------</nk8:LID>
               <nk8:CID>---------</nk8:CID>
               <ssm:AN>---------</ssm:AN>
          </ssm:A>
     </ssm:ER>
     </nk8:PR>

First, your XML document is not well formatted. Once you're done with that you can extract the values and store it in a table column.
sql> WITH xml_table AS
  2  (SELECT XMLTYPE(
  3  '
  4  <nk8:PR xmlns:nk8="http://www.w3.org">
  5  <nk8:Sr>
  6  <nk8:LID>LID Value</nk8:LID>
  7  <nk8:CID>CID Value</nk8:CID>
  8  <nk8:TID>TID Value</nk8:TID>
  9  <nk8:RID>RID Value</nk8:RID>
10  <nk8:CC>OnError</nk8:CC>
11  <nk8:AID>---------</nk8:AID>
12  </nk8:Sr>
13  </nk8:PR>') XMLCOL FROM DUAL)
14  SELECT extractvalue(t.column_value,'//nk8:LID','xmlns:nk8="http://www.w3.org"') "LID",
15   extractvalue(t.column_value,'//nk8:CID','xmlns:nk8="http://www.w3.org"') "CID",
16   extractvalue(t.column_value,'//nk8:RID','xmlns:nk8="http://www.w3.org"') "RID",
17  extractvalue(t.column_value,'//nk8:CC','xmlns:nk8="http://www.w3.org"') "CC"
18  FROM xml_table, table(xmlsequence(extract(xmlcol,'/nk8:PR/nk8:Sr','xmlns:nk8="http://www.w3.org"'))) t;
LID        CID        RID        CC
LID Value  CID Value  RID Value  OnError

Similar Messages

  • Convert flat file to XML document and store into Oracle database

    First:
    I have a flatfile and created external table to read that file in Oracle
    Now I want to create an XML document for each row and insert into Oracle database, I think that XMLtype.
    Could you please provide me some information/steps.
    Second:
    Is there performance issues, because everyday I need to check that XML document stored in the database against the in coming file.
    Thank You.

    Oracle 11g R2 Sun Solaris
    Flat file is | (pipe delimited), so I did create an EXTERNAL Table
    row1     a|1|2|3|4
    row2     b|2|3|4|5
    row3     c|6|7|8|9
    I want to store each record as XML document. So it will be easy to compare with next day's load and make insert or update.
    The reason is:
         First day the file comes with 5 columns
         after some days, the file may carry on some additional columns more than 5
         In this case I do not want to alter table to capture those values, if I use XML than I can capture any number of columns, CORRECT!. Please make me correct If I am wrong.
         This is the only reason to try to use the XMLType (XML Document)
         On Everyday load we will be matching these XML documents and update it if there is any column's value changes
    daily average load will be 10 millions and initial setup will be 60-80 millions
         Do I have anyother option to capture the new values without altering the table.
    Please advise!.

  • How to parse XML Column and insert values into a table

    Hello,
    I am working on a simple project to demonstrate how to load and extract XML using SQL, I have already made a table that contains a column of XMLTYPE and loaded an XML file into it (code below)
    create or replace directory XMLSRC as 'C:\XMLSRC';
    drop table Inventory;
    create table Inventory(Inv XMLTYPE);
    INSERT INTO Inventory VALUES (XMLTYPE(bfilename('XMLSRC', 'Inventory.xml'),nls_charset_id('AL32UTF')));
    select * from Inventory;
    I now however need to get the XML data back out of that and loaded into a new table. Troubleshooting guides I have read online seem to only be dealing with parsing an external XML document and loading it into a table, and not what I need to do which is parse a column of XML data and load that into a table. The project trivial with simple tables containing only 3 columns.
    The table that needs to be loaded is as follows:
    create table InventoryOut(PartNumber Number(10), QTY Number(10), WhLocation varchar2(500));
    The XML document is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Inventory.xsd" generated="2012-04-09T17:36:30">
    <Inventory>
    <PartNumber>101</PartNumber>
    <QTY>12</QTY>
    <WhLocation>WA</WhLocation>
    </Inventory>
    </dataroot>
    Thank you for any help you can offer.

    First of all, thank you for your help!! Still stunned that you actually took the time to write out an eample using my tables/names/etc. Thank you!!
    Attached is the code, there seems to be an issue with referencing the other table, Inventory.Inv, I checked and that table and the Inv column are showing up in the database so I am not sure why it is having issues locating them, take a look at the code I wrote as well as the output (*I included the real version number for you this time :)
    EDIT: In your code right here:
    select xt.*
    3 from Inventory inve,
    4 XMLTable('/dataroot/Inventory'
    5 PASSING inve.Inv
    I think is where I am messing it up, perhaps not understanding fully what is going on, as you write "Inventory inve" and "inve.Inv" ---- Is inve a keyword that I am just not familiar with? I think this is where the issues lies in my code.
    END EDIT
    EDIT2: Well that looks like it was it, changed that to how you have it and it now works!!! Could you please explain what that few lines is doing, and what the xt.* and inve are doing? Thanks again!!!
    END EDIT2
    drop table InventoryOut;
    create table InventoryOut (PartNumber number(10), QTY number(10), WhLocation varchar2(500));
    insert into InventoryOut (PartNumber, QTY, WhLocation)
    select xt.*
    from Inventory Inv,
    XMLTable('/dataroot/Inventory'
    PASSING Inventory.Inv COLUMNS
    PartNumber number path 'PartNumber',
    QTY number path 'QTY',
    WhLocation path 'WhLocation')xt;
    select * from InventoryOut;
    select * from v$version;
    table INVENTORYOUT dropped.
    table INVENTORYOUT created.
    Error starting at line 4 in command:
    insert into InventoryOut (PartNumber, QTY, WhLocation)
    select xt.*
    from Inventory Inv,
    XMLTable('/dataroot/Inventory'
    PASSING Inventory.Inv COLUMNS
    PartNumber number path 'PartNumber',
    QTY number path 'QTY',
    WhLocation path 'WhLocation')xt
    Error at Command Line:8 Column:12
    Error report:
    SQL Error: ORA-00904: "INVENTORY"."INV": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    *Cause:   
    *Action:
    PARTNUMBER QTY WHLOCATION
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    If this helps here is the code and output for the creation of the Inventory table itself:
    create or replace directory XMLSRC as 'C:\XMLSRC';
    drop table Inventory;
    create table Inventory(Inv XMLTYPE);
    INSERT INTO Inventory VALUES (XMLTYPE(bfilename('XMLSRC', 'Inventory.xml'),nls_charset_id('AL32UTF')));
    select * from Inventory;
    directory XMLSRC created.
    table INVENTORY dropped.
    table INVENTORY created.
    1 rows inserted.
    INV
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Inventory.xsd" generated="2012-04-09T17:36:30">
    <Inventory>
    <PartNumber>101</PartNumber>
    <QTY>12</QTY>
    <WhLocation>WA</WhLocation>
    </Inventory>
    </dataroot>
    Thanks again for your help so far! Hope we can get this working :)
    Edited by: 926502 on Apr 11, 2012 2:47 PM
    Edited by: 926502 on Apr 11, 2012 2:49 PM
    Edited by: 926502 on Apr 11, 2012 2:54 PM
    Edited by: 926502 on Apr 11, 2012 2:54 PM
    Updated issue to solved - Edited by: 926502 on Apr 11, 2012 2:55 PM

  • How can I define an XML schema for this kind of XML

    Hi, There:
    I want to generate an XML file like:
    <customer>
    </customer>
    <transaction>
    </transaction>
    <customer>
    </customer>
    which have multiple customer elements and multiple transactions as well, and they can happen in mixed sequence. Can any one give me some idea about how can I create an XML schema for this kind of xml? (<xsd:complextype> <xsd:sequence> ) seems not work)
    Thanks in advance
    David

    Use a group then make it a choice, like this;
    <xs:element name="Parent">
    <xs:complexType>
    <xs:group ref="Group" minOccurs="1" maxOccurs="unbounded" />
    </xs:complexType>
    </xs:element>
    <xs:group name="Group">
    <xs:choice>
    <xs:element ref="OptionOne" type="xs:string" />
    <xs:element ref="OptionTwo" />
    </xs:choice>
    </xs:group>
    <xs:element name="OptionOne">
    <xs:complexType>
    <xs:attribute name="name" type="xs:string" />
    <xs:attribute name="Type" type="xs:string" />
    </xs:complexType>
    </xs:element>
    <xs:element name="OptionTwo">
    <xs:complexType>
    <xs:attribute name="name" type="xs:string" />
    <xs:attribute name="Type" type="xs:string" />
    </xs:complexType>
    </xs:element>
    This allows XML like this
    <Parent>
    <OptionTwo ........ />
    <OptionOne ........ />
    <OptionTwo ........ />
    <OptionOne ........ />
    <OptionOne ........ />
    </Parent>
    HH

  • How can  parse this xml tag " Cell ID="0" Type="String" Afghanistan cell "

    Hi,
    I have to parse this type of xml file.
    so how can i parse this type of xml file like
    <Row ID="1">
    <Cell ID="0" Type="String" >Afghanistan</Cell>
    <Cell ID="1" Type="Number" >93</Cell>
    <Cell ID="2" Type="Number" >0</Cell>
    <Cell ID="3" Type="Number" >1</Cell>
    </Row>

    You haven't given us enough information. Is this for iPhone or Mac OS X? What language are you using? etc.

  • Parse an Aggregate in XML Document using PL/SQL

    Hi. I've been successful with parsing a TAG in XML Document stored in CLOB using PL/SQL XML Parser.
    However, I need help on how to get the whole aggregate in XML Document stored in CLOB.
    sample XML Doc :
    <library>
    <book>
    <title>Oracle Complete Reference</title>
    <author>Kevin</Author>
    <year>2000</year>
    </book>
    <video>
    <title>Learning C++</title>
    <length>2 hours</length>
    <video>
    </library>
    I need a function that will accept an Input which is the aggregate name and will return the aggregate value.
    With the sample XML above, say the input is 'VIDEO', the function will return :
    <video>
    <title>Learning C++</title>
    <length>2 hours</length>
    <video>
    I'll really appreciate any help.
    null

    I used such an example to parse several Varchar2 strings in a given DB session:
    BEGIN
    parser := xmlparser.newparser ;
    xmlparser.parsebuffer(parser,xmlout) ;
    domdoc := xmlparser.getDocument(parser) ;
    xmlparser.FREEPARSER(parser) ;
    parser.id := -1 ;
    nodes := xslprocessor.selectNodes(
    xmldom.makenode(domdoc),
    'Positionen/Position') ;
    for i in 1 .. xmldom.getLength(nodes) loop
    node := xmldom.item(nodes,i-1) ;
    -- do s/thing with the node
    end loop ;
    xmldom.freedocument(domdoc) ;
    RETURN(komponenten) ;
    EXCEPTION
    WHEN OTHERS THEN
    if parser.id <> -1 then xmlparser.freeparser(parser) ;
    end if ;
    if domdoc.id <> -1 then xmldom.freedocument(domdoc) ;
    end if ;
    RAISE ;
    END ;
    However, after about 2000 of nodes lists parsed, I get an ArrayIndexOutOfBoundsException from XMLNodeCover. Obviously, I should release the nodes or the nodelist, but I have not found any procedure to do this.
    Pascal

  • Why is oracle limited appropriate to save any kind of xml documents

    hey,
    currently i´m student of health informatics in dortmund (germany)
    our next test is about oracle database.
    i do now know a lot about it.
    but there is one open question and noone can give me an answare...
    why is oracle limited appropriate to save any kind of xml documents?
    the only thing i know is that you can save xml documents native als xmltype or you can use
    xml repository...
    but ??? please help me, i think for you its just a question like hows the weather...
    thank you very much.
    greetings from germany,
    mathias
    Edited by: user8643284 on 19.07.2009 06:20

    XML documents may be saved in Oracle database with the XDK or XML documents may be stored in Oracle XML DB.
    For storing an XML document in Oracle database with the XML SQL Utility pease refer
    http://www.devx.com/xml/Article/32046
    For storing an XML document in Oracle XML DB please refer
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb03usg.htm

  • I am working with Acrobat XI and when I try to add text to geopdf file I get a popup screen that says this is a secured document and editing is not permitted. How do I fix this?

    I am working with Acrobat XI and when I try to add text to a geopdf file I get a popup screen that says this is a secured document and editing is not permitted. How do I fix this?

    I figured it out...needed to use comment tool set, not the editing tool set.

  • How to process such kind of XML data?

    Hi gurus,
    I need your help in processing this kind of XML data. Please note the ns# value can go up all the way to the 1000's. Thanks.
    <AllStatuteQueryResponse xmlns="http://crimnet.state.mn.us/mnjustice/statute/service/3.0">
    <ns1:Statutes xmlns:ns1="http://crimnet.state.mn.us/mnjustice/statute/messages/3.0">
    <ns1:Statutes>
    <ns2:StatuteId xmlns:ns2="http://crimnet.state.mn.us/mnjustice/statute/3.0">1</ns2:StatuteId>
    <ns3:Chapter xmlns:ns3="http://crimnet.state.mn.us/mnjustice/statute/3.0">84</ns3:Chapter>
    <ns4:Section xmlns:ns4="http://crimnet.state.mn.us/mnjustice/statute/3.0">82</ns4:Section>
    <ns5:Subdivision xmlns:ns5="http://crimnet.state.mn.us/mnjustice/statute/3.0">1a</ns5:Subdivision>
    <ns6:Year xmlns:ns6="http://crimnet.state.mn.us/mnjustice/statute/3.0">0</ns6:Year>
    <ns7:LegislativeSessionCode xmlns:ns7="http://crimnet.state.mn.us/mnjustice/statute/3.0">
    <ns7:StatuteCode>
    <ns7:code>4</ns7:code>
    <ns7:description>4</ns7:description>
    </ns7:StatuteCode>
    </ns7:LegislativeSessionCode>
    <ns8:SessionTextIndicator xmlns:ns8="http://crimnet.state.mn.us/mnjustice/statute/3.0">false</ns8:SessionTextIndicator>
    <ns9:HeadNoteIndicator xmlns:ns9="http://crimnet.state.mn.us/mnjustice/statute/3.0">false</ns9:HeadNoteIndicator>
    <ns10:EffectiveDate xmlns:ns10="http://crimnet.state.mn.us/mnjustice/statute/3.0">1859-01-01</ns10:EffectiveDate>
    <ns11:EnactmentDate xmlns:ns11="http://crimnet.state.mn.us/mnjustice/statute/3.0">1859-01-01</ns11:EnactmentDate>
    <ns12:RepealedIndicator xmlns:ns12="http://crimnet.state.mn.us/mnjustice/statute/3.0">false</ns12:RepealedIndicator>
    <j:DocumentLocationURI xmlns:j="http://www.it.ojp.gov/jxdm/3.0.2">
    <j:ID xsi:type="j:TextType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">http://www.revisor.leg.state.mn.us/stats/84/82.html</j:ID>
    </j:DocumentLocationURI>
    <ns13:SummaryDescriptionText xmlns:ns13="http://crimnet.state.mn.us/mnjustice/statute/3.0">Snowmobiles-Snowmobile registration</ns13:SummaryDescriptionText>
    <ns14:StatuteFunction xmlns:ns14="http://crimnet.state.mn.us/mnjustice/statute/3.0">
    <ns14:StatuteIntegrationId>1</ns14:StatuteIntegrationId>
    <ns14:FunctionCode>
    <ns14:StatuteCode>
    <ns14:code>1</ns14:code>
    <ns14:description>Charge</ns14:description>
    </ns14:StatuteCode>
    </ns14:FunctionCode>
    <ns14:CrimeOfViolenceIndicator>false</ns14:CrimeOfViolenceIndicator>
    <ns14:EnhanceableIndicator>false</ns14:EnhanceableIndicator>
    <ns14:TargetedMisdemeanorIndicator>false</ns14:TargetedMisdemeanorIndicator>
    <ns14:RegisterableOffenseIndicator>false</ns14:RegisterableOffenseIndicator>
    <ns14:JuvenileOnlyIndicator>false</ns14:JuvenileOnlyIndicator>
    <ns14:MandatoryAppearanceIndicator>false</ns14:MandatoryAppearanceIndicator>
    <ns14:OffenseLevelCode>
    <ns14:StatuteCode>
    <ns14:code>PM</ns14:code>
    <ns14:description>Petty Misdemeanor</ns14:description>
    </ns14:StatuteCode>
    </ns14:OffenseLevelCode>
    <ns14:GeneralOffenseCode>
    <ns14:StatuteCode>
    <ns14:code>4</ns14:code>
    <ns14:description>DWI/Traffic/Vehicle Regulation</ns14:description>
    </ns14:StatuteCode>
    </ns14:GeneralOffenseCode>
    <ns14:DetailedOffenseCode>
    <ns14:StatuteCode>
    <ns14:code>499</ns14:code>
    <ns14:description>Traffic/Transportation</ns14:description>
    </ns14:StatuteCode>
    </ns14:DetailedOffenseCode>
    <ns14:OffenseSummaryCode>
    <ns14:StatuteCode>
    <ns14:code>J</ns14:code>
    <ns14:description>Traffic/Accidents(exclude DWI)</ns14:description>
    </ns14:StatuteCode>
    </ns14:OffenseSummaryCode>
    <ns14:OffenseSummarySeverityLevelCode>
    <ns14:StatuteCode>
    <ns14:code>28</ns14:code>
    <ns14:description>Rank 28</ns14:description>
    </ns14:StatuteCode>
    </ns14:OffenseSummarySeverityLevelCode>
    </ns14:StatuteFunction>
    <ns15:StatuteFunction xmlns:ns15="http://crimnet.state.mn.us/mnjustice/statute/3.0">
    <ns15:StatuteIntegrationId>2</ns15:StatuteIntegrationId>
    <ns15:FunctionCode>
    <ns15:StatuteCode>
    <ns15:code>1</ns15:code>
    <ns15:description>Charge</ns15:description>
    </ns15:StatuteCode>
    </ns15:FunctionCode>
    <ns15:CrimeOfViolenceIndicator>false</ns15:CrimeOfViolenceIndicator>
    <ns15:EnhanceableIndicator>false</ns15:EnhanceableIndicator>
    <ns15:TargetedMisdemeanorIndicator>false</ns15:TargetedMisdemeanorIndicator>
    <ns15:RegisterableOffenseIndicator>false</ns15:RegisterableOffenseIndicator>
    <ns15:JuvenileOnlyIndicator>false</ns15:JuvenileOnlyIndicator>
    <ns15:MandatoryAppearanceIndicator>false</ns15:MandatoryAppearanceIndicator>
    <ns15:OffenseLevelCode>
    <ns15:StatuteCode>
    <ns15:code>M</ns15:code>
    <ns15:description>Misdemeanor</ns15:description>
    </ns15:StatuteCode>
    </ns15:OffenseLevelCode>
    <ns15:GeneralOffenseCode>
    <ns15:StatuteCode>
    <ns15:code>4</ns15:code>
    <ns15:description>DWI/Traffic/Vehicle Regulation</ns15:description>
    </ns15:StatuteCode>
    </ns15:GeneralOffenseCode>
    <ns15:DetailedOffenseCode>
    <ns15:StatuteCode>
    <ns15:code>499</ns15:code>
    <ns15:description>Traffic/Transportation</ns15:description>
    </ns15:StatuteCode>
    </ns15:DetailedOffenseCode>
    <ns15:OffenseSummaryCode>
    <ns15:StatuteCode>
    <ns15:code>J</ns15:code>
    <ns15:description>Traffic/Accidents(exclude DWI)</ns15:description>
    </ns15:StatuteCode>
    </ns15:OffenseSummaryCode>
    <ns15:OffenseSummarySeverityLevelCode>
    <ns15:StatuteCode>
    <ns15:code>28</ns15:code>
    <ns15:description>Rank 28</ns15:description>
    </ns15:StatuteCode>
    </ns15:OffenseSummarySeverityLevelCode>
    </ns15:StatuteFunction>
    </ns1:Statutes>
    <ns1:Statutes>
    <ns16:StatuteId xmlns:ns16="http://crimnet.state.mn.us/mnjustice/statute/3.0">2</ns16:StatuteId>
    <ns17:Chapter xmlns:ns17="http://crimnet.state.mn.us/mnjustice/statute/3.0">219</ns17:Chapter>
    <ns18:Section xmlns:ns18="http://crimnet.state.mn.us/mnjustice/statute/3.0">383</ns18:Section>
    <ns19:Subdivision xmlns:ns19="http://crimnet.state.mn.us/mnjustice/statute/3.0">3</ns19:Subdivision>
    <ns20:Year xmlns:ns20="http://crimnet.state.mn.us/mnjustice/statute/3.0">0</ns20:Year>
    <ns21:LegislativeSessionCode xmlns:ns21="http://crimnet.state.mn.us/mnjustice/statute/3.0">
    <ns21:StatuteCode>
    <ns21:code>4</ns21:code>
    <ns21:description>4</ns21:description>
    </ns21:StatuteCode>
    </ns21:LegislativeSessionCode>
    <ns22:SessionTextIndicator xmlns:ns22="http://crimnet.state.mn.us/mnjustice/statute/3.0">false</ns22:SessionTextIndicator>
    <ns23:HeadNoteIndicator xmlns:ns23="http://crimnet.state.mn.us/mnjustice/statute/3.0">false</ns23:HeadNoteIndicator>
    <ns24:EffectiveDate xmlns:ns24="http://crimnet.state.mn.us/mnjustice/statute/3.0">1859-01-01</ns24:EffectiveDate>
    <ns25:EnactmentDate xmlns:ns25="http://crimnet.state.mn.us/mnjustice/statute/3.0">1859-01-01</ns25:EnactmentDate>
    <ns26:RepealedIndicator xmlns:ns26="http://crimnet.state.mn.us/mnjustice/statute/3.0">false</ns26:RepealedIndicator>
    <j:DocumentLocationURI xmlns:j="http://www.it.ojp.gov/jxdm/3.0.2">
    <j:ID xsi:type="j:TextType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">http://www.revisor.leg.state.mn.us/stats/219/383.html</j:ID>
    </j:DocumentLocationURI>
    <ns27:SummaryDescriptionText xmlns:ns27="http://crimnet.state.mn.us/mnjustice/statute/3.0">Railroads-Railroad Equipment Block Crossing More Than 10 Minutes</ns27:SummaryDescriptionText>
    <ns28:StatuteFunction xmlns:ns28="http://crimnet.state.mn.us/mnjustice/statute/3.0">
    <ns28:StatuteIntegrationId>3</ns28:StatuteIntegrationId>
    <ns28:FunctionCode>
    <ns28:StatuteCode>
    <ns28:code>1</ns28:code>
    <ns28:description>Charge</ns28:description>
    </ns28:StatuteCode>
    </ns28:FunctionCode>
    <ns28:CrimeOfViolenceIndicator>false</ns28:CrimeOfViolenceIndicator>
    <ns28:EnhanceableIndicator>false</ns28:EnhanceableIndicator>
    <ns28:TargetedMisdemeanorIndicator>false</ns28:TargetedMisdemeanorIndicator>
    <ns28:RegisterableOffenseIndicator>false</ns28:RegisterableOffenseIndicator>
    <ns28:JuvenileOnlyIndicator>false</ns28:JuvenileOnlyIndicator>
    <ns28:MandatoryAppearanceIndicator>false</ns28:MandatoryAppearanceIndicator>
    <ns28:OffenseLevelCode>
    <ns28:StatuteCode>
    <ns28:code>PM</ns28:code>
    <ns28:description>Petty Misdemeanor</ns28:description>
    </ns28:StatuteCode>
    </ns28:OffenseLevelCode>
    <ns28:GeneralOffenseCode>
    <ns28:StatuteCode>
    <ns28:code>4</ns28:code>
    <ns28:description>DWI/Traffic/Vehicle Regulation</ns28:description>
    </ns28:StatuteCode>
    </ns28:GeneralOffenseCode>
    <ns28:DetailedOffenseCode>
    <ns28:StatuteCode>
    <ns28:code>499</ns28:code>
    <ns28:description>Traffic/Transportation</ns28:description>
    </ns28:StatuteCode>
    </ns28:DetailedOffenseCode>
    <ns28:OffenseSummaryCode>
    <ns28:StatuteCode>
    <ns28:code>J</ns28:code>
    <ns28:description>Traffic/Accidents(exclude DWI)</ns28:description>
    </ns28:StatuteCode>
    </ns28:OffenseSummaryCode>
    <ns28:OffenseSummarySeverityLevelCode>
    <ns28:StatuteCode>
    <ns28:code>28</ns28:code>
    <ns28:description>Rank 28</ns28:description>
    </ns28:StatuteCode>
    </ns28:OffenseSummarySeverityLevelCode>
    </ns28:StatuteFunction>
    </ns1:Statutes>
    </AllStatuteQueryResponse>
    Thanks!
    Ben

    Hi Mark, please help me again.
    This is what I did and I don't get any data out.
    declare
              cursor c_xmls is
              select cs.*
              from
              xmltable
                   xmlnamespaces
                        'http://crimnet.state.mn.us/mnjustice/statute/service/3.0' as "cx",
                        'http://crimnet.state.mn.us/mnjustice/statute/messages/3.0' as "ns",
                        'http://crimnet.state.mn.us/mnjustice/statute/3.0' as "cs"
                   '/cx:AllStatuteQueryResponse/ns:Statutes'
                   passing v_xml
                   columns
                   StatuteID     number     path '//Statutes/StatuteId'
              ) cs;     
         begin
              dbms_output.put_line('Processing started here');
              for c_sid in c_xmls loop
                   dbms_output.put_line(c_xmls%rowCount || ' ID = ' || c_sid.StatuteId);
              end loop;
         end;
    But if I use this (added the cs prefix) I get the error LPX-00601: Invalid token in: '//cs:Statutes/cs:StatuteId'
    declare
              cursor c_xmls is
              select cs.*
              from
              xmltable
                   xmlnamespaces
                        'http://crimnet.state.mn.us/mnjustice/statute/service/3.0' as "cx",
                        'http://crimnet.state.mn.us/mnjustice/statute/messages/3.0' as "ns",
                        'http://crimnet.state.mn.us/mnjustice/statute/3.0' as "cs"
                   '/cx:AllStatuteQueryResponse/ns:Statutes'
                   passing v_xml
                   columns
                   StatuteID     number     path '//cs:Statutes/cs:StatuteId'
              ) cs;     
         begin
              dbms_output.put_line('Processing started here');
              for c_sid in c_xmls loop
                   dbms_output.put_line(c_xmls%rowCount || ' ID = ' || c_sid.StatuteId);
              end loop;
         end;
    Please tell me what I did wrong. Thanks a lot!
    Ben

  • How to get this kind number?

    I have a float number,e.g myfloat=123.34???. When the first "?">=5,
    myfloat=123.35,or myfloat=123.34.Can anyone tell me how to get this kind number.
    Thanks in advance.

    In fact, not very clear of your problem.
    Supposing you want to get fix position's value after ".",
    you could firsly convert it to a string,
    then position "." ,use subString() to get the value.
    compare it, reconvert it back.

  • How to realize this kind of ALV(with two headerlines)?

    Dear all:
      could anyony provide some advice on how to realize this kind of ALV?
    |--|--
    field2
    |--|||--
         field11  |  field12   |  field21  |  field212      |
    |--|||--
    wait your kindly advice

    I had similar kind of requirement. Have a look at below code. It will help you. You can execute it. You can see the report output which contains two header lines.
    REPORT  ztestvib    MESSAGE-ID zz  LINE-SIZE 50.
    TYPE-POOLS: slis.
    DATA: x_fieldcat TYPE slis_fieldcat_alv,
          it_fieldcat TYPE slis_t_fieldcat_alv,
          l_layout TYPE slis_layout_alv,
          x_events TYPE slis_alv_event,
          it_events TYPE slis_t_event.
    DATA: BEGIN OF itab OCCURS 0,
          vbeln LIKE vbak-vbeln,
          posnr LIKE vbap-posnr,
          male TYPE i,
          female TYPE i,
         END OF itab.
    SELECT vbeln
           posnr
           FROM vbap
           UP TO 20 ROWS
           INTO TABLE itab.
    x_fieldcat-fieldname = 'VBELN'.
    x_fieldcat-seltext_l = 'VBELN'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-col_pos = 1.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    x_fieldcat-fieldname = 'POSNR'.
    x_fieldcat-seltext_l = 'POSNR'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-col_pos = 2.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    x_fieldcat-fieldname = 'MALE'.
    x_fieldcat-seltext_l = 'MALE'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-col_pos = 3.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    x_fieldcat-fieldname = 'FEMALE'.
    x_fieldcat-seltext_l = 'FEMALE'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-col_pos = 3.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    x_events-name = slis_ev_top_of_page.
    x_events-form = 'TOP_OF_PAGE'.
    APPEND x_events  TO it_events.
    CLEAR x_events .
    l_layout-no_colhead = 'X'.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      EXPORTING
        i_callback_program = sy-repid
        is_layout          = l_layout
        it_fieldcat        = it_fieldcat
        it_events          = it_events
      TABLES
        t_outtab           = itab
      EXCEPTIONS
        program_error      = 1
        OTHERS             = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *&      Form  top_of_page
          text
    FORM top_of_page.
    *-To display the headers for main list
      FORMAT COLOR COL_HEADING.
      WRITE: / sy-uline(103).
      WRITE: /   sy-vline,
            (8) ' ' ,
                 sy-vline,
            (8)  ' ' ,
                 sy-vline,
            (19) '***'(015) CENTERED,
                 sy-vline.
      WRITE: /   sy-vline,
            (8) 'VBELN'(013) ,
                 sy-vline,
            (8) 'POSNR'(014) ,
                 sy-vline,
            (8) 'MALE'(016) ,
                 sy-vline,
             (8)  'FMALE'(017) ,
                 sy-vline.
      FORMAT COLOR OFF.
    ENDFORM.                    "top_of_page
    The header lines are as below:
    VBELN      POSNR      MALE       FMALE
    I hope it helps.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • Is the transformation between XML document and 2 dimensions table important?

    To everyone:
    I am trying to write a paper on this topic.first ,i want to ask whether the transformation between XML data and table in RDBMS is important,because xml data is suitable to transfer from a point to another,but not for storage,so when the transfer begin a program(in DB2,the program is DB2 extender)should change the data format in table into a xml document.And vice versa,the destination point receive the xml document,maybe the same program would store it in table.
    so i wonder if such a program exists in the Oracle8i or later version,and the detail about how the program realizes above funciton.please tell me where can i find related paper or materials.
    thanks!

    To everyone:
    I am trying to write a paper on this topic.first ,i want to ask whether the transformation between XML data and table in RDBMS is important,because xml data is suitable to transfer from a point to another,but not for storage,so when the transfer begin a program(in DB2,the program is DB2 extender)should change the data format in table into a xml document.And vice versa,the destination point receive the xml document,maybe the same program would store it in table.
    so i wonder if such a program exists in the Oracle8i or later version,and the detail about how the program realizes above funciton.please tell me where can i find related paper or materials.
    thanks! That is all oracle XDK is for. You can transform query results to xml and xml back into RDBMS. Infact Oracle provides much more flexible way than a DB2 extender does. In DB2 you need to give a DAD before you get any XML. Oracle relies on the direct transformation of query results into XML and adds flexibility of XSL ontop of the data.
    You can get more information on XML technology section of OTN.
    Once you write the article can we get a chance to see it.

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • How can I print a whole email document and not a "screen shot" like I get in the Print Preview option.

    How can I print a whole email document and not a "screen shot" like I get in the Print Preview option. I'd like to print from "file" and print" like I can on other browsers (IE, for example). When I try to print from Firefox it grabs all my info (file folders, etc.) from the left side of the page. I need just the email information, not the entire screen information. Thank you!
    -Bruce

    I agree; I should, but I can't :) I have an orange Firefox drop down that I go to to print, and it allows me to select "print", "print preview" and "print setup", where I can change the margins. It always defaults to a full screen shot (I use Yahoo) and does not show just the email. I don't need to print what is on the left side of the screen or anything other than the email (I can achieve these things by using file-print from IE, so I know it is doable, and I am still going into Yahoo and using their email when I do it).
    Hope this helps. I'm not a fan of IE, but I really don't like the print properties I'm getting here (I'm a long time Mozilla user, but I'm losing too much info with this option and can't afford that anymore).
    Thanks for the help!
    -Bruce

  • I have a Macbook Pro 15" that is three and a half years old.  Although it has slowed a bit, it still runs well and runs every program I need. Any tips for how to keep this old computer running well and in good health?

    I have a Macbook Pro 15" that is three and a half years old.  Although it has slowed a bit, it still runs well and runs every program I need. Any tips for how to keep this old computer running well and in good health?
    I have a 250 gig drive and try to keep at least 100 gigs unused at all times, 4 GB 667 MHz DDR2 SDRAM memory, back up with Time Machine and CrashPlan, and have OS X 10.7.3.
    This was my first Mac since an old Apple II GS.  After that I used PC's and got really good at reformatting, replacing drives, reinstalling, defragging, resolving software conflicts, etc.  Since switching back to Macs (five in my extended family now), I haven't had to do any of those things. So, although, the cost is three times as much, the aggrevation has been ten times less.
    I'm retired and living on a fixed income and would therefore like to keep this computer running as opposed to constatntly upgrading.
    That said, any tips?
    Thanks
    It does have a crack on the left of the screen case about 3/4'' up from the bottom.  I've posted that as another question.

    Kappy's Personal Suggestions for OS X Maintenance
    For disk repairs use Disk Utility.  For situations DU cannot handle the best third-party utilities are: Disk Warrior;  DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible. Drive Genius provides additional tools not found in Disk Warrior.  Versions 1.5.1 and later are Intel Mac compatible.
    OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep.  Dependence upon third-party utilities to run the periodic maintenance scripts was significantly reduced since Tiger.  These utilities have limited or no functionality with Snow Leopard or Lion and should not be installed.
    OS X automatically defragments files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive. As for virus protection there are few if any such animals affecting OS X. You can protect the computer easily using the freeware Open Source virus protection software ClamXAV. Personally I would avoid most commercial anti-virus software because of their potential for causing problems. For more about malware see Macintosh Virus Guide.
    I would also recommend downloading a utility such as TinkerTool System, OnyX 2.4.3, or Cocktail 5.1.1 that you can use for periodic maintenance such as removing old log files and archives, clearing caches, etc.
    For emergency repairs install the freeware utility Applejack.  If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the command line.  Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard. There is no confirmation that this version also works with Lion.
    When you install any new system software or updates be sure to repair the hard drive and permissions beforehand. I also recommend booting into safe mode before doing system software updates.
    Get an external Firewire drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
    Carbon Copy Cloner
    Data Backup
    Deja Vu
    SuperDuper!
    SyncTwoFolders
    Synk Pro
    Synk Standard
    Tri-Backup
    Visit The XLab FAQs and read the FAQs on maintenance, optimization, virus protection, and backup and restore.
    Additional suggestions will be found in Mac Maintenance Quick Assist.
    Referenced software can be found at CNet Downloads or MacUpdate.
    Be sure you have an adequate amount of RAM installed for the number of applications you run concurrently. Be sure you leave a minimum of 10% of the hard drive's capacity as free space.
    Adding more RAM, if feasible, and a new, faster hard drive may also help pep it up a little.

Maybe you are looking for

  • PO Approval through email set up documets

    Hi, I want set up documents once we try approve the Requisition and PO documents for approval not through notifications, but through email. So the approvers will open the relevant information in their email and approve the document through email. The

  • BPM Process is not started

    Hi All, I defined an Integration Process which is triggered by an Asynchronous message (Receive step with "start process" checked). The trigerring message is sent through the HTTP Adapter (See: http://help.sap.com/saphelp_nw04/helpdata/en/82/f4993c03

  • Transaction variant for CA02

    Dear Gurus, We will be maintaining two group counters under one group of routing.  Now, two different users will be accessing CA02.  The 2nd user shall be restricted to edit one group counter only.  With this, I need to create Transaction variant for

  • Top 10 lowest level dimension members based on measure

    Hi, I'm trying to create a condition with JDeveloper to show the top 10 dimension members based on a measure for the lowest level of the hierarchy, but doesn't work. All other conditions are working well, including top 10 dimension members in other l

  • Reports with multi columns

    I have a situation where I have a report with a subreport.  The main report itself is 3 columns on a page layout 8.5 x 11. However, when I get to a certain data section of the report, it needs to switch to 2 columns for formatting purposes and then b