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;

Similar Messages

  • 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

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

  • 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

  • Can Document Builder parse an XML file from a URL?

    Warning: Java newbie here...
    My problem is that I am able to parse an XML file if it is copied into my project, but not if it is a full URL. Here is what I got so far, that works.
    import java.io.*;
    import java.net.*;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    try {
        File file = new File("path/to/file.xml");
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        DocumentBuilder db = dbf.newDocumentBuilder();
        Document doc = db.parse(file);
        doc.getDocumentElement().normalize();
        NodeList nodeLst = doc.getElementsByTagName("Names");
        for (int s = 0; s < nodeLst.getLength(); s++) {
            Node parentNode = nodeLst.item(s);
            if (parentNode.getNodeType() == Node.ELEMENT_NODE) {
                Element parentElmnt = (Element) parentNode;
                NodeList nameElmntLst = parentElmnt.getElementsByTagName("Name");
                //etc.
    } catch (Exception e){
        e.printStackTrace();
    }So building off of this I have tried to parse an input stream like this:
    URL url = new URL("http://example.com/file.xml");
    InputStream is = url.getInputStream();
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse(is);which gives me the following error
    [Fatal Error] :-1:-1: Premature end of file.
    LOG: HME receiver connected
    org.xml.sax.SAXParseException: Premature end of file.
    I also even tried to write the file locally like this:
    URL url = new URL("http://example.com/file.xml");
    HttpURLConnection urlcon = (HttpURLConnection) url.openConnection();
    urlcon.connect();
    InputStream is = urlcon.getInputStream();
    File file = new File("path/to/file.xml");
    OutputStream out = new FileOutputStream(file);
    byte buf[] = new byte[1024];
    int len;
    while((len=is.read(buf))>0)
        out.write(buf,0,len);
    out.close();
    is.close();
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse(file);This gives the same error.
    If anyone can point me in the right direction I would forever thankful. I've tried search Google and the Sun forums, but haven't quite found the solution. I think it is because I need to try something else completely. Thank you for reading.
    ~~~~ Jeremy

    jmose wrote:
    If I copy the page, it works as shown in the first code block. In the third codeblock the file is never even created, so I cannot tell if that works or not.So: having the parser access the URL fails, and having some other Java code access the URL also fails in the identical way? That suggests the problem is simply accessing the URL via Java code. Presumably when you downloaded the data from the URL, you used a browser to do it and not wget or something like that?

  • Creating xml file and inert tin to xml file in clob column

    i have a table
    CREATE TABLE XMLCLOB of XMLType
    XMLTYPE store AS CLOB;
    now i want to create a xml file by qurying emp table ie select sal,empname from emp.
    the cretaed xml file is saved in the xmlclob table how to do that?

    You will need to use Oracle XML function EXTRACT or EXTRACTVALUE in order to read the data before inserting into Oracle table. These functions need to be used in select statement.
    Syntax:
    EXTRACT(XMLType_Instance>, <XPath_string>, <namespace_string>)
    EXTRACTVALUE(XMLType_Instance>, <XPath_string>, <namespace_string>)

  • XML Extract from CLOB Column

    We have some XML data loaded into CLOB columns, for reasons too long to explain here we are not using the XMLTYPE, but we do need to extract rows based on conditions of the XML data. For performance reasons we do not want to index the CLOB column. I am looking at ways of inspecting the XML and returning matching results by casting the CLOB out as XMLTYPE and opening up xpath/xquery functions - but need this to be efficient. I have initially used extract().getXXXXVal in the where clause of a select statement, ie. where x.xmltype(clob_col).extract('<xpath>').getNumberVal = nn, but have found this very inefficient with memory usage increasing consistently and CPU hitting 100%. can anyone suggest some alternative methods?

    Hi
    In expression operator ignore "PLS-00201: identifier 'EXTRACTVALUE' must be declared" .
    In Mapping Level Configure Default Operating Mode : Setbased and
    Generation Mode : Setbased
    and deploy and execute your mapping.

  • Display XML Document from CLOB Column on page

    Hi,
    I have been reading all the CLOB postings that I can find, but I still cannot get my page to do what I want.
    I have a very simjple table:
    MF_XML_DOCS (DOC_ID NUMBER, DOC_XML CLOB)
    I can populate this table OK but I am having problems getting the cotent back out. I want a simple page that takes an ID Number and displays the XML Document for that ID (select doc_xml from mf_xml_docs where doc_id = :P1_DOC_ID). Everything I try either truncates the text (or errors) at 4000 or 32767 characters or reads the XML tags as tags and does not display them. I want a simple display of the XML Document (and I don't mind if it is in an 'updateable' field or not):
    <Parent>
       <name>Dad</name>
       <Children>
          <Child>
             <name>Number 1 Son</name>
         </Child>
          <Child>
             <name>Number 2 Son</name>
         </Child>
       </children>
    </Parent>But when I do something that works for large (32767+) documents all I see is 'Dad Number 1 Son Number 2 Son'.
    Help!!
    many thanks,
    Martin

    Have you tried simply outputting iusing the htp.p function? for example:
    /* ... inside a PL/SQL region */
    declare
       lclb_output clob;
    begin
       select doc_xml into lclb_output from mf_xml_docs where doc_id = :P1_DOC_ID;
       htp.p(lclb_output); -- you may have to split this into chunks and loop through, depending on how big the clob is
    end;

  • Parsing XML files from application server

    I need to read  an XML file from the application server. This can be done using OPEN DATASET in BINARY MODE and reading into internal table of type binary data.
    But inorder to parse the document using the iXML library, i need to pass the filesize of the XML file that is read into internal table.
    Please let me know how to calculate this filesize ?

    Hi ,
    Check the FM : /SAPDMC/LSM_F4_SERVER_FILE.
    Inside this FM , subroutine below exists.The main program for routine is /SAPDMC/LLSMW_AUX_020F02.
    Call this routine from your program. You will get the length in bytes from the field len of table pt_file.
    data:
      begin of gs_file,
        directory(75) type c,              " name of directory.
                                           " (possibly truncated.)
        name(75)    type c,                " name of entry.
                                           " (possibly truncated.)
        type(10)    type c,                " type of entry: directory, file
        *len(8)      type p,                " length in bytes*
        owner(8)    type c,                " owner of the entry
        mtime(6)    type p,                " last modification date,
                                           " seconds since 1970
        mode(9)     type c,                " like "rwx-r-x--x":
                                           " protection mode
        errno(3)    type c,
        errmsg(40)  type c,
        mod_date    type d,
        mod_time(8) type c,                " hh:mm:ss
        subrc like sy-subrc,
    end of gs_file.
    DATA : pt_file LIKE TABLE OF gs_file.
    DATa : p_ok.
      PERFORM /sapdmc/llsmw_aux_020f02(directory_contents_get)
      TABLES   pt_file
                                USING    '/TMP' ""!!! Here is your filepath
                                CHANGING p_ok

  • Error parsing XML file from a HttpServletRequest using JAXP

    Hi,
    I am trying to generate an XML file from an HttpServletRequest. I am actually using file uploading method in JSP to send the XML file. I think the parser isnt able to correctly identify the XML file from the message body and hence it is giving some strange error messages. Has anyone of u managed to solve this problem ?
    Code snippet:
    //now build an XML document from the requested input stream
    InputStream in = myRequest.getInputStream();
    try {
    myDocRequest = myParser.parse(in);
    } catch (Throwable t) {
    throw new Exception("Could not build document",t);
    Error message is:
    [Fatal Error] :1:1: Content is not allowed in prolog.
    java.lang.Exception: Could not build document
    at XMLUtil.<init>(XMLUtil.java:91)
    at WCS.doPost(WCS.java:44)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
    at XMLUtil.<init>(XMLUtil.java:89)
    ... 20 more
    Actually if i just print out the message, it gives something like this:
    -----------------------------7d63dc71b06b2
    Content-Disposition: form-data; name="W"; filename="C:\work_projects\Capas.xml"
    Content-Type: text/xml
    <?xml version="1.0" encoding="UTF-8"?>
    <GetCapabilities version="1.0.0" service="wcs">
    <section>/WCS_Capabilities/Capability</section>
    </GetCapabilities>
    -----------------------------7d63dc71b06b2--
    Cheers.

    The ServletInput stream contains this:
    -----------------------------7d63dc71b06b2
    Content-Disposition: form-data; name="W"; filename="C:\work_projects\Capas.xml"
    Content-Type: text/xml
    <?xml version="1.0" encoding="UTF-8"?>
    i.e., its the HTTP File Upload MIME stuff, followed by the XML. You need to wrap around the input stream something that can decode the HTTP MIME stuff and let you get at the XML itself, i.e., something like: com.orielly.servlet.multipart.MultipartParser (Apache has a similar 'file upload servlet).
    Jeremy

  • Upload xml file from aplication server using read dataset, parser error.

    Hi,
    I would like to upload xml file from app. server but parser failed. If I upload this xml file from workstation (using ws_upload) it is correct. For uploading xml file from app. server I use open dataset... read dataset. In loop section I remove '#' char. How do You upload xml file from app server? What Could be incorrect.
    I try to open dataset in binary mode, text mode...
    TYPES: BEGIN OF xml_line,
            data(255) TYPE c,
          END OF xml_line.
    DATA: gt_xml_table TYPE TABLE OF xml_line,
          gs_xml_structure TYPE  xml_line,
          gv_xml_table_size TYPE i.
    OPEN DATASET s FOR INPUT IN BINARY MODE.
      IF sy-subrc <> 0.
        MESSAGE e001(zet) WITH '....'.
      ENDIF.
      DO.
        READ DATASET s INTO gs_xml_structure.
        IF sy-subrc <> 0.
          EXIT.
        ELSE.
         len = STRLEN( gs_xml_structure ).
         len = len - 1.
         check len > 0.
         WRITE gs_xml_structure(len) TO gs_xml_structure.
          APPEND gs_xml_structure TO gt_xml_table.
        ENDIF.
      ENDDO.

    You Can do this too
    parameters: p_file like rlgrap-filename.
    data: subrc like sy-subrc.
      create object me.
      REFRESH t_data.
    *  Open XML File
      CALL METHOD me->CREATE_WITH_FILE
        EXPORTING
          filename = p_file
        RECEIVING
          retcode  = subrc.
    * Saves Data in an itab from XML File.
      CALL METHOD me->get_data
        IMPORTING
          retcode    = subrc
        CHANGING
          dataobject = t_data[].
    Regards,
    Claudio.

  • How to parse XML files from normal FTP Servers?

    I want to parse xml files from a normal FTP Servers , NOT the sap application severs itself. How can i do that?
    I know how to use the SAPFTP getting and putting files ,but I don't want to download and then parse it.
    Who knows how to parse it directly? I Just need to read the contents into a database.
    Thanks.

    I want to parse xml files from a normal FTP Servers , NOT the sap application severs itself. How can i do that?
    I know how to use the SAPFTP getting and putting files ,but I don't want to download and then parse it.
    Who knows how to parse it directly? I Just need to read the contents into a database.
    Thanks.

  • Loading XML files from URL

    Hi.
    My PL/SQL procedure loading xml files from oracle logical directory ("c:\temp") and inserting values into columns of the table. I use XSU with procedure:
    create or replace procedure insProc(xmlDoc IN CLOB, tableName IN VARCHAR2) is
    insCtx DBMS_XMLSave.ctxType;
    rows number;
    begin
    insCtx := DBMS_XMLSave.newContext(tableName); -- get the context handle
    rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc); -- this inserts the document
    DBMS_XMLSave.closeContext(insCtx); -- this closes the handle
    end;
    For translate xml document to CLOB, I use :
    CREATE OR REPLACE function getdocument(
    p_directory in varchar2,
    p_filename in varchar2)
    return clob
    is
    l_bfile bfile;
    l_clob clob;
    begin
    l_bfile := bfilename(p_directory, p_filename);
    dbms_lob.open(l_bfile);
    dbms_lob.createtemporary(l_clob, true, dbms_lob.session);
    dbms_lob.loadfromfile(l_clob, l_bfile, dbms_lob.getlength(l_bfile));
    dbms_lob.close(l_bfile);
    return l_clob;
    end getdocument;
    I didn't have problem with this procedures. But now i want load my xml files from another computer (i want use URL, not oracle logical directory).
    How can i do it, using standart PL/SQL methods?

    Since you are parsing the XML what prevents you from delaying your requests for the image URL's? You can just as well add the image URL's to some kind of collection and load them after you have processed all the text content.

  • How to read/write .CSV file into CLOB column in a table of Oracle 10g

    I have a requirement which is nothing but a table has two column
    create table emp_data (empid number, report clob)
    Here REPORT column is CLOB data type which used to load the data from the .csv file.
    The requirement here is
    1) How to load data from .CSV file into CLOB column along with empid using DBMS_lob utility
    2) How to read report columns which should return all the columns present in the .CSV file (dynamically because every csv file may have different number of columns) along with the primariy key empid).
    eg: empid report_field1 report_field2
    1 x y
    Any help would be appreciated.

    If I understand you right, you want each row in your table to contain an emp_id and the complete text of a multi-record .csv file.
    It's not clear how you relate emp_id to the appropriate file to be read. Is the emp_id stored in the csv file?
    To read the file, you can use functions from [UTL_FILE|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#BABGGEDF] (as long as the file is in a directory accessible to the Oracle server):
    declare
        lt_report_clob CLOB;
        l_max_line_length integer := 1024;   -- set as high as the longest line in your file
        l_infile UTL_FILE.file_type;
        l_buffer varchar2(1024);
        l_emp_id report_table.emp_id%type := 123; -- not clear where emp_id comes from
        l_filename varchar2(200) := 'my_file_name.csv';   -- get this from somewhere
    begin
       -- open the file; we assume an Oracle directory has already been created
        l_infile := utl_file.fopen('CSV_DIRECTORY', l_filename, 'r', l_max_line_length);
        -- initialise the empty clob
        dbms_lob.createtemporary(lt_report_clob, TRUE, DBMS_LOB.session);
        loop
          begin
             utl_file.get_line(l_infile, l_buffer);
             dbms_lob.append(lt_report_clob, l_buffer);
          exception
             when no_data_found then
                 exit;
          end;
        end loop;
        insert into report_table (emp_id, report)
        values (l_emp_id, lt_report_clob);
        -- free the temporary lob
        dbms_lob.freetemporary(lt_report_clob);
       -- close the file
       UTL_FILE.fclose(l_infile);
    end;This simple line-by-line approach is easy to understand, and gives you an opportunity (if you want) to take each line in the file and transform it (for example, you could transform it into a nested table, or into XML). However it can be rather slow if there are many records in the csv file - the lob_append operation is not particularly efficient. I was able to improve the efficiency by caching the lines in a VARCHAR2 up to a maximum cache size, and only then appending to the LOB - see [three posts on my blog|http://preferisco.blogspot.com/search/label/lob].
    There is at least one other possibility:
    - you could use [DBMS_LOB.loadclobfromfile|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i998978]. I've not tried this before myself, but I think the procedure is described [here in the 9i docs|http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl12bfl.htm#879711]. This is likely to be faster than UTL_FILE (because it is all happening in the underlying DBMS_LOB package, possibly in a native way).
    That's all for now. I haven't yet answered your question on how to report data back out of the CLOB. I would like to know how you associate employees with files; what happens if there is > 1 file per employee, etc.
    HTH
    Regards Nigel
    Edited by: nthomas on Mar 2, 2009 11:22 AM - don't forget to fclose the file...

  • 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;
    /

Maybe you are looking for

  • Icloud Lost photos in Camera Roll when I backed up to my Mac

    I recently took a bunch of photos (while synced with icloud) and upgraded my phone from 4g to 4gs...I saw my pictures on the phone prior to syncing to my computer (macbook). When I synced my phone to my computer, off of the old back-up (on my mac), i

  • How to chante the PDF File Name in Broadcasting

    Hi Team,      Could you help me?, I am in a project where the customer need  the Following requirement with the PDF File Name in the Broadcasting: I am configuring one distribution Job in Broadcasting configuration Tab this Job need send a report via

  • URGENT Check this code for me please

    Dear whoeverthisreads, please read and see at the bottom my sourcecode, or whatever I could make of it until (even with help) I failed to see any solution. Please copy, paste and run to see if you can manage to adjust the program to make it work in t

  • Camcorder compatibility problem

    My new imac with leopard and imovie '08 does not recognize the same camcorder that works very well with my emac and imovie '05. My camcorder is a 2003 Canon ZR70 MC ( mini DV ). Are there any solutions to this problem other than buying a new camcorde

  • Album's hide feature must be password protected

    Hide feature of album must be password protected.. As currently via navigating to the hidden folder its very easy to retrieve & view the hidden images.. or either the hidden folder be password protected.. To view the content the user must enter the p