If condition in XML file

We are facing an issue while loading data from Data Collection report to rowsource. Actually we are loading data through one loader file which is .XML file. This loader file has mapping of Data Collection Report columns with rowsource columns. The Data Collection Report has following kind of scenario…
col1     col2     Measures     Jan     Feb     March
          Measure1     23     23     45
          Measure2     45     678     34
So as per above chart we have two measures: Measure1 and Measure2 having different kinds of data. Now we have to load data of two measures to the same column of the rowsource depending on the value of the 1st row (Jan, Feb, Etc)
Can we add if condition in loader file(.XML file) to check data of the 1st row as follows?
The loader file has the following kind of structure in .XML format…
<?xml version="1.0" encoding="UTF-8"?>
<load-specification xmlns="http://schemas.interlacesystems.com/2.0/load-specification"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.interlacesystems.com/2.0/load-specification loadspec-2.0.xsd">
<ms-excel-file sheet="Forecast Data Input" start-row="10" row-increment="6" skip-hidden- rows="false">
<pivot column="G" name="Measure1" relative-row="0" columns="K:V" type="double"/>
<pivot column="H" name="Measure2" relative-row="1" columns="K:V" type="double"/>
</ms-excel-file>
<load-rowsource rowsource="SalesForecast">
<simple-filter field="${revenue}:${panprevenue}" relop="NE" value=":" nolog="true"/>
If(data=”Jan”)
     <map column="revenue" value="${Measure1}"/>
else
     <map column="PANPRevenue" value="${Measure2}"/>
</load-rowsource>
</load-specification>
So could you please suggest us any solution on this or anyone has worked on similar issue?

I would suggest change in the xml specification as follows -
I am considering that there must be a column mapped to month (Jan, Feb,..)
<load-rowsource rowsource="SalesForecast">
<simple-filter field="${month}" relop="EQ" value="Jan" nolog="true"/>
<map column="revenue" value="${Measure1}"/>
</load-rowsource>
</load-specification>
<load-rowsource rowsource="SalesForecast">
<simple-filter field="${month}" relop="NE" value="Jan" nolog="true"/>
<map column="PANPRevenue" value="${Measure2}"/>
</load-rowsource>
</load-specification>
Please confirm.

Similar Messages

  • SAVE XML FILE Only For cetrain field with  Condition

    Hi Team,
    I have to save my journal entries as XML File.
    I have written this code ...It is working
    oJE.GetByKey(3)
                oJE.SaveXML("C:\Documents and Settings\Firos C\Desktop\MyXML3.xml")
    So this code will save all data from OJDT and JDT1. So I dont want to save JDT1.SysCred Field How we do this
    or how we can delete JDT1.SysCred Field  once we save our XML.
    Also I need to give condition while selecting where OJDT.Ref2 <> Null
    How we can resolve this issue...?
    By
    Firos

    Resolved by using XML node deletion operations

  • [svn:bz-trunk] 16330: QA: Yes - Ran test locally and it was failing but tested condition was true - there is no services-config .xml file

    Revision: 16330
    Revision: 16330
    Author:   [email protected]
    Date:     2010-05-26 07:55:41 -0700 (Wed, 26 May 2010)
    Log Message:
    QA: Yes - Ran test locally and it was failing but tested condition was true - there is no services-config.xml file
    Doc: No
    Checkintests: NA
    Details: Updated expected error message to match current error.
    Modified Paths:
        blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/NoServicesConfigFileTest/error.t xt

    I have uploaded detail.txt at below url.
    http://m.uploadedit.com/b041/1413264342685.txt
    Hi Mahesh,
    According to log file, I find the message ‘The setup100.exe.config file was not found, therefore the DTSWizard and SQLWatson app config files were not replaced’. It seems that the SQL Server setup file is not complete. Please check that if the SQL Server
    setup file is corrupted, if it is corrupted, please download it again and reinstall SQL Server 2008 R2.
    However, if there’s no problem with the setup file, please check that if there is third-party software such as anti-virus software on your computer blocking the process of SQL Server installation. In addition, make sure that you choose ‘Run as administrator’
    to launch the setup and configure SQL Server service accounts appropriately with administrator permission during the installation.
    For more details about this error, please review the following similar thread.
    http://answers.flyppdevportal.com/categories/sqlserver/sqlsetupandupgrade.aspx?ID=ad794a97-09ae-4aae-9d68-0b06f9af3e16
    Thanks,
    Lydia Zhang

  • JAVA Read XML file and modify attribute values based on some conditions

    I have the following XML file "C:/Data.xml".
    If the attributes on Dimension, Metirc, Data date Matches then Add the amount values and remove the duplicate DS node.
    I looked some examples on hashtable/hashmapping but I could not find that meets my creiteria. I appriciate any direction or suggestions on this.
    <ED LG="US">
    <DS name="1" source="A" freq="Day">
    <Dimension name="code" value="3">
    <Metric ref_name="A1-ACT">
    <Data date="2011-03-04T00:00:00" amount="30" />
    </Metric>
    </Dimension>
    </DS>
    <DS name="1" source="A" freq="Day">
    <Dimension name="code" value="3">
    <Metric name="A1-ACT">
    <Data date="2011-03-04T00:00:00" amount="40" />
    </Metric>
    </Dimension>
    </DS>
    <DS name="1" source="A" freq="Day">
    <Dimension name="code" value="3">
    <Metric name="A1-ACT">
    <Data date="2011-03-05T00:00:00" amount="20" />
    </Metric>
    </Dimension>
    </DS>
    </ED>
    Expected Result:
    <ED LG="US">
    <DS name="1" source="A" freq="Day">
    <Dimension name="code" value="3">
    <Metric ref_name="A1-ACT">
    <Data date="2011-03-04T00:00:00" amount="70" />
    </Metric>
    </Dimension>
    </DS>
    <DS name="1" source="A" freq="Day">
    <Dimension name="code" value="3">
    <Metric name="A1-ACT">
    <Data date="2011-03-05T00:00:00" amount="20" />
    </Metric>
    </Dimension>
    </DS>
    </ED>
    thanks
    Edited by: user7188033 on Mar 19, 2011 1:40 PM
    Edited by: user7188033 on Mar 19, 2011 2:01 PM
    Edited by: user7188033 on Mar 19, 2011 2:02 PM

    Use XSLT for transforming the XML document.

  • Issue in Creation of XML file from ABAP data

    Hi,
    I need to create a XML file, but am not facing some issues in creation of XML file, the in the required format.
    The required format is
    -<Header1 1st field= u201CValueu201D 2nd field= u201CValueu201D>
       - <Header2 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 10 fields>
              <Header3 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 6 fields/>
              <Header4  1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 4 fields/.>
               <Header5 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 6 fields/>
          </Header2>
       </Header1>
    Iu2019m using the call transformation to convert ABAP data to XML file.
    So please anybody can help how to define XML structure in transaction XSLT_TOOL.
    And one more thing, here I need to put the condition to display the Header 3, Header 4, Header 5 values. If there is no record for a particular line item in header 3, 4 & 5, I donu2019t want to display full line items; this is only for Header 3, 4 & 5.
    Please help me in this to get it resolved.

    Hello,
    you can use CALL TRANSFORMATION id, which will create a exact "print" of the ABAP data into the XML.
    If you need to change the structure of XML, you can alter your ABAP structure to match the requirements.
    Of course you can create your own XSLT but that is not that easy to describe and nobody will do that for you around here. If you would like to start with XSLT, you´d better start the search.
    Regards Otto

  • Issue in reading the XML file

    Hi Gurus,
    I am dier need of one of the xml issue which I am facing right now.
    I am reading one of the xml file which is like this
    <?xml version="1.0" encoding="UTF-8" ?>
    - <GEBIZ_ORDER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <HEADER>
      <MINISTRY_CODE>RPO</MINISTRY_CODE>
      <DEPARTMENT_CODE>000</DEPARTMENT_CODE>
      <ORDER_CODE>RPO000EPO11000953</ORDER_CODE>
      <EXTERNAL_SYSTEM_CODE>E</EXTERNAL_SYSTEM_CODE>
      <AMENDMENT_NUMBER>0</AMENDMENT_NUMBER>
      <VARIATION_NUMBER>0</VARIATION_NUMBER>
      <DESCRIPTION>Purchase Order for Air tickets for SOT to Korea (from 17th - 26th Sep 2011) off PC(RPO000ECN11000100)for SAS</DESCRIPTION>
      <STATUS>NEW</STATUS>
      <STATUS_DATE>2011-07-08T16:57:39</STATUS_DATE>
      <PAYMENT_TERMS xsi:nil="true" />
      <BILL_TO>One-Stop Centre, 9 Woodlands Avenue 9, S(738964)</BILL_TO>
      <JUSTIFICATION>Please refer to attached approval email.</JUSTIFICATION>
      <CREATE_TIMESTAMP>2011-07-08T16:57:39</CREATE_TIMESTAMP>
      <TERMINATE_REASON xsi:nil="true" />
      <TERMINATE_TIMESTAMP xsi:nil="true" />
      <ORDER_TYPE>1</ORDER_TYPE>
    - <FINANCIAL_SYSTEM>
      <SUB_BUSINESS_UNIT>RPS01</SUB_BUSINESS_UNIT>
      </FINANCIAL_SYSTEM>
    - <SUPPLIER>
      <CODE>200003048E</CODE>
      <NAME>Safe2Travel Pte Ltd</NAME>
      <GST_NUMBER>20-0003048-E</GST_NUMBER>
      <CONTACT_NAME>ONG PEI LENG</CONTACT_NAME>
      <CONTACT_PHONE>68233103</CONTACT_PHONE>
      <CONTACT_EMAIL>[email protected]</CONTACT_EMAIL>
      <CONTACT_FAX>68221636</CONTACT_FAX>
    - <SITES>
    - <SITE>
      <ID>1</ID>
      <NAME>ravel Pte Ltd</NAME>
      <PHONE>68233013</PHONE>
      <PHONE_EXTENSION xsi:nil="true" />
      <FAX>68221636</FAX>
      <EMAIL>[email protected]</EMAIL>
      <ADDRESS_LINE1>10 Eunos Road 8</ADDRESS_LINE1>
      <ADDRESS_LINE2>#08-03 (North Lobby)</ADDRESS_LINE2>
      <ADDRESS_LINE3>Singapore Post Centre</ADDRESS_LINE3>
      <COUNTRY_CODE>SG</COUNTRY_CODE>
      <PROVINCE xsi:nil="true" />
      <STATE xsi:nil="true" />
      <CITY xsi:nil="true" />
      <AREA_CODE xsi:nil="true" />
      <ZIP>408600</ZIP>
      <REGION_CODE xsi:nil="true" />
      </SITE>
    - <SITE>
      <ID>2</ID>
      <NAME>ravel Pte Ltd</NAME>
      <PHONE>62208866</PHONE>
      <PHONE_EXTENSION xsi:nil="true" />
      <FAX>62265578</FAX>
      <EMAIL>[email protected]</EMAIL>
      <ADDRESS_LINE1>3 Lim Teck Kim Road</ADDRESS_LINE1>
      <ADDRESS_LINE2>#02-02</ADDRESS_LINE2>
      <ADDRESS_LINE3>Singapore Technologies Building</ADDRESS_LINE3>
      <COUNTRY_CODE>SG</COUNTRY_CODE>
      <PROVINCE xsi:nil="true" />
      <STATE xsi:nil="true" />
      <CITY xsi:nil="true" />
      <AREA_CODE xsi:nil="true" />
      <ZIP>088934</ZIP>
      <REGION_CODE xsi:nil="true" />
      </SITE>
    - <SITE>
      <ID>3</ID>
      <NAME>Safe2Travel Pte Ltd</NAME>
      <PHONE>62208866</PHONE>
      <PHONE_EXTENSION xsi:nil="true" />
      <FAX>62265578</FAX>
      <EMAIL>[email protected]</EMAIL>
      <ADDRESS_LINE1>3 Lim Teck Kim Road</ADDRESS_LINE1>
      <ADDRESS_LINE2>#02-02</ADDRESS_LINE2>
      <ADDRESS_LINE3>Singapore Technologies Building</ADDRESS_LINE3>
      <COUNTRY_CODE>SG</COUNTRY_CODE>
      <PROVINCE xsi:nil="true" />
      <STATE xsi:nil="true" />
      <CITY xsi:nil="true" />
      <AREA_CODE xsi:nil="true" />
      <ZIP>088934</ZIP>
      <REGION_CODE xsi:nil="true" />
      </SITE>
      </SITES>
      </SUPPLIER>
    - <USER>
      <CODE>JOYCE SOON</CODE>
      <NAME>JOYCE SOON</NAME>
      <ORGANISATION_NAME>Republic Polytechnic</ORGANISATION_NAME>
      </USER>
    - <FUND_COMMIT_AMOUNT>
      <CURRENCY_CODE>SGD</CURRENCY_CODE>
      <CURRENCY_RATE>1</CURRENCY_RATE>
      <CURRENCY_RATE_DATE>1900-01-01T00:00:00</CURRENCY_RATE_DATE>
      <CURRENCY_RATE_TYPE>BOOK</CURRENCY_RATE_TYPE>
      <CURRENCY_AMOUNT>21551.4</CURRENCY_AMOUNT>
      </FUND_COMMIT_AMOUNT>
    - <PERIOD_CONTRACT>
      <CODE>RPO000ECN11000100</CODE>
      <AGENCY_CODE>RPO000</AGENCY_CODE>
      <ADMIN_FEE_SGD_AMOUNT>0</ADMIN_FEE_SGD_AMOUNT>
      </PERIOD_CONTRACT>
    - <BUYER>
      <ORGANISATION_CODE>1</ORGANISATION_CODE>
      <ORGANISATION_NAME>Republic Polytechnic</ORGANISATION_NAME>
      <NAME>Sally Ang</NAME>
      <PHONE>31001711</PHONE>
      <FAX>64151310</FAX>
      <EMAIL>[email protected]</EMAIL>
      </BUYER>
      <APPROVING_OFFICERS />
      </HEADER>
    - <ITEMS>
    - <ITEM>
      <LINE_NUMBER>1</LINE_NUMBER>
      <STATUS>NEW</STATUS>
      <STATUS_DATE>2011-07-08T16:57:39</STATUS_DATE>
      <DESCRIPTION>Return Air Ticket including Airport Taxes and Fuel Surcharges (2 staff and 24 students)</DESCRIPTION>
      <UNIT_OF_MEASURE>PAX</UNIT_OF_MEASURE>
      <QUANTITY>26</QUANTITY>
      <LINE_TYPE>SERVICES</LINE_TYPE>
      <UNIT_PRICE>828.9</UNIT_PRICE>
      <PRICE_UNIT>1</PRICE_UNIT>
      <TOTAL_AMOUNT>21551.4</TOTAL_AMOUNT>
      <MATERIAL_MASTER_CODE xsi:nil="true" />
      <MATERIAL_GROUP_CODE xsi:nil="true" />
      <PLANT_CODE xsi:nil="true" />
      <ITEM_CATEGORY_CODE xsi:nil="true" />
      <ADMIN_FEE_SGD_AMOUNT>0</ADMIN_FEE_SGD_AMOUNT>
      <INSTRUCTION_TO_SUPPLIER>Purchase of goods/services is subject to the Terms & Conditions found in www.rp.sg/purchase and/or in the ITQ/ITT Specifications. Please liaise with the Contact Person for delivery details. Invoice MUST be addressed to the Contact Person. PO number MUST be included in the Description field under e-Invoice Details section at Vendor@Gov.</INSTRUCTION_TO_SUPPLIER>
      <PERIOD_CONTRACT_LINE_NUMBER>1</PERIOD_CONTRACT_LINE_NUMBER>
      <GOODS_INSPECT_FLAG>N</GOODS_INSPECT_FLAG>
    - <PURCHASE_REQUEST>
      <CODE>RPO000EPR11000465</CODE>
      <LINE_NUMBER>1</LINE_NUMBER>
      </PURCHASE_REQUEST>
    - <PART_NUMBER_INFORMATION>
      <NATO_STOCK_NUMBER xsi:nil="true" />
      <MANUFACTURER_PART_NUMBER xsi:nil="true" />
      <PART_NUMBER xsi:nil="true" />
      <CAGE_CODE xsi:nil="true" />
      <CAGE_NAME xsi:nil="true" />
      <ITEM_CONDITION xsi:nil="true" />
      <MINIMUM_SHELF_LIFE xsi:nil="true" />
      <SHELF_LIFE_REMAINING xsi:nil="true" />
      <CERTIFICATE_OF_CONFORMANCE xsi:nil="true" />
      <EXPORT_LICENSE xsi:nil="true" />
      </PART_NUMBER_INFORMATION>
    - <LOCATIONS>
    - <LOCATION>
      <LINE_NUMBER>1</LINE_NUMBER>
      <STATUS>NEW</STATUS>
      <STATUS_DATE>2011-07-08T16:57:39</STATUS_DATE>
      <QUANTITY>26</QUANTITY>
      <DELIVERY_DESTINATION>Republic Polytechnic, One-Stop Centre, 9 Woodlands Avenue 9, S(738964)</DELIVERY_DESTINATION>
      <DELIVERY_DATE>2011-07-11T00:00:00</DELIVERY_DATE>
      <DELIVERY_TERMS>LOC</DELIVERY_TERMS>
      <PORT_OF_ORIGIN>-</PORT_OF_ORIGIN>
    - <RECIPIENT>
      <CODE>OSC</CODE>
      <NAME>One Stop Centre</NAME>
      <PHONE>65103000</PHONE>
      <EMAIL>[email protected]</EMAIL>
      </RECIPIENT>
    - <DISTRIBUTIONS>
    - <DISTRIBUTION>
      <LINE_NUMBER>1</LINE_NUMBER>
      <STATUS>NEW</STATUS>
      <STATUS_DATE>2011-07-08T16:57:39</STATUS_DATE>
      <QUANTITY>26</QUANTITY>
      <CHART_OF_ACCOUNT>1/G01/3SAS/020/220908/0000/0000/0000</CHART_OF_ACCOUNT>
      <PROJECT_DISTRIBUTION xsi:nil="true" />
      </DISTRIBUTION>
      </DISTRIBUTIONS>
      </LOCATION>
      </LOCATIONS>
      </ITEM>
      </ITEMS>
      </GEBIZ_ORDER>I was able to read this kind of file structure but due to some constraints now they added supplier sites and increment that one which will be like variable kind of thing now.
    And below mentioned is the script which I am using right now for reading that xml file
    PROCEDURE XGBZPROD.XGBZ_PUR_ORD_XMLTAG_PROC(P_XML_FILE IN VARCHAR2, P_FOLDER_NAME IN VARCHAR2)
    IS
      lv_supp_file     XMLTYPE;
      lv_hdr_error     VARCHAR2(240);
      lv_line_error    VARCHAR2(240);
      lv_line_loc_err  VARCHAR2(240);
      lv_dist_err      VARCHAR2(240);
      l_file_name      VARCHAR2(300);
      l_folder_name    VARCHAR2(300);
      lv_sysdate       DATE := sysdate;
    BEGIN
      l_file_name     := p_xml_file;
      l_folder_name   := p_folder_name;
      -- this clause to check whether is xml file or NODATA FILE.
      IF upper(substr(l_file_name,instr(l_file_name,'.',1)+1,3)) ='XML' THEN
        lv_supp_file  := xmltype( bfilename('XMLDIR',P_XML_FILE), nls_charset_id('AL32UTF8'));
        dbms_output.put_line('P_XML_FILE '||P_XML_FILE);
    -- Initially insert data into 11g table
    -- This is to read xml datafile
      INSERT INTO XGBZ_PO_XML_DETAILS
       (ministry_code                ,
        department_code              ,
        order_code                   ,
        external_system_code         ,
        amendment_number             ,
        variation_number             ,
        description                  ,
        status                       ,
        status_date                  ,
        payment_terms                ,
        bill_to                      ,
        justification                ,
        create_timestamp             ,
        terminate_reason             ,
        terminate_timestamp          ,
        order_type                   ,
        sub_business_unit            ,
        cost_center_group            ,
        buyer_code                   ,
        financial_system_order_code  ,
        user_nric                    ,
        supplier_code                ,
        supplier_name                ,
        gst_number                   ,
        contact_name                 ,
        contact_phone                ,
        contact_email                ,
        contact_fax                  ,
        supp_site_id                 ,
        supp_site_name               ,
        supp_site_phone              ,
        supp_sit_phone_ext           ,
        supp_site_fax                ,
        supp_site_email              ,
        supp_site_add_line1          ,
        supp_site_add_line2          ,
        supp_site_add_line3          ,
        supp_site_country_code       ,
        supp_site_province           ,
        supp_site_state              ,
        supp_site_city               ,
        supp_site_area_code          ,
        supp_site_zip                ,
        supp_site_region_code        ,
        user_code                    ,
        user_name                    ,
        user_org_name                ,
        currency_code                ,
        currency_rate                ,
        currency_rate_date           ,
        currency_rate_type           ,
        currency_amount              ,
        tx_field_2                   ,
        agency_code                  ,
        admin_fee_sgd                ,
        buyer_orgn_code              ,
        buyer_orgn_name              ,
        buyer_name                   ,
        buyer_phone                  ,
        buyer_fax                    ,
        buyer_email                  ,
        ao_code                      ,
        ao_name                      ,
        line_no                      ,
        line_status                  ,
        line_status_date             ,
        line_description             ,
        unit_of_measure              ,
        line_qty                     ,
        line_type                    ,
        unit_price                   ,
        line_total_amount            ,
        material_master_code         ,
        material_group_code          ,
        item_category_code           ,
        line_admin_fee_sgd_amt       ,
        instruction_supplier         ,
        period_contract_line_no      ,
        goods_inspect_flag           ,
        pr_code                      ,
        pr_line_number               ,
        nato_stock_number            ,
        manufacturer_part_no         ,
        part_number                  ,
        cage_code                    ,
        cage_name                    ,
        item_condition               ,
        minimum_shelf_life           ,
        shelf_life_remaining         ,
        cert_of_conformance          ,
        export_license               ,
        line_location_no             ,
        line_loc_status              ,
        line_loc_status_date         ,
        line_loc_qty                 ,
        delivery_destination         ,
        delivery_date                ,
        delivery_terms               ,
        port_of_origin               ,
        recipient_code               ,
        recipient_name               ,
        recipient_phone              ,
        recipient_email              ,
        dist_line_no                 ,
        dist_line_status             ,
        dist_line_status_date        ,
        dist_line_qty                ,
        chart_of_account             ,
        project_distribution
       SELECT --Header Data
              ministry_code                ,
              department_code              ,
              order_code                   ,
              external_system_code         ,
              amendment_number             ,
              variation_number             ,
              description                  ,
              status                       ,
              status_date                  ,
              payment_terms                ,
              bill_to                      ,
              justification                ,
              create_timestamp             ,
              terminate_reason             ,
              terminate_timestamp          ,
              order_type                   ,
              sub_business_unit            ,
              cost_center_group            ,
              buyer_code                   ,
              financial_system_order_code  ,
              user_nric                    ,
              supplier_code                ,
              supplier_name                ,
              gst_number                   ,
              contact_name                 ,
              contact_phone                ,
              contact_email                ,
              contact_fax                  ,
              supp_site_id                 ,
              supp_site_name               ,
              supp_site_phone              ,
              supp_sit_phone_ext           ,
              supp_site_fax                ,
              supp_site_email              ,
              supp_site_add_line1          ,
              supp_site_add_line2          ,
              supp_site_add_line3          ,
              supp_site_country_code       ,
              supp_site_province           ,
              supp_site_state              ,
              supp_site_city               ,
              supp_site_area_code          ,
              supp_site_zip                ,
              supp_site_region_code        ,
              user_code                    ,
              user_name                    ,
              user_org_name                ,
              currency_code                ,
              currency_rate                ,
              currency_rate_date           ,
              currency_rate_type           ,
              currency_amount              ,
              tx_field_2                   ,
              agency_code                  ,
              admin_fee_sgd                ,
              buyer_orgn_code              ,
              buyer_orgn_name              ,
              buyer_name                   ,
              buyer_phone                  ,
              buyer_fax                    ,
              buyer_email                  ,
              ao_code                      ,
              ao_name                      ,
              line_no                      ,
              line_status                  ,
              line_status_date             ,
              line_description             ,
              unit_of_measure              ,
              line_qty                     ,
              line_type                    ,
              unit_price                   ,
              line_total_amount            ,
              material_master_code         ,
              material_group_code          ,
              item_category_code           ,
              line_admin_fee_sgd_amt       ,
              instruction_supplier         ,
              period_contract_line_no      ,
              goods_inspect_flag           ,
              pr_code                      ,
              pr_line_number               ,
              nato_stock_number            ,
              manufacturer_part_no         ,
              part_number                  ,
              cage_code                    ,
              cage_name                    ,
              item_condition               ,
              minimum_shelf_life           ,
              shelf_life_remaining         ,
              cert_of_conformance          ,
              export_license               ,
              line_location_no             ,
              line_loc_status              ,
              line_loc_status_date         ,
              line_loc_qty                 ,
              delivery_destination         ,
              delivery_date                ,
              delivery_terms               ,
              port_of_origin               ,
              recipient_code               ,
              recipient_name               ,
              recipient_phone              ,
              recipient_email              ,
              dist_line_no                 ,
              dist_line_status             ,
              dist_line_status_date        ,
              dist_line_qty                ,
              chart_of_account             ,
              project_distribution
         FROM XMLTable('/GEBIZ_ORDER'
              passing lv_supp_file
              columns
              ministry_code                      VARCHAR2(3)    path    'HEADER/MINISTRY_CODE',
              department_code                    VARCHAR2(3)    path    'HEADER/DEPARTMENT_CODE',
              order_code                         VARCHAR2(17 )  path    'HEADER/ORDER_CODE',
              external_system_code               VARCHAR2(1)    path    'HEADER/EXTERNAL_SYSTEM_CODE',
              amendment_number                   VARCHAR2(5)    path    'HEADER/AMENDMENT_NUMBER' ,
              variation_number                   VARCHAR2(5)    path    'HEADER/VARIATION_NUMBER',
              description                        VARCHAR2(500)  path    'HEADER/DESCRIPTION',
              status                             VARCHAR2(500)  path    'HEADER/STATUS',
              status_date                        VARCHAR2(24)   path    'HEADER/STATUS_DATE',
              payment_terms                      VARCHAR2(400)  path    'HEADER/PAYMENT_TERMS',
              bill_to                            VARCHAR2(200)  path    'HEADER/BILL_TO',
              justification                      VARCHAR2(400)  path    'HEADER/JUSTIFICATION',
              create_timestamp                   VARCHAR2(24)   path    'HEADER/CREATE_TIMESTAMP',
              terminate_reason                   VARCHAR2(400)  path    'HEADER/TERMINATE_REASON',
              terminate_timestamp                VARCHAR2(24)   path    'HEADER/TERMINATE_TIMESTAMP',
              order_type                         VARCHAR2(2 )   path    'HEADER/ORDER_TYPE',
              sub_business_unit                  VARCHAR2(5 )   path    'HEADER/FINANCIAL_SYSTEM/SUB_BUSINESS_UNIT',
              cost_center_group                  VARCHAR2(20 )  path    'HEADER/FINANCIAL_SYSTEM/NFS/COST_CENTER_GROUP',
              buyer_code                         VARCHAR2(30 )  path    'HEADER/FINANCIAL_SYSTEM/NFS/BUYER_CODE',
              financial_system_order_code        VARCHAR2(20 )  path    'HEADER/FINANCIAL_SYSTEM/NFS/FINANCIAL_SYSTEM_ORDER_CODE',
              user_nric                          VARCHAR2(9 )   path    'HEADER/FINANCIAL_SYSTEM/NFS/USER_NRIC',
              supplier_code                      VARCHAR2(10)   path    'HEADER/SUPPLIER/CODE',
              supplier_name                      VARCHAR2(140)  path    'HEADER/SUPPLIER/NAME' ,
              gst_number                         VARCHAR2(30 )  path    'HEADER/SUPPLIER/GST_NUMBER',
              contact_name                       VARCHAR2(140 ) path    'HEADER/SUPPLIER/CONTACT_NAME',
              contact_phone                      VARCHAR2(23 )  path    'HEADER/SUPPLIER/CONTACT_PHONE',
              contact_email                      VARCHAR2(100)  path    'HEADER/SUPPLIER/CONTACT_EMAIL',
              contact_fax                        VARCHAR2(23 )  path    'HEADER/SUPPLIER/CONTACT_FAX',
              supp_site_id                       NUMBER         path    'HEADER/SUPPLIER/SITES/SITE/ID',
              supp_site_name                     VARCHAR2(140)  path    'HEADER/SUPPLIER/SITES/SITE/NAME',
              supp_site_phone                    VARCHAR2(23)   path    'HEADER/SUPPLIER/SITES/SITE/PHONE',
              supp_sit_phone_ext                 VARCHAR2(4 )   path    'HEADER/SUPPLIER/SITES/SITE/PHONE_EXTENSION',
              supp_site_fax                      VARCHAR2(23 )  path    'HEADER/SUPPLIER/SITES/SITE/FAX',
              supp_site_email                    VARCHAR2(100 ) path    'HEADER/SUPPLIER/SITES/SITE/EMAIL',
              supp_site_add_line1                VARCHAR2(254 ) path    'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE1',
              supp_site_add_line2                VARCHAR2(35 )  path    'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE2',
              supp_site_add_line3                VARCHAR2(35 )  path    'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE3',
              supp_site_country_code             VARCHAR2(2 )   path    'HEADER/SUPPLIER/SITES/SITE/COUNTRY_CODE',
              supp_site_province                 VARCHAR2(25 )  path    'HEADER/SUPPLIER/SITES/SITE/PROVINCE',
              supp_site_state                    VARCHAR2(25 )  path    'HEADER/SUPPLIER/SITES/SITE/STATE',
              supp_site_city                     VARCHAR2(25 )  path    'HEADER/SUPPLIER/SITES/SITE/CITY',
              supp_site_area_code                VARCHAR2(10 )  path    'HEADER/SUPPLIER/SITES/SITE/AREA_CODE',
              supp_site_zip                      VARCHAR2(20 )  path    'HEADER/SUPPLIER/SITES/SITE/ZIP',
              supp_site_region_code              VARCHAR2(3 )   path    'HEADER/SUPPLIER/SITES/SITE/REGION_CODE',
              user_code                          VARCHAR2(16 )  path    'HEADER/USER/CODE',
              user_name                          VARCHAR2(25 )  path    'HEADER/USER/NAME',
              user_org_name                      VARCHAR2(95 )  path    'HEADER/USER/ORGANISATION_NAME',
              currency_code                      VARCHAR2(3 )   path    'HEADER/FUND_COMMIT_AMOUNT/CURRENCY_CODE',
              currency_rate                      NUMBER         path    'HEADER/FUND_COMMIT_AMOUNT/CURRENCY_RATE',
              currency_rate_date                 VARCHAR2(24)   path    'HEADER/FUND_COMMIT_AMOUNT/CURRENCY_RATE_DATE',
              currency_rate_type                 VARCHAR2(5 )   path    'HEADER/FUND_COMMIT_AMOUNT/CURRENCY_RATE_TYPE',
              currency_amount                    NUMBER         path    'HEADER/FUND_COMMIT_AMOUNT/CURRENCY_AMOUNT',
              tx_field_2                         VARCHAR2(17 )  path    'HEADER/PERIOD_CONTRACT/CODE',
              agency_code                        VARCHAR2(6 )   path    'HEADER/PERIOD_CONTRACT/AGENCY_CODE',
              admin_fee_sgd                      NUMBER         path    'HEADER/PERIOD_CONTRACT/ADMIN_FEE_SGD_AMOUNT'  ,
              buyer_orgn_code                    VARCHAR2(5 )   path    'HEADER/BUYER/ORGANISATION_CODE',
              buyer_orgn_name                    VARCHAR2(95 )  path    'HEADER/BUYER/ORGANISATION_NAME',
              buyer_name                         VARCHAR2(80 )  path    'HEADER/BUYER/NAME',
              buyer_phone                        VARCHAR2(23 )  path    'HEADER/BUYER/PHONE',
              buyer_fax                          VARCHAR2(23 )  path    'HEADER/BUYER/FAX',
              buyer_email                        VARCHAR2(100 ) path    'HEADER/BUYER/EMAIL',
              ao_code                            VARCHAR2(16 )  path    'HEADER/APPROVING_OFFICERS/APPROVING_OFFICER/CODE',
              ao_name                            VARCHAR2(40 )  path    'HEADER/APPROVING_OFFICERS/APPROVING_OFFICER/NAME',
              items                              XMLTYPE        path    'ITEMS'
              ) x1,
            XMLTABLE('/ITEMS/ITEM'
            passing x1.items
            columns
              line_no                            VARCHAR2(5)    path    'LINE_NUMBER',
              line_status                        VARCHAR2(15)   path    'STATUS',
              line_status_date                   VARCHAR2(24)   path    'STATUS_DATE',
              line_description                   VARCHAR2(500)  path    'DESCRIPTION',
              unit_of_measure                    VARCHAR2(3)    path    'UNIT_OF_MEASURE',
              line_qty                           NUMBER         path    'QUANTITY',
              line_type                          VARCHAR2(20)   path    'LINE_TYPE',
              unit_price                         NUMBER         path    'UNIT_PRICE',
              line_total_amount                  NUMBER         path    'TOTAL_AMOUNT',
              material_master_code               VARCHAR2(20)   path    'MATERIAL_MASTER_CODE',
              material_group_code                VARCHAR2(10)   path    'MATERIAL_GROUP_CODE',
              item_category_code                 VARCHAR2(18)   path    'ITEM_CATEGORY_CODE',
              line_admin_fee_sgd_amt             NUMBER         path    'ADMIN_FEE_SGD_AMOUNT',
              instruction_supplier               VARCHAR2(400)  path    'INSTRUCTION_TO_SUPPLIER',
              period_contract_line_no            NUMBER         path    'PERIOD_CONTRACT_LINE_NUMBER',
              goods_inspect_flag                 VARCHAR2(1)    path    'GOODS_INSPECT_FLAG',
              pr_code                            VARCHAR2(17)   path    'PURCHASE_REQUEST/CODE',
              pr_line_number                     VARCHAR2(5)    path    'PURCHASE_REQUEST/LINE_NUMBER',
              nato_stock_number                  VARCHAR2(14)   path    'PART_NUMBER_INFORMATION/NATO_STOCK_NUMBER',
              manufacturer_part_no               VARCHAR2(32)   path    'PART_NUMBER_INFORMATION/MANUFACTURE_PART_NUMBER',
              part_number                        VARCHAR2(200)  path    'PART_NUMBER_INFORMATION/PART_NUMBER',
              cage_code                          VARCHAR2(10)   path    'PART_NUMBER_INFORMATION/CAGE_CODE',
              cage_name                          VARCHAR2(140)  path    'PART_NUMBER_INFORMATION/CAGE_NAME',
              item_condition                     VARCHAR2(1)    path    'PART_NUMBER_INFORMATION/ITEM_CONDITION'  ,
              minimum_shelf_life                 NUMBER         path    'PART_NUMBER_INFORMATION/MINIMUM_SHELF_LIFE',
              shelf_life_remaining               VARCHAR2(3)    path    'PART_NUMBER_INFORMATION/SHELF_LIFE_REMAINING',
              cert_of_conformance                VARCHAR2(1000) path    'PART_NUMBER_INFORMATION/CERTIFICATE_OF_CONFORMANCE',
              export_license                     VARCHAR2(3)    path    'PART_NUMBER_INFORMATION/EXPORT_LICENSE',
              locations                          XMLTYPE        path    'LOCATIONS'
             )x2,
             XMLTABLE('/LOCATIONS/LOCATION'
             passing x2.locations
             columns
              line_location_no                   NUMBER         path     'LINE_NUMBER',
              line_loc_status                    VARCHAR2(15)   path     'STATUS',
              line_loc_status_date               VARCHAR2(24)   path     'STATUS_DATE',
              line_loc_qty                       NUMBER         path     'QUANTITY',
              delivery_destination               VARCHAR2(1000) path     'DELIVERY_DESTINATION',
              delivery_date                      VARCHAR2(24)   path     'DELIVERY_DATE',
              delivery_terms                     VARCHAR2(3)    path     'DELIVERY_TERMS',
              port_of_origin                     VARCHAR2(150)  path     'PORT_OF_ORIGIN',
              recipient_code                     VARCHAR2(16 )  path     'RECIPIENT/CODE',
              recipient_name                     VARCHAR2(40 )  path     'RECIPIENT/NAME',
              recipient_phone                    VARCHAR2(23 )  path     'RECIPIENT/PHONE',
              recipient_email                    VARCHAR2(100 ) path     'RECIPIENT/EMAIL',
              distributions                      XMLTYPE        path     'DISTRIBUTIONS'
             )x3,
             XMLTABLE('/DISTRIBUTIONS/DISTRIBUTION'
             passing x3.distributions
             columns
              dist_line_no                       NUMBER         path     'LINE_NUMBER',
              dist_line_status                   VARCHAR2(15)   path     'STATUS',
              dist_line_status_date              VARCHAR2(24)   path     'STATUS_DATE',
              dist_line_qty                      NUMBER         path     'QUANTITY',
              chart_of_account                   VARCHAR2(420)  path     'CHART_OF_ACCOUNT',
              project_distribution               VARCHAR2(4000) path     'PROJECT_DISTRIBUTION'
              )x4;
    end;As there is change in requirement now I need to read the multiple supplier sites at the header level. Current this is my structure please give an idea how to read the mulitple sites as one record, probably i can increase the supplier site columns at table level so as to capture second site level information.
    But if in case if i receive that time it should not fail please provide some good solution for this issue.
    Thanks in advance for your help.
    Regards
    Nagendra

    Hi odie,
    Thanks for your response. But here my supplier site will always be maxiumum 2 times and minimum 1 time. My thinking is to fit this one in the existing code by repeating the supplier site only like this
              supp_site_id                       NUMBER         path    'HEADER/SUPPLIER/SITES/SITE/ID',
              supp_site_name                     VARCHAR2(140)  path    'HEADER/SUPPLIER/SITES/SITE/NAME',
              supp_site_phone                    VARCHAR2(23)   path    'HEADER/SUPPLIER/SITES/SITE/PHONE',
              supp_sit_phone_ext                 VARCHAR2(4 )   path    'HEADER/SUPPLIER/SITES/SITE/PHONE_EXTENSION',
              supp_site_fax                      VARCHAR2(23 )  path    'HEADER/SUPPLIER/SITES/SITE/FAX',
              supp_site_email                    VARCHAR2(100 ) path    'HEADER/SUPPLIER/SITES/SITE/EMAIL',
              supp_site_add_line1                VARCHAR2(254 ) path    'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE1',
              supp_site_add_line2                VARCHAR2(35 )  path    'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE2',
              supp_site_add_line3                VARCHAR2(35 )  path    'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE3',
              supp_site_country_code             VARCHAR2(2 )   path    'HEADER/SUPPLIER/SITES/SITE/COUNTRY_CODE',
              supp_site_province                 VARCHAR2(25 )  path    'HEADER/SUPPLIER/SITES/SITE/PROVINCE',
              supp_site_state                    VARCHAR2(25 )  path    'HEADER/SUPPLIER/SITES/SITE/STATE',
              supp_site_city                     VARCHAR2(25 )  path    'HEADER/SUPPLIER/SITES/SITE/CITY',
              supp_site_area_code                VARCHAR2(10 )  path    'HEADER/SUPPLIER/SITES/SITE/AREA_CODE',
              supp_site_zip                      VARCHAR2(20 )  path    'HEADER/SUPPLIER/SITES/SITE/ZIP',
              supp_site_region_code              VARCHAR2(3 )   path    'HEADER/SUPPLIER/SITES/SITE/REGION_CODE',
              supp_site_id2                       NUMBER         path    'HEADER/SUPPLIER/SITES/SITE/ID',
              supp_site_name2                     VARCHAR2(140)  path    'HEADER/SUPPLIER/SITES/SITE/NAME',
              supp_site_phone2                    VARCHAR2(23)   path    'HEADER/SUPPLIER/SITES/SITE/PHONE',
              supp_sit_phone_ext2                 VARCHAR2(4 )   path    'HEADER/SUPPLIER/SITES/SITE/PHONE_EXTENSION',
              supp_site_fax2                      VARCHAR2(23 )  path    'HEADER/SUPPLIER/SITES/SITE/FAX',
              supp_site_email2                    VARCHAR2(100 ) path    'HEADER/SUPPLIER/SITES/SITE/EMAIL',
              supp_site_add_line1_2                VARCHAR2(254 ) path    'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE1',
              supp_site_add_line2_2                VARCHAR2(35 )  path    'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE2',
              supp_site_add_line3_2                VARCHAR2(35 )  path    'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE3',
              supp_site_country_code_2             VARCHAR2(2 )   path    'HEADER/SUPPLIER/SITES/SITE/COUNTRY_CODE',
              supp_site_province_2                 VARCHAR2(25 )  path    'HEADER/SUPPLIER/SITES/SITE/PROVINCE',
              supp_site_state_2                    VARCHAR2(25 )  path    'HEADER/SUPPLIER/SITES/SITE/STATE',
              supp_site_city_2                     VARCHAR2(25 )  path    'HEADER/SUPPLIER/SITES/SITE/CITY',
              supp_site_area_code_2                VARCHAR2(10 )  path    'HEADER/SUPPLIER/SITES/SITE/AREA_CODE',
              supp_site_zip_2                      VARCHAR2(20 )  path    'HEADER/SUPPLIER/SITES/SITE/ZIP',
              supp_site_region_code_2              VARCHAR2(3 )   path    'HEADER/SUPPLIER/SITES/SITE/REGION_CODE',As this table I am being used in many areas, it will be problem for me if try to go for different levels of tables. Or else can it be possible to read only once
    I mean only the first in the xml tags and leave the second xml. As there is not much significant for the second one.
    I appreciate your ideas on this, as the structure we are following is to rigid so I don't have much options to explore, please provide me your inputs in this context.
    Thanks for your help.
    Regards
    Nagendra
    Edited by: 838961 on Jul 13, 2011 1:43 AM

  • Reading XML file in a Store App

    I have an XML file on the web which I want to read from a C# Store app. This file is actually an Atom feed, but that doesn't matter, I just want to get the XML contained within.
    Anyway, I tried several methods but none of them can get me what I want.
    My requirements are pretty simple, I want to get each Entry, and from it take the Summary, and from it take the entire text including the tags. The closest I got was being able to get the entire text contained within <Summary>, but without the child
    tags <short-description> and <tab>, but I want them too.
    <?xml version="1.0" encoding="UTF-8"?>
    <feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <title>Product Details</title>
    <link rel="self" href="http://someLink" />
    <subtitle>Product Details</subtitle>
    <id>somID</id>
    <updated>2015-03-04T11:20:05Z</updated>
    <dc:date>2015-03-04T11:20:05Z</dc:date>
    <entry>
    <title type="text">Loan ABC</title>
    <link rel="alternate" href="http://somLink" />
    <author>
    <name />
    </author>
    <summary type="text">
    <short-description>Get the money you need when you need it! Your perfect banking partner provides you instant gold loans at cheaper interest rates.</short-description>
    <tab id="0" header="Features &amp; Benefits">
    Avail loan amount up to Rs.75 Lakhs
    Quick processing within a few minutes
    No hidden charges or heavy pen
    *Conditions apply
    </tab>
    <tab id="1" header="How to apply ?">
    Who can apply
    Any Individuals.
    How to avail the loan?
    To avail the loan, Please visit any of our branches.
    </tab>
    <accordian id="0" header="Documents Required">
    If you are a new customer, following documents are required:
    Proof of Identity (Passport / Voters ID card/ Driving License/PAN Card)
    Recent Passport size photograph
    Address Proof (Ration card Tel/ Electricity Bill/ Lease agreement/ Passport/Trade license /Sales Tax certificate)
    </accordian>
    <accordian id="1" header="Repayment options">
    Repayment of the loan can be made as lump sum or as installments
    </accordian>
    <accordian id="2" header="Gold loan - Rate per gram">
    To know the maximum amount per gram, please click here.
    </accordian>
    <accordian id="3" header="Interest Rates &amp; Charges">
    Please visit the Interest Rates page for details
    </accordian>
    </summary>
    </entry>
    <entry>
    <title type="text">Federal Proxy Loan </title>
    <author>
    <name> BMA </name>
    </author>
    <summary type="text">
    <short-description>Do you want a loan ? We give out loans !!! At nominal interest rates !!! </short-description>
    <tab id="0" header="ABC &amp; DEF">
    This is Line 1
    This is Line 3 (Line 2 was empty)
    4
    5
    </tab>
    <tab id="1" header="Header of ID 1">
    ABCDEFGHI
    </tab>
    </summary>
    </entry>
    <entry>
    <title type="text">Federal Car Loan </title>
    <author>
    <name> BMA </name>
    </author>
    <summary type="text">
    <short-description>Do you want a loan ? We give out loans !!! At nominal interest rates !!! </short-description>
    <tab id="0" header="ABC &amp; DEF">
    This is Line 1
    This is Line 3 (Line 2 was empty)
    4
    5
    </tab>
    <tab id="1" header="Header of ID 1">
    ABCDEFGHI
    </tab>
    </summary>
    </entry>
    <entry>
    <title type="text">Yet Another Federal Loan </title>
    <author>
    <name>BMA</name>
    </author>
    <summary type="text">
    <short-description>We give wonderful loans, all for you - cum and get it</short-description>
    <tab id="0" header="Header &amp; d">
    This is Line 1
    This is Line 2
    This is Line 3
    </tab>
    <tab id="1" header="abc">
    Only One Line for Tab 1
    </tab>
    </summary>
    </entry>
    </feed>

    Take a look at linq to xml to parse the xml
    https://msdn.microsoft.com/en-us/library/bb387098.aspx?f=255&MSPPError=-2147217396
    Another option if the xml is always in the same format you can create a class to deserialize the xml into.
    http://irisclasson.com/2012/07/09/example-metro-app-winrt-serializing-and-deseralizing-objects-to-storagefile-and-localfolder-using-generics-and-asyncawait-threading/

  • Error while generating an XML File.

    Hello All,
    Help me regarding My Doubt.
    I have created a Procedure Which will create an XML File.
    I am Using the XMLDOM Package to create the File.
    I am passing the XMLFILE to a CLOB Field.
    XMLDOM.writeToClob(DOC, P_XMLFILE);
    But When I am Running the Procedure I am getting the List of Errors.
    ORA-29280: invalid directory path
    ORA-06512: at "SYS.UTL_FILE", line 33
    ORA-06512: at "SYS.UTL_FILE", line 436
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 217
    ORA-29280: invalid directory path
    ORA-29280: invalid directory path
    ORA-06512: at "XDB.DBMS_XMLDOM", line 4416
    ORA-06512: at "K5ESK_LDB2.PR_CREATE_XMLFILE", line 26
    I dont know the Reason why the Errors are Comming.
    Does It Require I should change the System Setting to Make sure that XMLDOM will work Properly

    Dear Member,
    The Below is the Code I am using.
    CREATE OR REPLACE PROCEDURE pr_create_xmlfile(P_XMLFILE IN OUT CLOB)
    doc xmldom.DOMDocument;
    main_node xmldom.DOMNode;
    root_node xmldom.DOMNode;
    user_node xmldom.domnode;
    item_node xmldom.domnode;
    root_elmt xmldom.DOMElement;
    item_elmt xmldom.DOMElement;
    item_text xmldom.domtext;
    CURSOR get_data(p_deptno IN NUMBER)
    IS
    SELECT EMPNO,
    ENAME,
    DEPTNO,
    ROWNUM Rec_Num
    FROM emp WHERE deptno = p_deptno;
    BEGIN
    doc := xmldom.newdomdocument;
    -- Create the Main Node
    main_node := xmldom.makenode(doc);
    -- Create the Root Element.
    root_elmt := xmldom.createelement(doc,'EMPSET');
    -- Attach this Root Element to the Main Node.
    root_node := xmldom.appendchild(main_node,xmldom.makenode(root_elmt));
    xmldom.writetofile(doc,'c:\temp\test.xml');
    xmldom.freedocument(doc);
    FOR rec_data IN get_data(10) LOOP
    <EMP num="1">
    <EMP_NO>7782</EMP_NO>
    <NAME>CLARK</NAME>
    <DEPT_NO>10</DEPT_NO>
    </EMP>
    -- Create a Main Element
    item_elmt := xmldom.createelement(doc,'EMP');
    -- Creating an Attribute to the Emp Element
    xmldom.setattribute(item_elmt,'Num',rec_data.rec_num);
    -- Attaching this EMP Element as Child Record to the Root Node.
    user_node := xmldom.appendchild(root_node,xmldom.makenode(item_elmt));
    -- Creating another EMP_NO Element
    item_elmt := xmldom.createelement(doc,'EMP_NO');
    -- Attaching the EMP_NO Element to the EMP Element as Child Element
    item_node := xmldom.appendchild(user_node,xmldom.makenode(item_elmt));
    -- Creating a Text Node with the Empno data
    item_text := xmldom.createtextnode(doc,rec_data.empno);
    -- Attaching this Text Node as Child to the EMP_NO Element.
    item_node := xmldom.appendchild(item_node,xmldom.makenode(item_text));
    END LOOP;
    XMLDOM.writeToClob(DOC, P_XMLFILE);
    XMLDOM.FREEDOCUMENT(DOC);
    Errors
    ORA - 29280 --> A corresponding directory object does not exist.
    Action --> Correct the directory object parameter, or create a corresponding directory object with the
    CREATE DIRECTORY command
    ORA - 06512 --> Backtrace message as the stack is unwound by unhandled exceptions
    Action --> Fix the problem causing the exception or write an exception handler for this condition.
    END;

  • XML file for GigE Vision camera

    Hello,
    I am working on a design of GigE Vision camera. It should be very simple linescan camera. I implemented the whole required GigE Vision register set, can communicate with the camera in MAX. The problem is that I need to creata this XML file for the camera.There is this XML file here: 
    http://www.emva.org/cms/upload/Standards/GenICam_D​ownloads/SFNC_Reference_Version_2_0_0_Schema_1_1.x​...
    What should I do with it? My first version of the camera will have 2 funcions: turn it on and turn it off I am bit confused, because the xml file template has lots of functions, that I don't really need. Should I delete them? Or leave inside with default values? What does minimal configuration XML file need?
    Regards,
    Linus
    Solved!
    Go to Solution.

    linru wrote:
    Thank you very much! Perhaps I was too concentrated on digging through various documents and missed the important info.
    And one more question: how does NI software build the *.icd file? By reading XML file? Or by reading registers in my camera? 
    Both. The XML is processed by the GenApi software component which then translates it to register operations. The XML file thus controls what features are visible based both on the XML file as well as the camera registers (features in the XML may be conditionally available based on the <pIsImplemented< tag). Next, the IMAQdx ICD file contains the subset of features in the XML file that are available and are tagged as <Streamable>, meaning they can be saved to a settings file.
    Eric

  • Creating XML file Using Call Transformation

    Hello Friends,
          I have searched before posting thread, couldnt find anything.
          I am creating an XML file using Call Transformation. My internal table has 3 date fields and some other fields.  For some records I dont have values for the date fields. In that case my XML file is giving the date value as 0000-00-00 since I declared it as Date type.  This value 0000-00-00  is not accepted by the middle ware as the valid date.  I can not change it as String type as per the suggestion.
    In that case I am advised to skip printing the date field tag if it doesnt have value.
         Is there any way to skip the date field if it is empty. Any Suggestions please ?.
    Thanks
    Lakshmi.

    Hi,
    I had exactly the same problem before. When you call a transformation there is an option called initial_components. According to SAP if you use initial_components = 'SUPRESS' the empty fields should not being generated on the XML.
    Now, this didn't work for me and I have seen some people with the same problem. Here is how I solved this (maybe not the best way but it worked):
    First: My fields are all CHAR in my table
    Second: In the transformation, you can use conditional transformation to not display a tag if field is empty, here a piece of my transformation (I am using simple transformations):
       <tt:root name="ROOT"/>
         <tt:cond s-check="not-initial(ref('ROOT.L1_NM')) or not-initial(ref('ROOT.L2_NM'))">
              <TRNMTR_NM>
                <tt:cond s-check="not-initial(ref('ROOT.L1_NM'))">
                  <l1_nm>
                    <tt:value ref="ROOT.L1_NM"/>
                  </l1_nm>
                </tt:cond>
                <tt:cond s-check="not-initial(ref('ROOT.L2_NM'))">
                  <l2_nm>
                    <tt:value ref="ROOT.L2_NM"/>
                  </l2_nm>
                </tt:cond>
              </TRNMTR_NM>
            </tt:cond>
    As you can see, I first check if the fields have values.
    Hope it helps
    Edited by: carlosrv on Oct 4, 2011 8:22 PM

  • Creating an XML file from multiple sql tables

    I have very little xml experience, but need to generate an xml file from multiple table. I know what the output needs to look like, but do not know how to setup the code. Any help would be appreciated.
    - <Practice SourceID="EPIC" ExternalPracticeID="PPAWB">
    - <Provider ExternalProviderID="TB2" FirstName="THOMAS G" LastName="BREWSTER">
    - <Patient ExternalPatientID="99999" OldExternalPatID="" FirstName="test" MiddleName="J" LastName="test" Gender="M" DateOfBirth="2005-08-12" SocSecNumber="000-00-0000" LanguageID="22" AddressOne="test" AddressTwo="" City="test" StateID="20" ZipCode="99999" DayPhone="" EveningPhone="207-999-9999" StatusID="">
    <Measure MeasureID="2" MeasureValue="5" MeasureDate="2008-10-24 13:43:00" />
    <Measure MeasureID="2" MeasureValue="5" MeasureDate="2008-10-24 14:23:00" />
    <Measure MeasureID="3" MeasureValue="1" MeasureDate="2008-10-24 13:43:00" />
    <Measure MeasureID="3" MeasureValue="1" MeasureDate="2008-10-24 14:23:00" />
    <Measure MeasureID="32" MeasureValue="3" MeasureDate="2008-10-24 13:51:00" />
    <Measure MeasureID="33" MeasureValue="1" MeasureDate="2008-10-24 13:43:00" />
    <Measure MeasureID="33" MeasureValue="1" MeasureDate="2009-02-09 10:09:00" />
    <Measure MeasureID="4" MeasureValue="5" MeasureDate="2008-10-24 13:43:00" />
    <Measure MeasureID="4" MeasureValue="5" MeasureDate="2008-10-24 14:23:00" />
    <Measure MeasureID="40" MeasureValue="2008-10-24 13:43:00" MeasureDate="2008-10-24 13:43:00" />
    <Measure MeasureID="40" MeasureValue="2008-10-24 14:23:00" MeasureDate="2008-10-24 14:23:00" />
    <Measure MeasureID="41" MeasureValue="2008-10-24 13:43:00" MeasureDate="2008-10-24 13:43:00" />
    <Measure MeasureID="41" MeasureValue="2008-10-24 13:51:00" MeasureDate="2008-10-24 13:51:00" />
    </Patient>
    </Provider>
    </Practice>

    You are interested in XMLElement and probably XMLAgg. Since you didn't list a version, I can't provide links to the corresponding documentation. I cringe at all the attributes on the Patient element as that info should really be elements.
    To create the Measure node, your overall SQL statement may look something like (not tested)
    SELECT XMLElement....
              XMLAgg(SELECT XMLElement
                       FROM measures_table
                      WHERE join condition to parent)
      FROM patient,
           provider,
           practice
    WHERE join conditionsFor additional help, please include your version (4 digits), some sample data, and what you have tried.

  • How to Read and Generate XML file from java code.

    hi guys,
    how to read the xml file (Condition :we know only DTD or Shema only).
    How to Generate the new xml file ?(using Shema )
    And one more how directly Generate the xml from DB?
    Pleas with code or any URL

    Using XMLbeans you can generate Java objects from an XSD schema (perhaps DTDs aswell)
    Then you can create an instance of the Document object and ask it to write itself.
    This will create an XML document complient to the schema.
    XMLBeans generates a "type" safe DOM where you can only ever have a structure compilent to you schema.
    matfud

  • Create xml file with nested internla table or with header & item tables

    Hi I have a requirement like, I need to create an xml file for header and item details. For 1 header there may be multiple line items.
    I did search in forums some where I came to know that we can use XSL:IF to achieve this. but I could not able to do this.
    I tried with using nested internal tables also but now luck.
    can anybody please suggest how can we create xml for header and item detials.
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:sap="http://www.sap.com/sapxsl"
      xmlns:asx="http://www.sap.com/abapxml"
      exclude-result-prefixes="asx"
    >
    <xsl:template match="/">
      <OrbisomRequest>
        <xsl:attribute name="Version">
          <xsl:value-of select="11.1"/>
        </xsl:attribute>
        <xsl:attribute name="IssuerID">
          <xsl:value-of select="1"/>
        </xsl:attribute>
        <xsl:for-each select="asx:abap[1]/asx:values[1]/T_FINAL[1]/*">
    <CreateApprovedPurchaseRequest
           RerquestID="{VBLNR}"
           CommonName="User1"
           Amount="{WRBTR}"
           Comment="TestComment"
           CurrencyCode="978"
           PurchaseType="All"
           SupplierName="All"
           VCardAlias="PurchaseCard"
           ValidFrom="1M"
           CurrencyType="B">
                    <CDFs>
                      <Invoice> <xsl:value-of select="BELNR"/> </Invoice>
                      <Amount> <xsl:value-of select="WRBTR"/> </Amount>
                    </CDFs>
          </CreateApprovedPurchaseRequest>
        </xsl:for-each>
      </OrbisomRequest>
    </xsl:template>
    </xsl:transform>
    here belnr and wrbtr will be my item details. for each payment document I can have multiple invoices. in CDF I need to display the invoices for that particular payment document.
    what conditions can I put there before CDFs to make the item internal table to loop based on header internal table.
    Regards,
    Ranganadh.

    Looks like you have already created the transformation "Z_ID"
    Take a look at the following thread, it answers many of the questions you have asked:
    [ABAP data to XML conv with UTF-8 encoding and custom namespace|Re: ABAP data to XML conv with UTF-8 encoding and custom namespace;
    Che

  • XML File Creation Problem in FTP Server

    Hi.. Experts
    My Internal Table is as follows
    Types: Begin of ty_xmlfile,
             xmlline(60000)        type C,
           End of ty_xmlfile.
    Data: it_xmlfile type standard table of ty_xmlfile,
            wa_xmlfile type ty_xmlfile.
    When I download the file to my desktop using  GUI_DOWNLOAD. It works fine
    CALL FUNCTION 'GUI_DOWNLOAD'
              EXPORTING
                BIN_FILESIZE = lv_size
                FILENAME     = lv_file_name
                FILETYPE     = 'ASC'
              TABLES
                DATA_TAB     = it_xmlfile
              EXCEPTIONS
                OTHERS       = 10.
            IF SY-SUBRC <> 0.
              MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
    In the debug mode when I download the internal table(IT_XMLFILE) into an excel file it doesn't open and it says tag is missinig(/basic_material_text) and also when I create the file in Application Server and transfer it to FTP Server it doesn't open there..and also in debug mode I find the length until  DIMENSION AN.. for that row when I double click on that line in debug mode it shows all the text until </baisc_material_Text>
    <basic_material_text>4.500 +.000/-.010 O.D. X 213.0&quot; LG.(F)                      (A)ASTM A276 CONDITION &quot;A&quot; 317LTYPICAL MILL CERTS REQ&apos;D.DIMENSION REFERENCE:(A) = ALLOWANCE IS INCLUDED FOR MACHINING(F) = THIS IS A FINISHED DIMENSION AN*
    The above statement is incomplete when the file is open in FTP Server.
    But when the file is created on to my desktop. It displays all the text....
    <basic_material_text>4.500 +.000/-.010 O.D. X 213.0" LG.(F) (A)ASTM A276 CONDITION "A" 317LTYPICAL MILL CERTS REQ'D.DIMENSION REFERENCE:(A) = ALLOWANCE IS INCLUDED FOR MACHINING(F) = THIS IS A FINISHED DIMENSION AND WILL BE USED AS RECEIVED(T) = TO FINISH TO THIS DIMENSION FOR FORGING AND BILLET MATERIAL ONLYVENDOR TO SUPPLY THE FOLLOWING ENGINEERING/QUALITY ASSURANCE DATATYPICAL MILL TEST CERTIFICATES/CERTIFICATES MUST ACCOMPANY THE MATERIAL.* COPIES REQUIRED:(2)ALL CERTIFICATES MUST HAVE LIGHTNIN PART NO.CLEARLY MARKED ON THEM.* COPIES REQUIRED:(2)</basic_material_text> *
    I could not understand why it takes only until DIMENSION AN
    Any suggestions would be very helpful...
    Thanks,
    Chaitanya
    -Points will be awarded for helpful answers.

    Hi...
    I think each XML Line will be of length 256. So I have to split the String into 256 of each Line.
    XML DOM Processing in ABAP part I -  Convert an ABAP table into XML file using SAP DOM Approach.
    Hope  it works out....I will try for that and Close the Post...
    Thanks,
    chaitanya K

  • Using a Global Session to find data in an XML file in Repository

    Ok, here is the scenario:
    1. We issue a company iPhone to each Field Sales Rep
    2. Each Sales Rep has an assigned Sales Support Rep in the Contact Center.
    3. When a Sales Rep calls the Contact Center from their company phone, we try to route them to their designated Sales Support Agent (if that Rep is available, if not they go to the Queue and wait for next available Sales Support Agent).
    At first we had all entries in 1 xml file but our Sales Force soon grew larger than we could accomodate in one xml file (my testing found a lookup limit of 121 rows in the xmfl file).
    I changed the script logic to first look at the area code and then do a lookup into one of 3 xml files based on the area code. For example, the first file contained all phones with area codes up to 350, the 2nd file for numbers with area codes from 351 to 700, the 3rd file for numbers with area codes from 701 to 999.
    The problem is that the script utilizes the Create XML Document function to search the xml files. This has resulted in the following condition:
    Error: It is not recommended to update the application as
    Engine heap memory usage exceeded configured threshold
    Do I create a global session for each xml file to hold that file's data?
    Do I just replace the "Create XML Document step with a subflow step to the appropriate global session for each xml file?
    Thanks in advance for help and or clarification.
    The recommended solution is to utilize global session variables to store the contents of the xml files.
    I found the following thread discussing just such a situation:
    https://supportforums.cisco.com/thread/2047722
    I have downloaded Anthony Holloway's global session subscript but I am still unclear exactly how I utilize it in my base script.

    Ok, I just noticed that my initial post comes up somewhat out of sequence. The very last questions I had (after the included graphic) ended up before the graphic. Here are the questions I had:
    Do I create a global session for each xml file to hold that file's data?
    Do I just replace the "Create XML Document" step with a subflow step to the appropriate global session for each xml file?
    Thanks in advance for help and or clarification.

Maybe you are looking for

  • Outlook 2011 and Enter keys on external keyboard

    I'm currently running Snow Leopard on my MacBook Pro.  I connect a USB external keyboard and monitor and run in clamshell mode (laptop closed).  Using Outlook 2011, I have noticed that the Enter keys (one near the alpha keys and one in Numpad) behave

  • Question in mail adapter. Please help!

    Hi experts,         What is use of Message_ID and X_Mailer in mail adapter? Please help Thanks Gopal

  • Invalid key code and multiple installs

    OK, so I got a new iMac and tried to install vista on it like I had on my old iMac (2006 Model). However, when I finished the installation it started a new installation and it ended up installing vista twice. It would have done and third install, but

  • Background rendering on load

    Hi, I'm using PE8 and am quite new to it, so apologise if I'm asking something obvious.  However, I've got a strange problem.  I've started two seperate PE projects, using different media files.  The timeline of both projects is fully rendered (The b

  • Batch Export as PNG

    Hello, i'm having dreadful trouble exporting a batch of AIs to PNG (using illustrator CS4). It seemed really obvious to record export>PNG>relevant setting as an action and then run that on the whole folder. The trouble is that the action, when run as