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

Similar Messages

  • Create XML file from ABAP with SOAP Details

    Hi,
    I am new to XML and I am not familiar with JAVA or Web Service. I have searched in SDN and googled for a sample program for creating XML document from ABAP with SOAP details. Unfortunately I couldn't find anything.
    I have a requirement for creating an XML file from ABAP with SOAP details. I have the data in the internal table. There is a Schema which the client provided and the file generated from SAP should be validating against that Schema. Schema contains SOAP details like Envelope, Header & Body.
    My question is can I generate the XML file using CALL TRANSFORMATION in SAP with the SOAP details?
    I have tried to create Transformation (Transaction XSLT_TOOL) in SAP with below code. Also in CALL transformation I am not able to change the encoding to UTF-8. It's always show UTF-16.
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
      <xsl:template match="/">
        <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
          <SOAP:Header>
            <CUNS:HeaderInfo>
              <CUNS:InterfaceTypeId>10006</InterfaceTypeId>
              <CUNS:BusinessPartnerID>11223344</BusinessPartnerID>
              <CUNS:SchemaVersion>1.0</SchemaVersion>
              <CUNS:DateTime>sy-datum</DateTime>
            </CUNS:HeaderInfo>
          </SOAP:Header>
          <SOAP:Body>
            <xsl:copy-of select="*"/>
          </SOAP:Body>
        </SOAP:Envelope>
      </xsl:template>
    </xsl:transform>
    In ABAP program, I have written below code for calling above Transformation.
      call transformation ('Z_ID')
           source tab = im_t_output[]
           result xml xml_out.
      call function 'SCMS_STRING_TO_FTEXT'
        exporting
          text      = xml_out
        tables
          ftext_tab = ex_t_xml_data.
    Please help me how to generate XML file with SOAP details from ABAP. If anybody have a sample program, please share with me.
    Is there any easy way to create the XML file in CALL Transformation. Please help.
    Thanks

    Try ABAP forum, as it seems not to be PI related.

  • Create XML file on application server (unix directory) from internal table

    Hallo everybody,
    I have got the following problem:
    I am working with <u><b>release 4.6C</b></u> and have got to create XML files from HR master data and organizational data respectively.
    This takes place in 3 steps:
    1.     Collect the data in an internal table
    2.     Convert the data to XML format using the function module 'SAP_CONVERT_TO_XML_FORMAT'
    3.     Download the data
    If I download the converted data, which are in an internal table, to the presentation server via the function module ‘WS_DOWNLOAD’ and open it with the Internet Explorer, everything is ok.
    If I download the converted data to the application server, i.e. into a unix directory via
    ‘open dataset’, ‘loop at internal table, ‘transfer working area to file’, ‘close dataset’
    and then try to open it, this is not possible, because after the last tag some unreadable characters, e.g. a square, appear that aren’t supposed to be there. That’s what my colleagues told me, for I haven’t got access to the server.
    I have no idea where these characters come from and how I can get rid of them. I guess that either I have to modify (how?) the table with the converted data before the download or I have to use another way to convert the data. For the second way I would probably have to work with an XML class or an XML interface. Unfortunately I’I am not an expert in working with classes so sample coding would have to be rather detailed.
    Here’s some more information about how I work with the conversion function module:
      call function 'SAP_CONVERT_TO_XML_FORMAT'
           exporting
                i_field_seperator    = lv_field_seperator
               i_line_header        = lv_line_header
               i_filename           = lv_xml_file
               i_appl_keep          = ' '
                i_xml_doc_name       = lv_xml_doc_name
           importing
                pe_bin_filesize      = lv_result
           tables
                i_tab_sap_data       = gt_data
           changing
                i_tab_converted_data = lt_tab_converted_data
           exceptions
                conversion_failed    = 1
                others               = 2.
    lv_field_seperator = ‘X’.
    lv_xml_doc_name = ‘Personalstammdaten Publikation’
    lv_result: type i
    gt_data: fields: PERNR, PERSG, PERSK etc.
      types:
      begin of truxs_xml_line,
        data(256) type x,
      end of truxs_xml_line.
      types:
      truxs_xml_table type table of truxs_xml_line.
    data:
    lv_tab_converted_data type truxs_xml_line,
    lt_tab_converted_data type truxs_xml_table
    open dataset lv_xml_file for output in binary mode.
    loop at lt_tab_converted_data into lv_tab_converted_data.
      transfer lv_tab_converted_data to lv_xml_file.
    endloop.
    close dataset lv_xml_file
    lv_xml_file: /usr/users/.../.../Personendaten_2004-11-02.xml
    Hope the information is detailed enough! Otherwise let me know. Thank you in advance.
    Message was edited by: Johannes Schwehm

    Hi Raja,
    tried the "TEXT" mode, but that didn't help.
    There are still characters after the last tag, that are not supposed to be there including a date that is not
    the creation date of the file.
    Thank you for your help.
    Regards
    Johannes

  • Creating XML files with the DME

    Hi All,
    I'm working on an integration project between my company and HSBC, they are requesting that we supply our AP payment files for foreign currency in XML format.
    I have some limited experience with the DME and know it can create XML files, however, the elements available for XML files are different to standard flat files. Also it doesnt seem like I can create files with multiple levels? e.g.
    <InitgPty>
    ......... <Id>
    ............... <OrgId>
    ...................... <BkPtyId>ABC00103003</BkPtyId>
    .............. </OrgId>
    ........ </Id>
    </InitgPty>
    Does anyone have any documentation or experience with creating XML files with DME?
    thanks
    Phil.

    Hi,
    Please ask any Implementation team in ABAB or Report painter team with your friends,
    Thanks and REgards
    N.Soma Sundaram

  • SQL Error : missing expression - Creating XML file with ODI

    Hi,
    I saw threads about errors like this and read that maybe it can come from how I chose the staging area. I still can't see where the problem is. I'm trying to create an xml file from data stored in a Oracle database. The interface which execution fails select data from tables and create a tag in the XML file. Here are information about it :
    The staging area is diferent from the target and is an oracle database schema. (I guess it creates temporary tables in that schema ?)
    In the flow tab, the LKM is LKM SQL to SQL, the option delete temporary objects is set to yes.
    The IKM choice for the target is IKM SQL Control Append and options are as following :
    - insert : yes
    - commit : yes
    - flow contreol : no
    - recycle errors : no
    - static control : no
    - truncate : no
    - delete all : no
    - create target table : yes
    - delete temporary objects : yes
    Columns mapping in the target are the following :
    WKID        >     THEADER.WKID
    EXTID        >     THEADER.EXTID
    ORDER     >     THEADER.ORDER
    INSTFK     >     THEADER.INSTFK
    For every column in the target :
    - Run on source
    - Updating : insert, update and ud4 are checked
    no update key is defined
    In the operator, the step failing when running the interface is the loading data in the work table.
    If you need the SQL request in the execution plan, or anything else, please tell me.
    Thank you in advance for any help on this.
    Marie

    It would help if you provide error message and its stack trace.
    Please also look at the documentation (If not already done so) for creating xml file XML Files - 11g Release 1 (11.1.1)

  • Create XML file from SQL trigger

    I have to create a XML file of a record when a certain column of table Absences is updated. I have the following bcp command in the (after update) trigger :
        bcp "select absences.HID, absences.Amount,absences.Itemcode,absences.Itemcount, absences.[Description],absences.PRocessnumber, Cicmpy.ID from absences inner join cicmpy on cicmpy.cmp_wwn = absences.HID where absences.Type = 110  for
    XML RAW (''Order''), ROOT (''Orders''), ELEMENTS XSINIL" QUERYOUT "c:\filename.xml" -T -SJR8512\sql2008 -c -d100'
    When the trigger is fired, the table get's a lock, so the file isn't created. What am I missing?

    As Russ says: Service Broker is exactly what you want. The trigger would put a message on the Service Broker queue. (And the message would be the XML document created from the inserted/deleted tables.) In the other application you would have an activation
    procedure that processes the message.
    If you have never worked with Service Broker, this book is an excellent start:
    http://www.amazon.com/Rational-Server-Service-Broker-Guides/dp/1932577270/ref=sr_1_1?ie=UTF8&qid=1399411944&sr=8-1&keywords=wolter+service+broker
    Also, bookmark Remus Rusanu's blog:
    http://rusanu.com/blog/
    Lot's of tips there.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Download created XML File in batch mode // Parse XML file into single lines

    Hello!
    I upload a CSV file and based on that CSV file I create an XML "object". First I uploaded and downloaded it via gui frontendclass, but as it has to be run in a batch in the night I need to upload and download the data via OPEN DATASET.
    The import and transformation of the CSV file works fine, also the transfer into an itab with the same structure as a CSV line is ok. I also create the XML file, which could be downloaded easily with gui-download but it is not permittet.
    Import of data: I scan the folder and get the filenames into a itab, I loop over that itab and read the single files like this:
         OPEN DATASET ls_convert_batch FOR INPUT IN TEXT MODE ENCODING DEFAULT.
          CLEAR tab.
          IF sy-subrc = 0.
            DO.
              READ DATASET ls_convert_batch INTO line.
              IF sy-subrc <> 0.
                EXIT.
              ELSE.
                CLEAR tmptab.
                SPLIT line AT ';' INTO  tmptab-product
                                        tmptab-contract
                                        tmptab-extagent.
                APPEND tmptab TO tab.
              ENDIF.
            ENDDO.
          ENDIF.
    The XML file has a strucutre like
    <file>
    - <file formant_no="1.1" format_date="02.10.2003">
      <status>V</status>
      <number>001001025</numbner>
      <name>Schmeisser,Christof</name>
    - <details>
    -    <detail>
             <contract>00000003494</contract>
             <name>Schmeisser, Christof</name>
             <invoice_no>000000003840</invoice_no>
             <due_date>20100601</due_date>
             <amount>140,00</amount>
         </detail>
    -    <detail>
             <contract>00000003495</contract>
             <name>Schmeisser, Christof</name>
             <invoice_no>000000003841</invoice_no>
             <due_date>20100601</due_date>
             <amount>130,00</amount>
         </detail>
    - </details>
    <elements>2</elements>
    <amount_overall>270</amount_overall>
    </file>
    At the moment I download it like this:
    CALL METHOD cl_gui_frontend_services=>gui_download
            EXPORTING
              bin_filesize = l_xml_size
              filename     = filename
              filetype     = 'BIN'
    *        CONFIRM_OVERWRITE = '0'
            CHANGING
              data_tab     = l_xml_table
            EXCEPTIONS
              OTHERS       = 24.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ELSEIF sy-subrc = 0.
            lv_create_counter = lv_create_counter + 1.
          ENDIF.
    But I need to download it via OPEN TRANSFER CLOSE Dataset as it has to run in batch mode.
    Anyone has an idea? I am really desperate here. One idea would be to parse the single lines into a string and then create the XML file line by line as text and save it with ending XML, should work. But I don't know how!
    Thank you very much in advance,
    kind regards from Tallinn, Estonia,
    Christof!
    Edited by: Christof Schmeisser on Nov 25, 2010 7:51 PM
    I edited the heading, would be too general and missleading!

    Tipos Pools
    TYPE-POOLS: ixml.
    CLASS cl_ixml DEFINITION LOAD.
    TYPES: BEGIN OF xml_node_type,
             node   TYPE char50,
             vlnode TYPE string,
           END OF xml_node_type,
           BEGIN OF xml_line_type,
             data(256) TYPE x,
           END OF xml_line_type.
    Tabelas Internas
    DATA: ti_xml_node        TYPE TABLE OF xml_node_type.
    Variáveis TYPE REF
    *Type REF para utilizar no XML
    DATA: ixml_type             TYPE REF TO if_ixml,
          streamfactory_type    TYPE REF TO if_ixml_stream_factory,
          ostream_type          TYPE REF TO if_ixml_ostream,
          istream_type          TYPE REF TO if_ixml_istream,
          parser_type           TYPE REF TO if_ixml_parser,
          renderer_type         TYPE REF TO if_ixml_renderer,
          document_type         TYPE REF TO if_ixml_document,
          encoding_type         TYPE REF TO if_ixml_encoding,
          node_type             TYPE REF TO if_ixml_node,
          element_dtrans_type   TYPE REF TO if_ixml_element,
          element_xml_in_type   TYPE REF TO if_ixml_element,
          element_roteiros_type TYPE REF TO if_ixml_element,
          element_roteiro_type  TYPE REF TO if_ixml_element,
          element_vias_type     TYPE REF TO if_ixml_element,
          element_via_type      TYPE REF TO if_ixml_element,
          element_dummy_type    TYPE REF TO if_ixml_element,
          gw_xml_node           TYPE TABLE OF xml_node_type,
          gw_xml_node_ret       TYPE TABLE OF xml_node_type,
          gw_xml_node_err       TYPE TABLE OF xml_node_type,
          gw_xml_node_xml       TYPE TABLE OF xml_node_type,
          gw_xml_table          TYPE TABLE OF xml_line_type,
          gw_xml_table2         TYPE TABLE OF xml_line_type,
          gs_xml_node           TYPE xml_node_type,  "WA para leitura do xml
          gs_xml_node_ret       TYPE xml_node_type,  "WA para leitura do xml retorno
          gs_xml_node_err       TYPE xml_node_type,  "WA para leitura do xml erro
          gs_xml_node_xml       TYPE xml_node_type,  "WA para leitura do xml info sucesso
          gs_xml_table2         TYPE xml_line_type.  "WA para importar xml
    Variáveis do Programa
    DATA: l_value              TYPE string,
          l_rc                 TYPE i,
          l_xml_size           TYPE i,
          cod_cartaorepom      TYPE char20 VALUE '123456789',
          v_caminho_exp        TYPE string VALUE 'C:TEMP',
          v_salvaarquivo       TYPE string,
          v_nomearquivo        TYPE string,
          w_nodetext           TYPE string,
          v_roteiros           TYPE string,
          v_roteiro            TYPE string,
          v_roteiro_codigo     TYPE string,
          v_percurso_codigo    TYPE string,
          v_percurso_descricao TYPE string,
          v_cidade_origem      TYPE string,
          v_estado_origem      TYPE string,
          v_cidade_destino     TYPE string,
          v_estado_destino     TYPE string,
          v_transporte_tipo    TYPE string,
          v_cartao_taxa        TYPE string,
          v_cobra_taxa         TYPE string.
    Constants
    CONSTANTS: cc_39         TYPE string VALUE '39', " Numero 39.
               cc_dt_trans   TYPE string VALUE 'data_transfer'," document_type(name)
               cc_metodo_cod TYPE string VALUE 'metodo_codigo'," document_type(name)
               cc_xml_in     TYPE string VALUE 'xml_in'," document_type(name)
               cc_ct_tx_ativ TYPE string VALUE 'cartao_taxa_ativacao'," document_type(name)
               cc_cartao     TYPE string VALUE 'cartao', " Parâmetro Perform.
               cc_xml        TYPE string VALUE '.XML'," extenção
               cc_bin        TYPE char10 VALUE 'BIN'." filetype
    START-OF-SELECTION.
      PERFORM yf_inicia_criacao_xml USING cc_39.
      element_roteiro_type  = document_type->create_simple_element(
                     name   = cc_ct_tx_ativ
                     parent = element_xml_in_type  ).
      PERFORM yf_dummy_roteiro USING cod_cartaorepom cc_cartao.
      PERFORM yf_finaliza_xml.
      PERFORM yf_exporta_xml USING v_caminho_exp.
      PERFORM yf_convert_xml_to_itab TABLES gw_xml_node_ret
                                      USING v_salvaarquivo.
    END-OF-SELECTION.
    *&      Form  yf_inicia_criacao_xml
          text
         -->VALUE(P_0783)  text
    FORM yf_inicia_criacao_xml USING value(p_0783).
      DATA: s_encoding_type TYPE string VALUE 'ISO-8859-1'.
    Cria o ixml factory
      ixml_type = cl_ixml=>create( ).
    *Cria o objeto com modelo
      document_type = ixml_type->create_document( ).
    *Cria o cabeçalho encoding="iso-8859-1"
      encoding_type = ixml_type->create_encoding( byte_order = 0
                        character_set = s_encoding_type ).
    *Cria o root "DATA_TRANSFER"
      element_dtrans_type = document_type->create_simple_element(
                    name  = cc_dt_trans
                  parent  = document_type ).
    *Cria o node "METODO_CODIGO" e preenche com um valor passado no L_VALUE
      l_value = p_0783.
      CONDENSE l_value.
      element_dummy_type = document_type->create_simple_element(
                    name = cc_metodo_cod
                   value = l_value
                  parent = element_dtrans_type ).
    *Cria o node "XML_IN"
      element_xml_in_type   = document_type->create_simple_element(
                  name   = cc_xml_in
                  parent = element_dtrans_type  ).
    ENDFORM.                    " yf_inicia_criacao_xml
    *&      Form  yf_dummy_roteiro
          text
         -->VALUE(P_0996)  text
         -->VALUE(P_0997)  text
    FORM yf_dummy_roteiro USING value(p_0996)
                                value(p_0997).
      l_value  = p_0996.
      CONDENSE l_value.
      element_dummy_type = document_type->create_simple_element(
                    name = p_0997
                   value = l_value
                  parent = element_roteiro_type ).
    ENDFORM.                    " yf_dummy_roteiro
    *&      Form  yf_finaliza_xml
          text
    FORM yf_finaliza_xml.
    *Cria o stream factory
      streamfactory_type = ixml_type->create_stream_factory( ).
    *Conecta a internal table de XML com o stream factory
      ostream_type = streamfactory_type->create_ostream_itable( table = gw_xml_table  ).
      CALL METHOD ostream_type->set_encoding
        EXPORTING
          encoding = encoding_type.
    *Rendering the document
      renderer_type = ixml_type->create_renderer( ostream  = ostream_type
                                            document = document_type ).
      l_rc = renderer_type->render( ).
    *Salva o documento XML
      l_xml_size = ostream_type->get_num_written_raw( ).
    ENDFORM.                    " yf_finaliza_xml
    *&      Form  yf_exporta_xml
          text
         -->VALUE(P_0783)  text
    FORM yf_exporta_xml USING value(p_0783).
      CONCATENATE cod_cartaorepom
                  sy-datum
                  sy-uzeit
                  cc_xml
             INTO v_nomearquivo.
      CONCATENATE p_0783
                  v_nomearquivo
             INTO v_salvaarquivo.
      TRANSLATE v_nomearquivo TO UPPER CASE.
    *Exporta o XML
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          bin_filesize = l_xml_size
          filename     = v_salvaarquivo
          filetype     = cc_bin
        CHANGING
          data_tab     = gw_xml_table
        EXCEPTIONS
          OTHERS       = 24.
      IF sy-subrc = 0.
       PERFORM yf_sapgui_progress_indicator USING cc_msg_xml_ok.
      ELSE.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " yf_exporta_xml
    *&      Form  yf_convert_xml_to_itab
          text
         -->P_GW_XML_NODE_RET  text
         -->P_FILENAME         text
    FORM yf_convert_xml_to_itab  TABLES p_gw_xml_node_ret LIKE gw_xml_node
                                USING  p_filename.
      DATA l_count.
      ixml_type = cl_ixml=>create( ).
    Now Create Stream Factory
      streamfactory_type = ixml_type->create_stream_factory( ).
      CALL METHOD cl_gui_frontend_services=>gui_upload
        EXPORTING
          filename   = p_filename
          filetype   = cc_bin
        IMPORTING
          filelength = l_xml_size
        CHANGING
          data_tab   = gw_xml_table2
        EXCEPTIONS
          OTHERS     = 19.
      IF sy-subrc = 0.
        istream_type = streamfactory_type->create_istream_itable( table = gw_xml_table2
                                                            size  = l_xml_size ).
        document_type = ixml_type->create_document( ).
        parser_type = ixml_type->create_parser( stream_factory = streamfactory_type
                                         istream         = istream_type
                                         document        = document_type ).
        IF parser_type->parse( ) NE 0.
          IF parser_type->num_errors( ) NE 0.
            l_count = parser_type->num_errors( ).
          ENDIF.
        ENDIF.
        CALL METHOD istream_type->close( ).
        CLEAR istream_type.
        node_type = document_type.
        PERFORM yf_get_data USING node_type.
        p_gw_xml_node_ret[] = gw_xml_node[].
        CLEAR gw_xml_node[].
      ENDIF.
    ENDFORM.                    " yf_convert_xml_to_itab
    *&      Form  yf_get_data
          text
         -->VALUE(X_NODE)  text
    FORM yf_get_data    USING value(x_node) TYPE REF TO if_ixml_node.
      DATA: indent      TYPE i.
      DATA: ptext       TYPE REF TO if_ixml_text.
      DATA: string      TYPE string.
      DATA: temp_string(100).
      CASE x_node->get_type( ).
        WHEN if_ixml_node=>co_node_element.
          string = x_node->get_name( ).
          w_nodetext = string.
          CLEAR string.
          string = x_node->get_value( ).
          IF NOT w_nodetext IS INITIAL OR
             NOT string IS INITIAL.
            gs_xml_node-node   = w_nodetext.
            gs_xml_node-vlnode = string.
            IF NOT gs_xml_node-vlnode IS INITIAL.
              APPEND gs_xml_node TO gw_xml_node.
              CLEAR  gs_xml_node.
            ENDIF.
          ENDIF.
      ENDCASE.
    Get the next child
      x_node = x_node->get_first_child( ).
    Recurse
      WHILE NOT x_node IS INITIAL.
        PERFORM yf_get_data USING x_node.
        x_node = x_node->get_next( ).
      ENDWHILE.
    ENDFORM.                    "yf_get_data

  • HOW to read CLOB and create XML file on UNIX/LINUX

    Hi,
    Could you please let me know, how to read CLOB using ADODB. I have column CLOB type on Oracle 9.2, with content of whole XML type. I am unable to retreive more than 4k. I use adLongVarChar. So I have written Oracle stored procedure to read the clob and create XML file using DBMS_LOB package and UTL_FILE package, still no joy.
    Please help.
    example of my XML file is:
    <EXAMPLE><HEADER><VERSION>1.0</VERSION><TEMPLATE>XXXX</TEMPLATE><TAG1>CON</TAG1></HEADER><BODY><TAG2>X1</TAG2><OFFICE>assad</OFFICE><CREATE_DATE>27/02/2006 10:55</CREATE_DATE><SOURCE></SOURCE></BODY><FIXEDTABLE1><TABLEROW1COL1>asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd</TABLEROW1COL1><TABLEROW1COL2></TABLEROW1COL2><TABLEROW2COL1></TABLEROW2COL1><TABLEROW2COL2></TABLEROW2COL2><TABLEROW3COL1></TABLEROW3COL1><TABLEROW3COL2></TABLEROW3COL2><TABLEROW4COL1>asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd asdadddddddddddddddddddddddddddddddddddddddddddddddddd</TABLEROW4COL1><TABLEROW4COL2></TABLEROW4COL2><TABLEROW5COL1></TABLEROW5COL1><TABLEROW5COL2></TABLEROW5COL2></FIXEDTABLE1><CHECKBOX><CHECKBOX1>False</CHECKBOX1><CHECKBOX2>False</CHECKBOX2><CHECKBOX3>False</CHECKBOX3><CHECKBOX4>False</CHECKBOX4><CHECKBOX5>False</CHECKBOX5><CHECKBOX6>False</CHECKBOX6><CHECKBOX7>False</CHECKBOX7><CHECKBOX8>False</CHECKBOX8><CHECKBOX9>False</CHECKBOX9></CHECKBOX></EXAMPLE>
    My STored Procedure:
    ftypFileHandle := UTL_FILE.fopen ('XML_DIR_FILE', vFileName, 'w', 32000);
    lMarker := 'Selecting XML row';
    println(lMarker, 2);
    SELECT XML_FILE
    INTO clobBuffer
    FROM XML_TABLE
    WHERE x=1;
    lMarker := 'Get length of the clob';
    iClobLength := nvl(DBMS_LOB.getlength(clobBuffer), 0);
    WHILE (l_offset <= iClobLength) LOOP
    DBMS_LOB.READ (
    lob_loc=> clobBuffer,
    amount=> l_amt,
    offset=> l_offset,
    buffer=> vOutputBuffer
    UTL_FILE.put (ftypFileHandle, vOutputBuffer);
    UTL_FILE.fflush (ftypFileHandle);
    UTL_FILE.new_line (ftypFileHandle);
    l_offset := l_offset + l_amt;
    END LOOP;
    lMarker := 'Close file';
    println(lMarker, 2);
    UTL_FILE.fclose (ftypFileHandle);
    Thanks

    Hello myself,
    nobody has answered my question, so now I answer myself!!  
    The wrong part is to read the file with "open dataset" and to create the inputstream with
    p_istream = p_streamfactory->create_istream_itable(
    table = g_xml_table
    size = g_xml_size ).
    Better ist to create the inputstream with
    p_istream = p_streamfactory->create_istream_uri(
    .......................PUBLIC_ID = ''
    .......................SYSTEM_ID = '
    applserver\I$\TEMP\Datei.XML' ).
    In this way no space is needed for the file.
    Best regards,
    Thomas
    Message was edited by:
            Thomas13 Scheuermann

  • Any support to create XML files?

    Hello,
    I was looking for functionality and support that OWB 10gR2 might offer in order to create XML files, containing relational data w.r.t a given definition. I did only find the packages that allow manipulation of XML data in tables and those two that allow loading data from XML files, but didn't find any write support.
    Is my conclusion correct that there is no functionality that supports coding data in XML files in OWB 10gR2? Can anyone who knows please confirm or falsify this conclusion.
    Thanks in advance.
    Regards Holger

    Hi,
    the best way with BI Publisher to do that is a data template: http://download.oracle.com/docs/cd/E10383_01/doc/bip.1013/b40017/T421739T434255.htm
    With that you can create your wished structure out of the database.
    Have you tried with database functinonality? Have a look at the SQL/XML Functions: http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb13gen.htm#sthref1484
    which could be an approach.
    Regards
    Rainer

  • Creating XML File Using xmldom Package

    How can I create an XML file from scratch using the PL/SQL xmldom package?
    I want to create an XML file using the xmldom package instead of building the individual tags as strings of VARCHAR2 character data. There is quite a bit of documentation regarding manipulating input XML files using DOM -- but not for creating XML files from scratch given known "tagnames" (<lastName>) and retrieved database "values" ("Smith").
    <person>
    <lastName>Smith</lastName>
    </person>
    Is there any documentation that you can recommend?
    Thank you.

    Here is an example.
    The create_file procedure creates the file.
    The other procedures are generic procs that can be used with any XML.
    PROCEDURE create_file_with_root(po_xmldoc OUT xmldom.DOMDocument,
    pi_root_tag IN VARCHAR2,
                                            po_root_element OUT xmldom.domelement,
                                            po_root_node OUT xmldom.domnode,
                                            pi_doctype_url IN VARCHAR2) IS
    xmldoc xmldom.DOMDocument;
    root xmldom.domnode;
    root_node xmldom.domnode;
    root_element xmldom.domelement;
    record_node xmldom.domnode;
    newelenode xmldom.DOMNode;
    BEGIN
    xmldoc := xmldom.newDOMDocument;
    xmldom.setVersion(xmldoc, '1.0');
    xmldom.setDoctype(xmldoc, pi_root_tag, pi_doctype_url,'');
    -- Create the root --
    root := xmldom.makeNode(xmldoc);
    -- Create the root element in the file --
    create_element_and_append(xmldoc, pi_root_tag, root, root_element, root_node);
    po_xmldoc := xmldoc;
    po_root_node := root_node;
    po_root_element := root_element;
    END create_file_with_root;
    PROCEDURE create_element_and_append(pi_xmldoc IN OUT xmldom.DOMDocument,
    pi_element_name IN VARCHAR2,
                                            pi_parent_node IN xmldom.domnode,
                                            po_new_element OUT xmldom.domelement,
                                            po_new_node OUT xmldom.domnode) IS
    element xmldom.domelement;
    child_node xmldom.domnode;
    newelenode xmldom.DOMNode;
    BEGIN
    element := xmldom.createElement(pi_xmldoc, pi_element_name);
    child_node := xmldom.makeNode(element);
    -- Append the new node to the parent --
    newelenode := xmldom.appendchild(pi_parent_node, child_node);
    po_new_node := child_node;
    po_new_element := element;
    END create_element_and_append;
    FUNCTION create_text_element(pio_xmldoc IN OUT xmldom.DOMDocument, pi_element_name IN VARCHAR2,
    pi_element_data IN VARCHAR2, pi_parent_node IN xmldom.domnode) RETURN xmldom.domnode IS
    parent_node xmldom.domnode;                                   
    child_node xmldom.domnode;
    child_element xmldom.domelement;
    newelenode xmldom.DOMNode;
    textele xmldom.DOMText;
    compnode xmldom.DOMNode;
    BEGIN
    create_element_and_append(pio_xmldoc, pi_element_name, pi_parent_node, child_element, child_node);
    parent_node := child_node;
    -- Create a text node --
    textele := xmldom.createTextNode(pio_xmldoc, pi_element_data);
    child_node := xmldom.makeNode(textele);
    -- Link the text node to the new node --
    compnode := xmldom.appendChild(parent_node, child_node);
    RETURN newelenode;
    END create_text_element;
    PROCEDURE create_file IS
    xmldoc xmldom.DOMDocument;
    root_node xmldom.domnode;
    xml_doctype xmldom.DOMDocumentType;
    root_element xmldom.domelement;
    record_element xmldom.domelement;
    record_node xmldom.domnode;
    parent_node xmldom.domnode;
    child_node xmldom.domnode;
    newelenode xmldom.DOMNode;
    textele xmldom.DOMText;
    compnode xmldom.DOMNode;
    BEGIN
    xmldoc := xmldom.newDOMDocument;
    xmldom.setVersion(xmldoc, '1.0');
    create_file_with_root(xmldoc, 'root', root_element, root_node, 'test.dtd');
    xmldom.setAttribute(root_element, 'interface_type', 'EXCHANGE_RATES');
    -- Create the record element in the file --
    create_element_and_append(xmldoc, 'record', root_node, record_element, record_node);
    parent_node := create_text_element(xmldoc, 'title', 'Mr', record_node);
    parent_node := create_text_element(xmldoc, 'name', 'Joe', record_node);
    parent_node := create_text_element(xmldoc,'surname', 'Blogs', record_node);
    -- Create the record element in the file --
    create_element_and_append(xmldoc, 'record', root_node, record_element, record_node);
    parent_node := create_text_element(xmldoc, 'title', 'Mrs', record_node);
    parent_node := create_text_element(xmldoc, 'name', 'A', record_node);
    parent_node := create_text_element(xmldoc, 'surname', 'B', record_node);
    -- write the newly created dom document into the buffer assuming it is less than 32K
    xmldom.writeTofile(xmldoc, 'c:\laiki\willow_data\test.xml');
    EXCEPTION
    WHEN xmldom.INDEX_SIZE_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Index Size error');
    WHEN xmldom.DOMSTRING_SIZE_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'String Size error');
    WHEN xmldom.HIERARCHY_REQUEST_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Hierarchy request error');
    WHEN xmldom.WRONG_DOCUMENT_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Wrong doc error');
    WHEN xmldom.INVALID_CHARACTER_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Invalid Char error');
    WHEN xmldom.NO_DATA_ALLOWED_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Nod data allowed error');
    WHEN xmldom.NO_MODIFICATION_ALLOWED_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'No mod allowed error');
    WHEN xmldom.NOT_FOUND_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Not found error');
    WHEN xmldom.NOT_SUPPORTED_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Not supported error');
    WHEN xmldom.INUSE_ATTRIBUTE_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'In use attr error');
    WHEN OTHERS THEN
    dbms_output.put_line('exception occured' || SQLCODE || SUBSTR(SQLERRM, 1, 100));
    END create_file;

  • Creating XML file from Java Bean

    Hi
    Are there any standard methods in Java 1.5 to create XML file from java bean,
    i can use JAXB or castor to do so,
    But i would like to know if there is any thing in java core classes,
    I have seen XMLEncoder, but this is not what i want.
    Any ideas
    Ashish

    Marshall JavaBean to an XML document with JAXB or XMLBeans.

  • Create XML file by using servlet

    Hi, Is there anyone who sucessfully create XML file by taking parameters from a web form? If so, hope you could share the code with me. I moved the code from the example to servlet. it keeps returning null pointer exception on the root node.
    java.lang.NullPointerException: at oracle.xml.classgen.CGDocument.(CGDocument.java:62)
    null

    Hi everybody,<br /><br />the code works good now. so it should be available for everybody who needs it:<br /><br />---------------- my code --------------------------------------<br /><br />var container = "";<br /><br />container = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n";<br />container = container + "<all>\n";<br />container = container + "<header>\n";<br />container = container + "<author>author name</author>\n";<br />container = container + "<authorMail>[email protected]</authorMail>\n";<br />container = container + "</header>\n";<br />container = container + "<body>\n";<br />container = container + "<name>" + value + "</name>\n";<br />container = container + "<adresse>" + value + "</adresse>\n";<br />container = container + "<ort>" + value + "</ort>\n";<br />container = container + "<staat>" + value + "</staat>\n";<br />container = container + "<plz>" + value + "</plz>\n";<br />container = container + "<land>" + value + "</land>\n";<br />container = container + "</body>\n";<br />container = container + "</all>\n";<br /><br />var myDoc = event.target;<br />myDoc.createDataObject("export.xml", container);<br />myDoc.exportDataObject("export.xml");<br /><br />app.mailMsg(false, "mail-address1; mail-address2", "", "",<br />"mail subject", "mail body");<br /><br />---------------- end of my code ------------------------------- <br /><br />now i'm looking for a solution to automatically attach the file to this mail and directls sent it without to call up the mail client.<br />if anybody has got an hint, you're welcome ;-)

  • Create XML File from a specified XSD file

    Hi,
    I'd like to create an XML document with java. BUT How can we "bind" this creation with a XSD file. Hence, the creation may fail if the XSD binded file is not respected.
    So I know how to create XML file but not bind to this creation my proper XSD file (XML schema). With which tool can I do this ?
    Thanks.

    Hi,
    I'd like to create an XML document with java. BUT How can we "bind" this creation with a XSD file. Hence, the creation may fail if the XSD binded file is not respected.
    So I know how to create XML file but not bind to this creation my proper XSD file (XML schema). With which tool can I do this ?
    Thanks.

  • Can not create XML file from MS Access 2003

    Hi,
    I am getting error as "Error loading in DLL" when I use msaccess_exporter to create XML file for migrations usind Access 2003 DB. Does anyone know about this? If yes, could you please let me know how to resolve it?
    Thanks,
    Kartik

    Hi Daniel,
    I believe you are seeing the message "Table'_OracletblDatabase' already exists" because you are attempting to export an MDB file that you previously attempted to export, but that initial export process may not have run to completion. I recommend opening your .MDB file, and delete any "_Oracletbl..." table objects that exist under the list of Table objects. Close the MDB file and carry out the export process again. You should now be able to use the 2000 mde file.
    I hope this helps.
    Regards,
    Hilary

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

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

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

  • I want to create xml file using photoshop script and also i can easily add, modify, delete based on file name

    Hi,
    Please help me for this.
    I need to create XML file for mentioned below. when i run the photoshop script i need deatails for active document name, date, time and status.
    <?xml version="1.0" encoding="UTF-8"?>
    <sample>
    <filename>Cradboard_Boxes_Small.tif</filename>
    <date>today date</date>
    <starttime>now</starttime>
    <status>delivered</status>
    </sample>
    <sample>
    <filename>Cardboard_Boxes_Student_Vaue_Pack.jpg</filename>
    <date>today date</date>
    <starttime>now</starttime>
    <status>delivered</status>
    </sample>
    I need read that xml after creating and modify based on file name. i need to modify status after file finished.
    if the file name is already exist i want to modify or delete or add whatever i need.
    Kindly help me simple way

    You may want to look into getting Xtools ps-scripts - Browse Files at SourceForge.net then.  Most of the support is for ActionManager script code where XML code is use as an intermediate step.  There are quite a few Photoshop script in XTools .   Ross Huitt is an expert javascript programmer though is is fed up with Adobe's lack of support for Photoshop scripting particularly the bugs in ScriptUI he is still maintaining tool he  has created for us free of charge. Tools like Image Processor Pro. None of his scripts are save as binary so you can read all of his code there is a wealth of knowledge in there....
    Also there is a scripting forum Photoshop Scripting

Maybe you are looking for

  • K9N4 SLI - Lack of 125W CPU Support

    Hello, Just wondering why does this board not support any 125W CPU's? I was looking at getting one of these boards to throw in a 6000 X2 but according to the website, this board only supports the 89W version, which is unavailable where I am. I've see

  • Problem with User Authorizations

    Hi all, I am facing a new Bugg while loging in to the independent user login,after setting the authorisation at manager login.The error message i receive while i try to open P.O in the Purchasing A/P (in the independent login) is "To generate this do

  • JTree as a navigation tool

    I'd like to use a multilevel Jtree as a navigation tool in a JClient. I read in this forum that the navigation model of Jtrees is incomplete. I'd like to know (from the JDev team) if I'm right and ,in this case, the release I've to wait for. Thanks M

  • How do I delete invisible MP4 files from my FLIP video camera attached by USB?

    Hello!  I have a FLIP video camera attached to my MacBook by USB.  The FLIP has invisible files (old videos that I have previously deleted from the camera) that I want to delete.  I can see them in Finder using File/Find/Other/Invisible Files but I *

  • After Software Update: BB World crashes

    Updated to software release 10.1.0.4181 (OS version 10.1.0.4633). Now BlackBerry World crashes immediately after opening it. It opens the application and .x seconds later the screen disappears. Doesn't even really "load" the application. Problem afte