Reading Xml file from clob column in the staging table

Hi,
I am trying to poll the staging table with the database adapter which has CLOB column type containing XML file. How do I extract the XML file from CLOB and map the fields to the another variable with definite schema.
Thanks,
Edited by: chaitu123 on Sep 20, 2009 8:16 AM

1) when you create DBAdapter on a table which having the clob column watch closely the created xsd for the DBAdapter the clob cloumn element should be a String data type
2) create xsd for Xml File and create variable for the xsd element
3) use ora:parseEscapedXML("yourDBAdapterclobElement") to XmlFileVarilable
Krishna

Similar Messages

  • Parse a xml file from clob column.

    Dear,
    i have been suffreing a problem about xml.
    i have a table with two columns, one is bfile data type other is clob data type. A xml data is stored into both cloumns
    as clob and bfile. My xml data format is correct.
    when i took xml data from bfile column, then dbms_xmlparser.parseClob successfully parse my xml data.
    Code below:
    =======================================
    dbms_lob.createtemporary(l_clob, cache=>FALSE);
    dbms_lob.loadFromFile(dest_lob => l_clob,
    src_lob => l_bfile,
    amount => dbms_lob.getLength(l_bfile));
    l_parser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseClob(l_parser, l_clob); ========================================
    But when i took xml data form clob clumn directly, then dbms_xmlparser.parseClob parse failed and go to exception.
    Code below:
    ====================================================================
    dbms_lob.createtemporary(l_clob, cache=>FALSE);
    select xml_cfile,xml_bfile                    
    into l_clob ,l_bfile
    from xml_load_in
    l_parser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseClob(l_parser, l_clob); --failed parse    
    ====================================================================
    declare
    l_bfile BFILE;
    l_clob CLOB;
    l_parser dbms_xmlparser.Parser;
    l_doc dbms_xmldom.DOMDocument;
    begin
    dbms_lob.createtemporary(l_clob, cache=>FALSE);
    select xml_cfile,xml_bfile
    into l_clob ,l_bfile
    from xml_load_in
    l_parser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseClob(l_parser, l_clob);
    l_doc := dbms_xmlparser.getDocument(l_parser);
    dbms_lob.freetemporary(l_clob);
    dbms_xmlparser.freeParser(l_parser);
    exception
    dbms_lob.freetemporary(l_clob);
    dbms_xmlparser.freeParser(l_parser);
    dbms_xmldom.freeDocument(l_doc);
    End;
    Example:
    ======--File_name := Outward.xml;
    CREATE OR REPLACE DIRECTORY
    MY_INWARD AS
    'D:\PBM\Inward\';
    CREATE TABLE XML_LOAD_IN
    ( XML_CFILE CLOB,
    XML_BFILE BFILE
    INSERT INTO XML_LOAD_IN ( XML_CFILE, XML_BFILE )
    VALUES (
    '<?xml version="1.0" encoding="UTF-8"?>
    <BACPSInterface>
    <OCE>
    <EHR>
    <StandardLevel>03</StandardLevel>
    <TestFiledIndicator>T</TestFiledIndicator>
    <ImmediateDestRoutingNumber>
    <BankCode>070</BankCode>
    <DistrictCode>12</DistrictCode>
    <BranchCode>75</BranchCode>
    <CheckDigit>8</CheckDigit>
    </ImmediateDestRoutingNumber>
    <ImmediateOriginRoutingNumber>
    <BankCode>070</BankCode>
    <DistrictCode>12</DistrictCode>
    <BranchCode>75</BranchCode>
    <CheckDigit>8</CheckDigit>
    </ImmediateOriginRoutingNumber>
    <FileCreationDate>20090714</FileCreationDate>
    <FileCreationTime>1047</FileCreationTime>
    <ResendIndicator>N</ResendIndicator>
    <ECESettlementDate>20090714</ECESettlementDate>
    <ECESessionTime>1047</ECESessionTime>
    <ECESettlementTime>1047</ECESettlementTime>
    <ECEtype>01</ECEtype>
    <CountryCode>BD</CountryCode>
    </EHR>
    <Collection>
    <CHR>
    <CashLetterBusinessDate>20090714</CashLetterBusinessDate>
    <CashLetterCreationDate>20090714</CashLetterCreationDate>
    <CashLetterCreationTime>1047</CashLetterCreationTime>
    <CashLetterRecordTypeInd>I</CashLetterRecordTypeInd>
    <CashLetterDocTypeIndicator>G</CashLetterDocTypeIndicator>
    <CashLetterID>1</CashLetterID>
    <OriginatorContactName>Bank Asia</OriginatorContactName>
    <OriginatorContactPhoneNumber>XXX</OriginatorContactPhoneNumber>
    </CHR>
    <ForwardBundle>
    <BHR>
    <CollectionTypeIndicator>I</CollectionTypeIndicator>
    <DestRoutingNumber>
    <BankCode>070</BankCode>
    <DistrictCode>12</DistrictCode>
    <BranchCode>75</BranchCode>
    <CheckDigit>8</CheckDigit>
    </DestRoutingNumber>
    <ECEInstitutionRoutingNumber>
    <BankCode>070</BankCode>
    <DistrictCode>12</DistrictCode>
    <BranchCode>75</BranchCode>
    <CheckDigit>8</CheckDigit>
    </ECEInstitutionRoutingNumber>
    <BundleBusinessDate>20090714</BundleBusinessDate>
    <BundleCreationDate>20090714</BundleCreationDate>
    <BundleID>1</BundleID>
    <ReturnLocationRoutingNumber>070127538</ReturnLocationRoutingNumber>
    </BHR>
    <CDR>
    <CDR num="1">
    <ECESettlementDate>20090714</ECESettlementDate>
    <ECESessionTime>1047</ECESessionTime>
    <ECESettlementTime>1047</ECESettlementTime>
    <ECEItemType>N</ECEItemType>
    <IssuingBranchRoutingNumber>
    <BankCode>070</BankCode>
    <DistrictCode>12</DistrictCode>
    <BranchCode>75</BranchCode>
    <CheckDigit>8</CheckDigit>
    </IssuingBranchRoutingNumber>
    <AccountNumber>0000334008221</AccountNumber>
    <ChequeSequenceNumber>1601735</ChequeSequenceNumber>
    <ItemAmount>500</ItemAmount>
    <ECEInstitutionItemSequencNum>0701275380000001</ECEInstitutionItemSequencNum>
    <DocumentationTypeIndicator>I</DocumentationTypeIndicator>
    <ReturnAcceptanceIndicator>6</ReturnAcceptanceIndicator>
    <MICRValidIndicator>1</MICRValidIndicator>
    <BOFDIndicator>Y</BOFDIndicator>
    <ChequeDetailRecAddendumCount>0</ChequeDetailRecAddendumCount>
    <CorrectionIndicator>0</CorrectionIndicator>
    <RepresentmentIndicator>0</RepresentmentIndicator>
    <ArchiveTypeIndicator>F</ArchiveTypeIndicator>
    </CDR>
    <CDR num="2">
    <ECESettlementDate>20090714</ECESettlementDate>
    <ECESessionTime>1047</ECESessionTime>
    <ECESettlementTime>1047</ECESettlementTime>
    <ECEItemType>N</ECEItemType>
    <IssuingBranchRoutingNumber>
    <BankCode>070</BankCode>
    <DistrictCode>12</DistrictCode>
    <BranchCode>75</BranchCode>
    <CheckDigit>8</CheckDigit>
    </IssuingBranchRoutingNumber>
    <AccountNumber>0000345682256</AccountNumber>
    <ChequeSequenceNumber>1234567</ChequeSequenceNumber>
    <ItemAmount>1000</ItemAmount>
    <ECEInstitutionItemSequencNum>0701275380000002</ECEInstitutionItemSequencNum>
    <DocumentationTypeIndicator>I</DocumentationTypeIndicator>
    <ReturnAcceptanceIndicator>6</ReturnAcceptanceIndicator>
    <MICRValidIndicator>1</MICRValidIndicator>
    <BOFDIndicator>Y</BOFDIndicator>
    <ChequeDetailRecAddendumCount>0</ChequeDetailRecAddendumCount>
    <CorrectionIndicator>0</CorrectionIndicator>
    <RepresentmentIndicator>0</RepresentmentIndicator>
    <ArchiveTypeIndicator>F</ArchiveTypeIndicator>
    </CDR>
    </CDR>
    <CDA>
    <CDA num="1">
    <AddendumRecordNumber>1</AddendumRecordNumber>
    <BOFDRoutingNumber>
    <BankCode>070</BankCode>
    <DistrictCode>75</DistrictCode>
    <BranchCode>12</BranchCode>
    <CheckDigit>8</CheckDigit>
    </BOFDRoutingNumber>
    <BOFDBusinessEndorsementDate>20090714</BOFDBusinessEndorsementDate>
    <BOFDDepositAccountNumber>0000334008221</BOFDDepositAccountNumber>
    <BOFDDepositBranch>753</BOFDDepositBranch>
    <PayeeName>XXX</PayeeName>
    <TruncationIndicator>Y</TruncationIndicator>
    <BOFDConversionIndicator>2</BOFDConversionIndicator>
    <BOFDCorrectionIndicator>0</BOFDCorrectionIndicator>
    </CDA>
    <CDA num="2">
    <AddendumRecordNumber>1</AddendumRecordNumber>
    <BOFDRoutingNumber>
    <BankCode>070</BankCode>
    <DistrictCode>75</DistrictCode>
    <BranchCode>12</BranchCode>
    <CheckDigit>8</CheckDigit>
    </BOFDRoutingNumber>
    <BOFDBusinessEndorsementDate>20090714</BOFDBusinessEndorsementDate>
    <BOFDDepositAccountNumber>0000345682256</BOFDDepositAccountNumber>
    <BOFDDepositBranch>753</BOFDDepositBranch>
    <PayeeName>XXX</PayeeName>
    <TruncationIndicator>Y</TruncationIndicator>
    <BOFDConversionIndicator>2</BOFDConversionIndicator>
    <BOFDCorrectionIndicator>0</BOFDCorrectionIndicator>
    </CDA>
    </CDA>
    <CDC>
    <CDC num="1">
    <AddendumCRecordNumber>1</AddendumCRecordNumber>
    <EndorsingBankRountingNumber>
    <BankCode>070</BankCode>
    <DistrictCode>12</DistrictCode>
    <BranchCode>75</BranchCode>
    <CheckDigit>8</CheckDigit>
    </EndorsingBankRountingNumber>
    <EndorsingBankEndorsementDate>20090714</EndorsingBankEndorsementDate>
    <EndorsingBankEndorsementDate>20090714</EndorsingBankEndorsementDate>
    <EndorsingBankItemSequenceNum>0701275380000001</EndorsingBankItemSequenceNum>
    <TruncationIndicator>Y</TruncationIndicator>
    <EndorsingBankConversionInd>2</EndorsingBankConversionInd>
    <EndorsingBankCorrectionInd>0</EndorsingBankCorrectionInd>
    </CDC>
    <CDC num="2">
    <AddendumCRecordNumber>1</AddendumCRecordNumber>
    <EndorsingBankRountingNumber>
    <BankCode>070</BankCode>
    <DistrictCode>12</DistrictCode>
    <BranchCode>75</BranchCode>
    <CheckDigit>8</CheckDigit>
    </EndorsingBankRountingNumber>
    <EndorsingBankEndorsementDate>20090714</EndorsingBankEndorsementDate>
    <EndorsingBankEndorsementDate>20090714</EndorsingBankEndorsementDate>
    <EndorsingBankItemSequenceNum>0701275380000002</EndorsingBankItemSequenceNum>
    <TruncationIndicator>Y</TruncationIndicator>
    <EndorsingBankConversionInd>2</EndorsingBankConversionInd>
    <EndorsingBankCorrectionInd>0</EndorsingBankCorrectionInd>
    </CDC>
    </CDC>
    <IVD>
    <IVD num="1">
    <ImageIndicator>1</ImageIndicator>
    <ImageCreatorRountingNumber>
    <BankCode>070</BankCode>
    <DistrictCode>12</DistrictCode>
    <BranchCode>75</BranchCode>
    <CheckDigit>8</CheckDigit>
    </ImageCreatorRountingNumber>
    <ImageCreatorDate>20090714</ImageCreatorDate>
    <ImageViewFormatIndicator>0</ImageViewFormatIndicator>
    <ImageViewCompressionAlg>0</ImageViewCompressionAlg>
    <ViewSideIndicator>0</ViewSideIndicator>
    <ViewDescriptor>0</ViewDescriptor>
    <DigitalSignatureIndicator>1</DigitalSignatureIndicator>
    <DigitalSignatureMethod>0</DigitalSignatureMethod>
    <SecurityKeySize>12235</SecurityKeySize>
    <ImageRecreateIndicator>0</ImageRecreateIndicator>
    </IVD>
    <IVD num="2">
    <ImageIndicator>1</ImageIndicator>
    <ImageCreatorRountingNumber>
    <BankCode>070</BankCode>
    <DistrictCode>12</DistrictCode>
    <BranchCode>75</BranchCode>
    <CheckDigit>8</CheckDigit>
    </ImageCreatorRountingNumber>
    <ImageCreatorDate>20090714</ImageCreatorDate>
    <ImageViewFormatIndicator>0</ImageViewFormatIndicator>
    <ImageViewCompressionAlg>0</ImageViewCompressionAlg>
    <ViewSideIndicator>0</ViewSideIndicator>
    <ViewDescriptor>0</ViewDescriptor>
    <DigitalSignatureIndicator>1</DigitalSignatureIndicator>
    <DigitalSignatureMethod>0</DigitalSignatureMethod>
    <SecurityKeySize>12235</SecurityKeySize>
    <ImageRecreateIndicator>0</ImageRecreateIndicator>
    </IVD>
    </IVD>
    <IVT>
    <IVT num="1">
    <ECEInstitutionRoutingNumber>
    <BankCode>070</BankCode>
    <DistrictCode>12</DistrictCode>
    <BranchCode>75</BranchCode>
    <CheckDigit>8</CheckDigit>
    </ECEInstitutionRoutingNumber>
    <BundleBusinessDate>20090714</BundleBusinessDate>
    <CycleNumber>0</CycleNumber>
    <ECEInstitutionItemSeqNumber>0701275380000001</ECEInstitutionItemSeqNumber>
    <ClippingOrigin>
    <Origin>0</Origin>
    <CoordinateH1>0000</CoordinateH1>
    <CoordinateH2>0000</CoordinateH2>
    <CoordinateV1>0000</CoordinateV1>
    <CoordinateV2>0000</CoordinateV2>
    </ClippingOrigin>
    <LengthofImageReferenceKey>0</LengthofImageReferenceKey>
    <LengthofDigitalSignature>0</LengthofDigitalSignature>
    <LengthofImageData>1</LengthofImageData>
    <OffsetToImageData>01001000</OffsetToImageData>
    </IVT>
    <IVT num="2">
    <ECEInstitutionRoutingNumber>
    <BankCode>070</BankCode>
    <DistrictCode>12</DistrictCode>
    <BranchCode>75</BranchCode>
    <CheckDigit>8</CheckDigit>
    </ECEInstitutionRoutingNumber>
    <BundleBusinessDate>20090714</BundleBusinessDate>
    <CycleNumber>0</CycleNumber>
    <ECEInstitutionItemSeqNumber>0701275380000002</ECEInstitutionItemSeqNumber>
    <ClippingOrigin>
    <Origin>0</Origin>
    <CoordinateH1>0000</CoordinateH1>
    <CoordinateH2>0000</CoordinateH2>
    <CoordinateV1>0000</CoordinateV1>
    <CoordinateV2>0000</CoordinateV2>
    </ClippingOrigin>
    <LengthofImageReferenceKey>0</LengthofImageReferenceKey>
    <LengthofDigitalSignature>0</LengthofDigitalSignature>
    <LengthofImageData>1</LengthofImageData>
    <OffsetToImageData>01001000</OffsetToImageData>
    </IVT>
    </IVT>
    <IVA>
    <IVA num="1">
    <GlobalImageQuality>0</GlobalImageQuality>
    <GlobalImageUsability>1</GlobalImageUsability>
    <ImagingBankSpecificTest>1</ImagingBankSpecificTest>
    </IVA>
    <IVA num="2">
    <GlobalImageQuality>0</GlobalImageQuality>
    <GlobalImageUsability>1</GlobalImageUsability>
    <ImagingBankSpecificTest>1</ImagingBankSpecificTest>
    </IVA>
    </IVA>
    <BCR>
    <ItemsWithinBundleCount>2</ItemsWithinBundleCount>
    <BundleTotalAmount>1500</BundleTotalAmount>
    <MICRValidTotalAmount>1500</MICRValidTotalAmount>
    </BCR>
    </ForwardBundle>
    <CCR>
    <BundleCount>1</BundleCount>
    <ItemWithinCashLetterCount>2</ItemWithinCashLetterCount>
    <CashLetterTotalAmount>1500</CashLetterTotalAmount>
    <ImagesWithinCashLetterCount>2</ImagesWithinCashLetterCount>
    <ECEInstitutionName>Bank Asia</ECEInstitutionName>
    <SettlementDate>20090714</SettlementDate>
    </CCR>
    </Collection>
    <ECR>
    <CashLetterCount>1</CashLetterCount>
    <TotalRecordCount>2</TotalRecordCount>
    <TotalItemCount>2</TotalItemCount>
    <FileTotalAmount>1500</FileTotalAmount>
    <ImmediateOriginContactName>Bank Asia</ImmediateOriginContactName>
    <ImmediateOriginContactNumber>XXX</ImmediateOriginContactNumber>
    </ECR>
    </OCE>
    </BACPSInterface>'
    , BFILENAME('MY_INWARD','Outward.xml'));
    COMMIT;

    What version of Oracle (4 digits) and what is the error?
    This runs without error on 10.2.0.4 (though you can go directly from a CLOB to a DOMDocument via dbms_xmldom)
    -- Created on 9/14/2009 by JH20567
    declare
      -- Local variables here
      l_clob   CLOB;
      l_parser dbms_xmlparser.Parser;
      l_doc    dbms_xmldom.DOMDocument;
    begin
      -- Test statements here
       l_clob := '<?xml version="1.0" encoding="UTF-8"?>
    <BACPSInterface>
       <OCE>
          <EHR>
             <StandardLevel>03</StandardLevel>
             <TestFiledIndicator>T</TestFiledIndicator>
             <ImmediateDestRoutingNumber>
                <BankCode>070</BankCode>
                <DistrictCode>12</DistrictCode>
                <BranchCode>75</BranchCode>
                <CheckDigit>8</CheckDigit>
             </ImmediateDestRoutingNumber>
             <ImmediateOriginRoutingNumber>
                <BankCode>070</BankCode>
                <DistrictCode>12</DistrictCode>
                <BranchCode>75</BranchCode>
                <CheckDigit>8</CheckDigit>
             </ImmediateOriginRoutingNumber>
             <FileCreationDate>20090714</FileCreationDate>
             <FileCreationTime>1047</FileCreationTime>
             <ResendIndicator>N</ResendIndicator>
             <ECESettlementDate>20090714</ECESettlementDate>
             <ECESessionTime>1047</ECESessionTime>
             <ECESettlementTime>1047</ECESettlementTime>
             <ECEtype>01</ECEtype>
             <CountryCode>BD</CountryCode>
          </EHR>
          <Collection>
             <CHR>
                <CashLetterBusinessDate>20090714</CashLetterBusinessDate>
                <CashLetterCreationDate>20090714</CashLetterCreationDate>
                <CashLetterCreationTime>1047</CashLetterCreationTime>
                <CashLetterRecordTypeInd>I</CashLetterRecordTypeInd>
                <CashLetterDocTypeIndicator>G</CashLetterDocTypeIndicator>
                <CashLetterID>1</CashLetterID>
                <OriginatorContactName>Bank Asia</OriginatorContactName>
                <OriginatorContactPhoneNumber>XXX</OriginatorContactPhoneNumber>
             </CHR>
             <ForwardBundle>
                <BHR>
                   <CollectionTypeIndicator>I</CollectionTypeIndicator>
                   <DestRoutingNumber>
                      <BankCode>070</BankCode>
                      <DistrictCode>12</DistrictCode>
                      <BranchCode>75</BranchCode>
                      <CheckDigit>8</CheckDigit>
                   </DestRoutingNumber>
                   <ECEInstitutionRoutingNumber>
                      <BankCode>070</BankCode>
                      <DistrictCode>12</DistrictCode>
                      <BranchCode>75</BranchCode>
                      <CheckDigit>8</CheckDigit>
                   </ECEInstitutionRoutingNumber>
                   <BundleBusinessDate>20090714</BundleBusinessDate>
                   <BundleCreationDate>20090714</BundleCreationDate>
                   <BundleID>1</BundleID>
                   <ReturnLocationRoutingNumber>070127538</ReturnLocationRoutingNumber>
                </BHR>
                <CDR>
                   <CDR num="1">
                      <ECESettlementDate>20090714</ECESettlementDate>
                      <ECESessionTime>1047</ECESessionTime>
                      <ECESettlementTime>1047</ECESettlementTime>
                      <ECEItemType>N</ECEItemType>
                      <IssuingBranchRoutingNumber>
                         <BankCode>070</BankCode>
                         <DistrictCode>12</DistrictCode>
                         <BranchCode>75</BranchCode>
                         <CheckDigit>8</CheckDigit>
                      </IssuingBranchRoutingNumber>
                      <AccountNumber>0000334008221</AccountNumber>
                      <ChequeSequenceNumber>1601735</ChequeSequenceNumber>
                      <ItemAmount>500</ItemAmount>
                      <ECEInstitutionItemSequencNum>0701275380000001</ECEInstitutionItemSequencNum>
                      <DocumentationTypeIndicator>I</DocumentationTypeIndicator>
                      <ReturnAcceptanceIndicator>6</ReturnAcceptanceIndicator>
                      <MICRValidIndicator>1</MICRValidIndicator>
                      <BOFDIndicator>Y</BOFDIndicator>
                      <ChequeDetailRecAddendumCount>0</ChequeDetailRecAddendumCount>
                      <CorrectionIndicator>0</CorrectionIndicator>
                      <RepresentmentIndicator>0</RepresentmentIndicator>
                      <ArchiveTypeIndicator>F</ArchiveTypeIndicator>
                   </CDR>
                   <CDR num="2">
                      <ECESettlementDate>20090714</ECESettlementDate>
                      <ECESessionTime>1047</ECESessionTime>
                      <ECESettlementTime>1047</ECESettlementTime>
                      <ECEItemType>N</ECEItemType>
                      <IssuingBranchRoutingNumber>
                         <BankCode>070</BankCode>
                         <DistrictCode>12</DistrictCode>
                         <BranchCode>75</BranchCode>
                         <CheckDigit>8</CheckDigit>
                      </IssuingBranchRoutingNumber>
                      <AccountNumber>0000345682256</AccountNumber>
                      <ChequeSequenceNumber>1234567</ChequeSequenceNumber>
                      <ItemAmount>1000</ItemAmount>
                      <ECEInstitutionItemSequencNum>0701275380000002</ECEInstitutionItemSequencNum>
                      <DocumentationTypeIndicator>I</DocumentationTypeIndicator>
                      <ReturnAcceptanceIndicator>6</ReturnAcceptanceIndicator>
                      <MICRValidIndicator>1</MICRValidIndicator>
                      <BOFDIndicator>Y</BOFDIndicator>
                      <ChequeDetailRecAddendumCount>0</ChequeDetailRecAddendumCount>
                      <CorrectionIndicator>0</CorrectionIndicator>
                      <RepresentmentIndicator>0</RepresentmentIndicator>
                      <ArchiveTypeIndicator>F</ArchiveTypeIndicator>
                   </CDR>
                </CDR>
                <CDA>
                   <CDA num="1">
                      <AddendumRecordNumber>1</AddendumRecordNumber>
                      <BOFDRoutingNumber>
                         <BankCode>070</BankCode>
                         <DistrictCode>75</DistrictCode>
                         <BranchCode>12</BranchCode>
                         <CheckDigit>8</CheckDigit>
                      </BOFDRoutingNumber>
                      <BOFDBusinessEndorsementDate>20090714</BOFDBusinessEndorsementDate>
                      <BOFDDepositAccountNumber>0000334008221</BOFDDepositAccountNumber>
                      <BOFDDepositBranch>753</BOFDDepositBranch>
                      <PayeeName>XXX</PayeeName>
                      <TruncationIndicator>Y</TruncationIndicator>
                      <BOFDConversionIndicator>2</BOFDConversionIndicator>
                      <BOFDCorrectionIndicator>0</BOFDCorrectionIndicator>
                   </CDA>
                   <CDA num="2">
                      <AddendumRecordNumber>1</AddendumRecordNumber>
                      <BOFDRoutingNumber>
                         <BankCode>070</BankCode>
                         <DistrictCode>75</DistrictCode>
                         <BranchCode>12</BranchCode>
                         <CheckDigit>8</CheckDigit>
                      </BOFDRoutingNumber>
                      <BOFDBusinessEndorsementDate>20090714</BOFDBusinessEndorsementDate>
                      <BOFDDepositAccountNumber>0000345682256</BOFDDepositAccountNumber>
                      <BOFDDepositBranch>753</BOFDDepositBranch>
                      <PayeeName>XXX</PayeeName>
                      <TruncationIndicator>Y</TruncationIndicator>
                      <BOFDConversionIndicator>2</BOFDConversionIndicator>
                      <BOFDCorrectionIndicator>0</BOFDCorrectionIndicator>
                   </CDA>
                </CDA>
                <CDC>
                   <CDC num="1">
                      <AddendumCRecordNumber>1</AddendumCRecordNumber>
                      <EndorsingBankRountingNumber>
                         <BankCode>070</BankCode>
                         <DistrictCode>12</DistrictCode>
                         <BranchCode>75</BranchCode>
                         <CheckDigit>8</CheckDigit>
                      </EndorsingBankRountingNumber>
                      <EndorsingBankEndorsementDate>20090714</EndorsingBankEndorsementDate>
                      <EndorsingBankEndorsementDate>20090714</EndorsingBankEndorsementDate>
                      <EndorsingBankItemSequenceNum>0701275380000001</EndorsingBankItemSequenceNum>
                      <TruncationIndicator>Y</TruncationIndicator>
                      <EndorsingBankConversionInd>2</EndorsingBankConversionInd>
                      <EndorsingBankCorrectionInd>0</EndorsingBankCorrectionInd>
                   </CDC>
                   <CDC num="2">
                      <AddendumCRecordNumber>1</AddendumCRecordNumber>
                      <EndorsingBankRountingNumber>
                         <BankCode>070</BankCode>
                         <DistrictCode>12</DistrictCode>
                         <BranchCode>75</BranchCode>
                         <CheckDigit>8</CheckDigit>
                      </EndorsingBankRountingNumber>
                      <EndorsingBankEndorsementDate>20090714</EndorsingBankEndorsementDate>
                      <EndorsingBankEndorsementDate>20090714</EndorsingBankEndorsementDate>
                      <EndorsingBankItemSequenceNum>0701275380000002</EndorsingBankItemSequenceNum>
                      <TruncationIndicator>Y</TruncationIndicator>
                      <EndorsingBankConversionInd>2</EndorsingBankConversionInd>
                      <EndorsingBankCorrectionInd>0</EndorsingBankCorrectionInd>
                   </CDC>
                </CDC>
                <IVD>
                   <IVD num="1">
                      <ImageIndicator>1</ImageIndicator>
                      <ImageCreatorRountingNumber>
                         <BankCode>070</BankCode>
                         <DistrictCode>12</DistrictCode>
                         <BranchCode>75</BranchCode>
                         <CheckDigit>8</CheckDigit>
                      </ImageCreatorRountingNumber>
                      <ImageCreatorDate>20090714</ImageCreatorDate>
                      <ImageViewFormatIndicator>0</ImageViewFormatIndicator>
                      <ImageViewCompressionAlg>0</ImageViewCompressionAlg>
                      <ViewSideIndicator>0</ViewSideIndicator>
                      <ViewDescriptor>0</ViewDescriptor>
                      <DigitalSignatureIndicator>1</DigitalSignatureIndicator>
                      <DigitalSignatureMethod>0</DigitalSignatureMethod>
                      <SecurityKeySize>12235</SecurityKeySize>
                      <ImageRecreateIndicator>0</ImageRecreateIndicator>
                   </IVD>
                   <IVD num="2">
                      <ImageIndicator>1</ImageIndicator>
                      <ImageCreatorRountingNumber>
                         <BankCode>070</BankCode>
                         <DistrictCode>12</DistrictCode>
                         <BranchCode>75</BranchCode>
                         <CheckDigit>8</CheckDigit>
                      </ImageCreatorRountingNumber>
                      <ImageCreatorDate>20090714</ImageCreatorDate>
                      <ImageViewFormatIndicator>0</ImageViewFormatIndicator>
                      <ImageViewCompressionAlg>0</ImageViewCompressionAlg>
                      <ViewSideIndicator>0</ViewSideIndicator>
                      <ViewDescriptor>0</ViewDescriptor>
                      <DigitalSignatureIndicator>1</DigitalSignatureIndicator>
                      <DigitalSignatureMethod>0</DigitalSignatureMethod>
                      <SecurityKeySize>12235</SecurityKeySize>
                      <ImageRecreateIndicator>0</ImageRecreateIndicator>
                   </IVD>
                </IVD>
                <IVT>
                   <IVT num="1">
                      <ECEInstitutionRoutingNumber>
                         <BankCode>070</BankCode>
                         <DistrictCode>12</DistrictCode>
                         <BranchCode>75</BranchCode>
                         <CheckDigit>8</CheckDigit>
                      </ECEInstitutionRoutingNumber>
                      <BundleBusinessDate>20090714</BundleBusinessDate>
                      <CycleNumber>0</CycleNumber>
                      <ECEInstitutionItemSeqNumber>0701275380000001</ECEInstitutionItemSeqNumber>
                      <ClippingOrigin>
                         <Origin>0</Origin>
                         <CoordinateH1>0000</CoordinateH1>
                         <CoordinateH2>0000</CoordinateH2>
                         <CoordinateV1>0000</CoordinateV1>
                         <CoordinateV2>0000</CoordinateV2>
                      </ClippingOrigin>
                      <LengthofImageReferenceKey>0</LengthofImageReferenceKey>
                      <LengthofDigitalSignature>0</LengthofDigitalSignature>
                      <LengthofImageData>1</LengthofImageData>
                      <OffsetToImageData>01001000</OffsetToImageData>
                   </IVT>
                   <IVT num="2">
                      <ECEInstitutionRoutingNumber>
                         <BankCode>070</BankCode>
                         <DistrictCode>12</DistrictCode>
                         <BranchCode>75</BranchCode>
                         <CheckDigit>8</CheckDigit>
                      </ECEInstitutionRoutingNumber>
                      <BundleBusinessDate>20090714</BundleBusinessDate>
                      <CycleNumber>0</CycleNumber>
                      <ECEInstitutionItemSeqNumber>0701275380000002</ECEInstitutionItemSeqNumber>
                      <ClippingOrigin>
                         <Origin>0</Origin>
                         <CoordinateH1>0000</CoordinateH1>
                         <CoordinateH2>0000</CoordinateH2>
                         <CoordinateV1>0000</CoordinateV1>
                         <CoordinateV2>0000</CoordinateV2>
                      </ClippingOrigin>
                      <LengthofImageReferenceKey>0</LengthofImageReferenceKey>
                      <LengthofDigitalSignature>0</LengthofDigitalSignature>
                      <LengthofImageData>1</LengthofImageData>
                      <OffsetToImageData>01001000</OffsetToImageData>
                   </IVT>
                </IVT>
                <IVA>
                   <IVA num="1">
                      <GlobalImageQuality>0</GlobalImageQuality>
                      <GlobalImageUsability>1</GlobalImageUsability>
                      <ImagingBankSpecificTest>1</ImagingBankSpecificTest>
                   </IVA>
                   <IVA num="2">
                      <GlobalImageQuality>0</GlobalImageQuality>
                      <GlobalImageUsability>1</GlobalImageUsability>
                      <ImagingBankSpecificTest>1</ImagingBankSpecificTest>
                   </IVA>
                </IVA>
                <BCR>
                   <ItemsWithinBundleCount>2</ItemsWithinBundleCount>
                   <BundleTotalAmount>1500</BundleTotalAmount>
                   <MICRValidTotalAmount>1500</MICRValidTotalAmount>
                </BCR>
             </ForwardBundle>
             <CCR>
                <BundleCount>1</BundleCount>
                <ItemWithinCashLetterCount>2</ItemWithinCashLetterCount>
                <CashLetterTotalAmount>1500</CashLetterTotalAmount>
                <ImagesWithinCashLetterCount>2</ImagesWithinCashLetterCount>
                <ECEInstitutionName>Bank Asia</ECEInstitutionName>
                <SettlementDate>20090714</SettlementDate>
             </CCR>
          </Collection>
          <ECR>
             <CashLetterCount>1</CashLetterCount>
             <TotalRecordCount>2</TotalRecordCount>
             <TotalItemCount>2</TotalItemCount>
             <FileTotalAmount>1500</FileTotalAmount>
                   <ImmediateOriginContactName>Bank Asia</ImmediateOriginContactName>
                   <ImmediateOriginContactNumber>XXX</ImmediateOriginContactNumber>
              </ECR>
         </OCE>
    </BACPSInterface>';
       l_parser := dbms_xmlparser.newParser;
       dbms_xmlparser.parseClob(l_parser, l_clob);
       l_doc := dbms_xmlparser.getDocument(l_parser);
       dbms_lob.freetemporary(l_clob);
       dbms_xmlparser.freeParser(l_parser); 
       dbms_xmldom.freeDocument(l_doc);
    end;

  • FM to read XML files from Application server in ECC5.0

    Hi All,
    We need to pick up an XML file from Application server/FTP server. The requirement is to parse the XML file and process it to create material master. SAP provides standard function modules to read XML files.
    Now we need to read the XML file contents of MM01 and upload into SAP Data Base through BAPI
    I need to know about the Function modules to read XML files from Application Server and also about the FM's that will update the Date base tables with the data obtained form XML files.
    Regards
    Prathima

    Parsing XML data:
    http://help.sap.com/saphelp_nw04/helpdata/en/86/8280ba12d511d5991b00508b6b8b11/frameset.htm
    or alternatively check out ABAP online help for "CALL TRANSFORMATION".
    For creating the material master look at BAPI_STANDARDMATERIAL_CREATE.
    Thomas

  • Reading XML file from application server and  put into internal table-4.6C

    Dear All,
    Is there any way of reading XML file from application server to SAP? I am using 4.6C. Function module SCMS_STRING_TO_XSTRING function module is not available. Please suggest.
    Thanks and regards,
    Atanu

    Hi Atanu!
    Simply use the XSLT transformation 'ID'.
    FIELD-SYMBOLS <ls_result> TYPE ANY.
    CREATE DATA lref_data TYPE (your_structure).
    ASSIGN lref_data->* TO <ls_result>.
    CALL TRANSFORMATION id
                        SOURCE XML xmlstr
                        RESULT result = <ls_result>.
    "xmlstr" contains your XML file. Just read it into it via standard I/O operations. "<ls_result>" will contain your DDIC formatted content.
    Best regards
    Torsten

  • Problem  while reading XML file from Aplication server(Al11)

    Hi Experts
    I am facing a problem while  reading XML file from Aplication server  using open data set.
    OPEN DATASET v_dsn IN BINARY MODE FOR INPUT.
    IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      READ DATASET v_dsn INTO v_rec.
    WHILE sy-subrc <> 0.
      ENDWHILE.
      CLOSE DATASET v_dsn.
    The XML file contains the details from an IDOC number  ,  the expected output  is XML file giving  all the segments details in a single page and send the user in lotus note as an attachment, But in the  present  output  after opening the attachment  i am getting a single XML file  which contains most of the segments ,but in the bottom part it is giving  the below error .
    - <E1EDT13 SEGMENT="1">
      <QUALF>001</QUALF>
      <NTANF>20110803</NTANF>
      <NTANZ>080000</NTANZ>
      <NTEND>20110803<The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/SHPORD_0080005842.xml'.
    /SPAN></NTEND>
      <NTENZ>000000</NTENZ>
    for all the xml  its giving the error in bottom part ,  but once we open the source code and  if we saved  in system without changing anything the file giving the xml file without any error in that .
    could any one can help to solve this issue .

    Hi Oliver
    Thanx for your reply.
    see the latest output
    - <E1EDT13 SEGMENT="1">
      <QUALF>003</QUALF>
      <NTANF>20110803</NTANF>
      <NTANZ>080000</NTANZ>
      <NTEND>20110803</NTEND>
      <NTENZ>000000</NTENZ>
      <ISDD>00000000</ISDD>
      <ISDZ>000000</ISDZ>
      <IEDD>00000000</IEDD>
      <IEDZ>000000</IEDZ>
      </E1EDT13>
    - <E1EDT13 SEGMENT="1">
      <QUALF>001</QUALF>
      <NTANF>20110803</NTANF>
      <NTANZ>080000</NTANZ>
      <NTEND>20110803<The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/~1922011.xml'.
    /SPAN></NTEND>
      <NTENZ>000000</NTENZ>
    E1EDT13 with QUALF>003 and  <E1EDT13 SEGMENT="1">
    with   <QUALF>001 having almost same segment data . but  E1EDT13 with QUALF>003  is populating all segment data
    properly ,but E1EDT13 with QUALF>001  is giving in between.

  • Reading XML file from UNIX

    I am reading XML file from unix using :
    FORM read_file USING p_name.
      DO.
        READ DATASET p_name INTO WXML_LINE LENGTH LENG.
      ENDDO.
    Then I am using subroutine below where I get a short dump at
      case X_NODE->get_type( ).
    FORM get_data tables   Y_CAPXML   structure GV_CAPXML
                  using value(x_node) type ref to if_ixml_node.
      data: INDENT      type i.
      data: PTEXT       type ref to if_ixml_text.
      data: STRING      type string.
      data: TEMP_STRING(100).
      case X_NODE->get_type( ).
        when if_ixml_node=>co_node_element.
          STRING = X_NODE->get_name( ).
          GV_NODETEXT = STRING.
        when if_ixml_node=>co_node_text.
          PTEXT ?= X_NODE->query_interface( IXML_IID_TEXT ).
          if PTEXT->ws_only( ) is initial.
            STRING = X_NODE->get_value( ).
            case GV_NODETEXT.
              when 'NIIN'.
                move STRING to GV_CAPXML-NIIN.
              when 'FED_x0020_STOCK_x0020_CLASS'.
                move STRING to GV_CAPXML-fed_stock_class.
              when 'DODIC'.
                move STRING to GV_CAPXML-dodic.
             endcase.
    The text for the short dump is : STACK_STATE_NO_ROLL_MEMORY
    Can someone please explain what is it mean.
    Thanks.

    May be this blog can help:
    <a href="/people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach for Blog</a>
    Sri

  • How to create xml file from Oracle and sending the same xml file to an url

    How to create xml file from Oracle and sending the same xml file to an url

    SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
    Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way.

  • How to read .xml file from embedded .swf(flash output) in captivate

    I have been trying to read .xml file from the .swf (Flash output) that is embedded within the captivate file but no luck yet . Please if anyone got any clue on how get this thing done using Action script 3.0 then let me know. I am using Adobe Captivate 5.5 at present and Flash CS 5.5.
    I am well aware about how to read .xml file through action script 3.0 in flash but when insert the same flash in captivate and publish nothing comes in captivate output. I would higly appreciate if anyone could help me out with that.
    Here is is graphical demonstration of my query :
    Message was edited by: captainmkv

    Hi Captainmkv,
    Does the information in this post cover what you're trying to do: http://forums.adobe.com/message/5081928#5081928
    Tristan,

  • I want to make a schedular which read xml files from a folder ,import in Indesign template then export as a pdf....

    i want to make a schedular probably in Coldfusion or using javascript ,  which read xml files from a folder ,import in Indesign template then export as a pdf....

    I don't think you understand: I want to open Dreamweaver and build a brand new site, then when I am done I want to host the dreamweaver site on the Business Catalyst platform. I dont want to use anything in BC to build the site, I just want to use the hosting platform. I do not want to import a BC site into dreamweaver or anything like that. I just want to use BC the same way I would use godaddy, or uhost or any other hosting provider. Based on your response you said that "of course its possible to build a BC site in Dreamweaver" I dont want to build a BC site, I want to build a Dreamweaver site and host it on the BC platform. Like I said before it doesnt seem like this is possible. As of now we can only build a new site in MUSE and integrate it into BC without using a BC template. Can you understand what I am saying. I DONT WANT TO USE A BC TEMPLATE, I WANT NOTHING TO DO WITH BC WHILE I AM BUILDING THE SITE WITH DREAMWEAVER, JUST LIKE MUSE DOES.

  • Function module to read xml files from application server

    Hi experts,
            I need to read  xml files from application server to sap. Is the any siutable function moldule for that?

    Hi Cenosure,
    Donno about FM which will upload data directly to SAP, I think you have to do some mapping for it so that it will suit the SAP format. Again it depends on your requirement..
    Please elaborate more about your requirement.
    Please have a look on below FM
    TEXT_CONVERT_XML_TO_SAP
    Also search on SCN there are many threads on the same topic available.
    http://abapreports.blogspot.com/2008/09/upload-xml-file-from-application-server.html
    This is the link which will give you the Code
    http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/Z_RMTIWARI_XML_TO_ABAP_46C.html
    Use this XML file to Upload the same, this Program will work for your XML file also,
    http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/input_xml.xml
    See the below thread also
    Upload XML to internal table and vice versa in SAP 4.6C
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Read XML file from presentation server

    Hi All,
    I want read XML file from presentation server currently i am using GUI_UPLOAD fm . but it is reading some junk data.
    DATA : BEGIN OF upl OCCURS 0,
              f(255) TYPE c,
           END OF upl.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename = D:\XX.XML'
          filetype = 'BIN'
        TABLES
          data_tab = upl.
    is there any other alternative.
    Thanks
    Swarup,

    Hi Swarup,
    Use method IMPORT_FROM_FILE of class CL_XML_DOCUMENT.
    A sample code snippet :-
    PARAMETERS: p_filnam TYPE localfile OBLIGATORY
    DEFAULT 'C:\Documents and Settings\ssaha\Desktop\test.xml'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_filnam.
    DATA: l_v_fieldname TYPE dynfnam.
    l_v_fieldname = p_filnam.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    program_name = syst-cprog
    dynpro_number = syst-dynnr
    field_name = l_v_fieldname
    IMPORTING
    file_name = p_filnam.
    START-OF-SELECTION.
    TYPES:
    BEGIN OF ty_tab,
    name TYPE string,
    value TYPE string,
    END OF ty_tab.
    DATA:
    lcl_xml_doc TYPE REF TO cl_xml_document,
    v_subrc TYPE sysubrc,
    v_node TYPE REF TO if_ixml_node,
    v_child_node TYPE REF TO if_ixml_node,
    v_root TYPE REF TO if_ixml_node,
    v_iterator TYPE REF TO if_ixml_node_iterator,
    v_nodemap TYPE REF TO if_ixml_named_node_map,
    v_count TYPE i,
    v_index TYPE i,
    v_attr TYPE REF TO if_ixml_node,
    v_name TYPE string,
    v_prefix TYPE string,
    v_value TYPE string,
    v_char TYPE char2.
    DATA:
    itab TYPE STANDARD TABLE OF ty_tab,
    wa TYPE ty_tab.
    CREATE OBJECT lcl_xml_doc.
    CALL METHOD lcl_xml_doc->import_from_file
    EXPORTING
    filename = p_filnam
    RECEIVING
    retcode = v_subrc.
    CHECK v_subrc = 0.
    v_node = lcl_xml_doc->m_document.
    CHECK NOT v_node IS INITIAL.
    v_iterator = v_node->create_iterator( ).
    v_node = v_iterator->get_next( ).
    WHILE NOT v_node IS INITIAL.
    CASE v_node->get_type( ).
    WHEN if_ixml_node=>co_node_element.
    v_name = v_node->get_name( ).
    v_nodemap = v_node->get_attributes( ).
    IF NOT v_nodemap IS INITIAL
    * attributes
    v_count = v_nodemap->get_length( ).
    DO v_count TIMES.
    v_index = sy-index - 1.
    v_attr = v_nodemap->get_item( v_index ).
    v_name = v_attr->get_name( ).
    v_prefix = v_attr->get_namespace_prefix( ).
    v_value = v_attr->get_value( ).
    ENDDO.
    ENDIF.
    WHEN if_ixml_node=>co_node_text OR
    if_ixml_node=>co_node_cdata_section.
    * text node
    v_value = v_node->get_value( ).
    MOVE v_value TO v_char.
    IF v_char <> cl_abap_char_utilities=>cr_lf.
    wa-name = v_name.
    wa-value = v_value.
    APPEND wa TO itab.
    CLEAR wa.
    ENDIF.
    ENDCASE.
    * advance to next node
    v_node = v_iterator->get_next( ).
    ENDWHILE.
    LOOP AT itab INTO wa.
    ENDLOOP.
    Regards
    Abhii

  • How to read a XML file from BLOB column and insert in a table - PL/SQL Only

    Hi,
    To make data load more simple to end user instead placing file on the server and use SQL-LOADER, I came up with new idea that using oracle ebusiness suite attachment functionality. that loads a XML file from local PC to a database column(table is fnd_attachments, default data type is BLOB over here).
    I tried with DBMS_LOB and didnt get around.
    Please can anyone tell me how to read the BLOB column using PL/SQL and store the data in a oracle table. Here's the sample XML file and table structure FYI.
    <?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="Corporate_alloc.xsd" generated="2009-07-07T14:17:49">
    <Corporate_alloc>
    <PKG_CODE>BKCORP</PKG_CODE>
    <PKG_NAME>Corporate Edition - Books</PKG_NAME>
    <DET_CODE>B9780080543758</DET_CODE>
    <DET_NAME>Waves, Tides and Shallow-Water Processes</DET_NAME>
    <ALLOCATION_RATIO>0.000041</ALLOCATION_RATIO>
    </Corporate_alloc>
    <Corporate_alloc>
    <PKG_CODE>BKCORP</PKG_CODE>
    <PKG_NAME>Corporate Edition - Books</PKG_NAME>
    <DET_CODE>B9780080534343</DET_CODE>
    <DET_NAME>Hydrostatically Loaded Structures</DET_NAME>
    <ALLOCATION_RATIO>0.000127</ALLOCATION_RATIO>
    </Corporate_alloc>
    </dataroot>
    CREATE TABLE TEST_XML
    ( PKG_CODE VARCHAR2(50),
    PKG_NAME VARCHAR2(100),
    DET_CODE VARCHAR2(20),
    DET_NAME VARCHAR2(500),
    ALLOCATION_RATIO NUMBER )
    Thanks
    EBV

    In regards to #3, use the COLUMNS functionality of XMLTable instead of using Extract. Two simple examples are
    Re: XML Data - Caliculate fields
    Re: Extractvalue function not recognised

  • Reading XML file from specific location&Storing xmldata into related tables

    I am new to xml.
    My requirement is,
    1) Get the xml file from specified location (C:\xmlfiles\ xmldata.xml)
    2)Convert xml data in clob data.
    3)store the data into related table.
    and vice-versa.
    What i did,
    a) I got the data from related tables and converted into xmlformat using SQLX
    b)converted this resultset into clob data and stored as xml file in specific location.
    It uses more then ten tables.
    All this help i got from AskTom site , thanks for that.
    Now i have to do vise-versa, i.e. i have to perform 1), 2), 3) steps........
    Please tell me proper steps to acheive it.
    Thanks in advance for giving your precious time to solve my issue.

    Have you read the"XMLDB FAQ" in this Forum?
    You could use stuff like:
    create or replace directory xmldir as C:\xmlfiles'
    declare
    xmldata xmltype;
    begin
    xmldata := xmltype(bfilename('XMLDIR','xmldata.xml'),nls_charset_id('AL32UTF8'));
      -- etc, etc your code --
      -- --> convert to clob by using for instance getclobval() function
      -- --> then insert the data in your relational table with CLOB column
      -- etc, etc your code --
    end;
    /

  • 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.

  • Read text file into clob column

    Dear Oracle users and Oracle support,
    I have a text file that includes hundreds of data entries. The format is below. What I need to do is read each entry (
    <DATALOAD ................</DATALOAD>) into the CLOB column as a table record. Then create a loop in the table to convert each record into XML data type. I have general idea on how to convert CLOB to XML. The difficult part to me is read the each entry in the text file to CLOB table. Please let me know what technique I should use. Any recommendation and sample code are welcome! I appreciate!
    Thanks,
    Bing
    <DATALOAD ................</DATALOAD>
    <DATALOAD ................</DATALOAD>
    <DATALOAD ................</DATALOAD>
    <DATALOAD ................</DATALOAD>

    RBYL wrote:
    Hi,
    Thank you for your response. What I want to achieve is read the text file into ClOB column. There are hundreds reocords in the text file. The format is below. Each entry is '<DATALOAD (sensitive data here, use....... instead)</DATALOAD>' that needs to be read into clob table as a record. That is basically what I need to achieve.
    <DATALOAD ................</DATALOAD>
    <DATALOAD ................</DATALOAD>
    hundreds of them here........
    <DATALOAD ................</DATALOAD>
    <DATALOAD ................</DATALOAD>So, is it really a text file or is it a well structured XML file?
    Just reading it into a CLOB to process is not likely to be the best way.
    If each line of the file is a record, then you're likely to be better using something like External Tables.
    If it's a structured XML file, then it can be read using CLOB functionality into an XMLTYPE datatype and then shredded down into relational table structures.
    Be more clear in what your requirements are and we can help you better.
    {message:id=9360002}

Maybe you are looking for

  • Problems with Privileges

    Hi, I have a development env of my application on my desktop, for which I am using the developer's version of Oracle 9.2.0.1.0. My tables are spread across 3 different schemas (A, C and S)and I need a common role/ user to be able to access all 3 sche

  • CANT USE BLUETOOTH HEADSET AS AUDIO DEVICE

    I just got a bluetooth headset today, paired it with my imac, went into teh sound settings, then selected it as my audio input and output device. was working fine all day then all of a sudden it stopped working and no matter what i do it will not sho

  • Loading hierarchy from r3 to BW

    Hi, I am trying to load a hierarchy from R3 to BW, but once in BW i do not see any hierarchy. I have checked if the hierarchy was activated in R3 and it is, do you know any reason or solution? Do you know where I can find information about the steps

  • Re-installing Iphoto 4.0

    I have a first edition Imac with the flat screen running osx10.3.9 and have 768 ram. I purchased Ilife 06. Iphoto won't install. It gets down to updating the library and crashes just before completing the install. I have been on the Iphoto 6.0 discus

  • Dwm and youtube fullscreen

    When I press the fullscreen button on videos on youtube.com, nothing happens apart from my screen flashing. My window manager is dwm and browser firefox. Thanks for any help. PS: just to clarify, I am not talking about the fullscreen function of the