Converting xml file with arabic content to pdf using FOP

Hello all
I am trying to convert a dynamically generated xml file in which most of the data comes from the oracle database with arabic content, to pdf using FOP. I have used "Windows-1256" encoding for the xml. If i open the xml generated with the internet explorer the arabic content displays properly but the pdf is not generated and the acrobat reader shows the file as corrupted or not supported. Please help me. Its very urgent.
Thanks & Regards
Gurpreet Singh

There is no direct support for importing RTF from an XML extract. Perhaps feature 1514 "Mapping formatted XML data into multiline field" will be of some use. This was released in 11.0, I believe.
Essentially you can establish paragraph and certain text formatting like bold and underline when you include the proper token information in the data. I believe this is similar to simple HTML tokens.
Example: <FIELD><P>First paragraph of data.</P><P>New paragraph with <B><U>bold and underline text</U></B>. Rest of paragraph normal.</P></FIELD>
The result is something like this:
<P>First paragraph of data.</P><P>New paragraph with <B><U>bold and underline text</U></B>. Rest of paragraph normal.</P>

Similar Messages

  • Trouble converting powerpoint files with png images to pdf-Can someone help?

    Hello all,
    In my line of work, I create and modify large sized posters that are created in powerpoint. I would have the files print ready by converting them to pdf. I usually have little to no issues executing this. However, I have been dealing with an issue of converting ppt files with png images. The size of the ppt is typically a 42x56 file. The several ways to convert to pdf produces an error each time. Png images are very useful as they provide much clarity vs jpegs or tiffs. The 3 ways I have tried below are:
    A) File>Print>Adobe PDF>High Quality print settings/300dpi results to an error message that says:
         "Windows cannot print due to a problem with the current print setup. Try one of the following:
         *Check the printer by printing a test page from Windows.
         *Make sure the printer is turned on and online.
         *Reinstall the printer driver"
         A blank pdf opens up (Selected to open file after publishing)
    B) File>Save as> Change file type as a pdf results in nothing happening. No pdf is produced.
    C) Acrobat>Create PDF results to an error message that says: "An unexpected error occured. PDFMaker was unable to produce the Adobe PDF."
    Again, this all happens with ppt files with png images. I took out the png images and attempted to convert to pdf, and the pdf is produced! 
    Can anyone provide any assistance in creating pdfs with png images or what settings I need to adjust? I am able to covert every other image type (jpeg, tiff, bmp), except for png images.
    I am using Microsoft Office 2010 with Adobe Acrobat X on Windows 7 (This happened on Windows XP as well).

    >I have a 48 slide presentation that has a small .png image in the "slide
    >master" so it will show up on every page.
    PowerPoint only has to store one instance of the image even thought it is
    displayed on multiple slides. But Acrobat can't do the same, the image has
    to be stored for every page that it appears on, so that would explain the
    larger file size.
    Acrobat is supposed to be able to optimize the storage of common background
    images (at least that's the message I see when I do a "Save as..."), but I
    have yet to see it to work. Maybe it depends on the application the orginal
    file is created in and the PDF conversion method used.
    Adding the image into a PDF file later as a watermark instead may be a way
    to keep the size down (then it really only does store the object once),
    though I believe that watermark images will appear in front of everything
    else on the page (not sure if that's a problem for you, it depends on
    whether any text or objects in the presentation ever appear in front of the
    image).
    What are the dimensions and resolution of the image in PowerPoint? You may
    be able to go as low as 75 dpi and not notice a difference, it depends on
    whether the image contains any areas of high contrast or text.

  • Read rtf contents from xml file and print them in pdf using documaker

    I am using Documaker 11.2.
    Input file is XML and for a particular tag, rtf contents is passed like
    {\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial Narrow;}} \viewkind4\uc1\pard\b\f0\fs20 My\b0 name is Schoo.....
    I want to read this data excluding the RTF abstract and print the text alone in pdf along with format like paragraph,bold....
    The output file generated is PDF.
    Kindly let me know how can i achieve this in Documaker.

    There is no direct support for importing RTF from an XML extract. Perhaps feature 1514 "Mapping formatted XML data into multiline field" will be of some use. This was released in 11.0, I believe.
    Essentially you can establish paragraph and certain text formatting like bold and underline when you include the proper token information in the data. I believe this is similar to simple HTML tokens.
    Example: &lt;FIELD>&lt;P>First paragraph of data.&lt;/P>&lt;P>New paragraph with &lt;B>&lt;U>bold and underline text&lt;/U>&lt;/B>. Rest of paragraph normal.&lt;/P>&lt;/FIELD>
    The result is something like this:
    <P>First paragraph of data.</P><P>New paragraph with <B><U>bold and underline text</U></B>. Rest of paragraph normal.</P>

  • Convert PDF with  Arabic  content to word /Excel .

    I have problem , I plan to buy Adobe acrobat  pro  for my ORG , The main target to buy it , to convert PDF a Arabic  content to word or Excel , I download trial version from Adobe acrobat pro  , and when i convert PDF English content  it's fine , but when i  convert PDF with Arabic content  , the result is bad the  word become letters and  the documents become not readable , Pleas  help me cause the main  target is convert Arabic PDF to Word .
    " the mean problem is  when i convert PDF with Arabic content to word the result is bad the   document become unreadable .
    thanks , wait for replay.

    HI,
    Adobe Acrobat is a special PDF viewer which is technically develop for the whole world to read any PDF file which a user wants to read. It's basic languages are:
    English (US)
    English (UK)
    Arabic
    Italian
    Japanese
    Spanish
    German
    But when you going to export the PDF file the arabic language will not support.
    Regards,
    Florence

  • Steps in converting a xml file with an rtf template to a pdf

    Hey all,
    What are the steps in converting a xml file with an rtf template to a pdf using XML Publisher from command line.
    Thanks
    Ravi

    I don't have any code to do exactly what you wish, but it shouldn't be too difficult and http://www.dadhi.com/2007/06/generate-and-store-pdf-file-in-same.html is a good starting point.
    Paul

  • Convert XML file into PDF file

    <b>XML to PDF</b>i want to Convert XML file into PDF file pl. any one can suggests API's

    Hi,
    There are many ways to convert XML files to PDFs through java.
    One of the easiest way is by using iText.jar which have classes for conversion.
    The following are the required steps
    1. Create a document object for the XML file ( Using DOM or SAX parser).
    2. Parse the xml document and extract the content to write in PDF.
    3.Create a itext Document object.
    4.Get a PdfWriter instance for the PDF file.
    5.Write in the pdf the extracted text using the document object.
    Refer <a href="http://itextdocs.lowagie.com/examples/com/lowagie/examples/general/HelloWorld.java">here</a> for a simple pdf writer example.
    Refer <a href="http://java.sun.com/developer/codesamples/xml.html">here</a> for examples of XML Parsers.
    Regards,
    Uma

  • Failed to load XML file with Content ID 'XYZ'

    Hello,
    We are using UCM Version:11.1.1.8.1DEV-2014-01-06 04:18:30Z-r114490 (Build:7.3.5.185) with site studio for creating templates and web sites.
    While switching to contribution mode, we find 'Failed to load XML file with Content ID 'XYZ' error.[Here XYZ is the local checkin content]
    In region we are using dynamic converter to convert the style of native document here below are region and its element details.
    <region  id="region3" name="Add_Content_Here" flags="1111111100100" metadata="xIdcProfile%3AisHidden%3Dtrue%26xTemplateType%3AisHidden%3Dtrue%26xShowInStaff%3AisHidden%3Dtrue%26xShowInVisitors%3AisHidden%3Dtrue%26xShowInFaculty%3AisHidden%3Dtrue%26xDiscussionCount%3AisHidden%3Dtrue%26xDiscussionType%3AisHidden%3Dtrue" dccommand="ssIncDynamicConversionByRule(SS_DATAFILE, 'Colleges_Template_Rule')">
          <!--$region3_ACTIONS="EIMPRS",region3_DCCOMMAND="ssIncDynamicConversionByRule(SS_DATAFILE, 'Colleges_Template_Rule')" -->
          <element  id="region3_element1" name="Editor" label="Editor" type="1" flags="111111111111111111111100000111100000000000001111001110111010001111101000000000000000000000000000">
            <!--$region3_element1="Add_Content_Here/Editor" -->
            <linktoregioncontent  createnewxml="true" createnewnative="false" choosemanaged="true" chooselocal="false" choosenone="false">
              <choosemanagedquerytext  corecontentonly="FALSE">
                <![CDATA[xWebsiteObjectType <Matches> `Data File` <OR> xWebsiteObjectType <Matches> `Native Document`]]>
              </choosemanagedquerytext>
            </linktoregioncontent>
          </element>
          <switchregioncontent  createnewxml="true" createnewnative="true" choosemanaged="true" chooselocal="false" choosenone="false">
            <createnewnativedoctypes >
              <![CDATA[.doc,.docx,.txt,.rtf]]>
            </createnewnativedoctypes>
            <choosemanagedquerytext  corecontentonly="FALSE">
              <![CDATA[xWebsiteObjectType <Matches> `Data File` <OR> xWebsiteObjectType <Matches> `Native Document`]]>
            </choosemanagedquerytext>
            <defaultmetadata >
              <![CDATA[xIdcProfile%3AisHidden%3Dtrue%26xTemplateType%3AisHidden%3Dtrue%26xCollegesList%3AisHidden%3Dtrue%26xShowInStudents%3AisHidden%3Dtrue%26xShowInStaff%3AisHidden%3Dtrue%26xShowInVisitors%3AisHidden%3Dtrue%26xShowInFaculty%3AisHidden%3Dtrue%26xArticleSection%3AisHidden%3Dtrue%26xDiscussionCount%3AisHidden%3Dtrue%26xDiscussionType%3AisHidden%3Dtrue%26dpTriggerValue%3DCSE]]>
            </defaultmetadata>
          </switchregioncontent>
        </region>
    <!--SS_BEGIN_OPENREGIONMARKER(region3)--><!--$SS_REGIONID="region3"--><!--$include ss_open_region_definition --><!--SS_END_OPENREGIONMARKER(region3)-->
    <!--SS_BEGIN_ELEMENT(region3_element1)--><!--$ssIncludeXml(SS_DATAFILE,region3_element1 & "/node()")--><!--SS_END_ELEMENT(region3_element1)-->
    <!--SS_BEGIN_CLOSEREGIONMARKER(region3)--><!--$include ss_close_region_definition --><!--SS_END_CLOSEREGIONMARKER(region3)-->
    Regardrs,
    Syed

    Hi Syed ,
    Add the following trace sections :
    requestaudit,sitestudio*,system + Full verbose tracing
    Clear the server output .
    Replicate the same steps and once error shows up , refresh server output and copy the logs to a text file and upload here .
    Thanks,
    Srinath

  • Embedding data from xml file into metadata of a pdf

    Hi All
    I'm wanting to do the following, but struggling to figure the right way to go about it.
    I want to embedded data from my MIS into a pdf's metadata (as scrnshot). I can create a standalone xml file with all the data I require, but I'm unsure how to automate that being embedded into a pdf's advanced metadata. I know this can be done, as it worked at a previous employer, but I didn't get chance to find out how they did it.
    I'm wanting to do this so I can carry out a more advanced search of the metadata in Bridge.
    Any advice would be appreciated!

    Hi Northern,
        I have modified the modifyingXMP sample for you. After this change, put your xmp file as sample.xml and also put pdf file in the same folder where ModifyXMP executable is. After merging my changes, ModifyXMP file will read the sample.xml and will embed it into pdf file.
       Please follow the following steps
    1. Download XMPToolkit SDK and follow the steps to compile Sample
    2. Open ModifyingXMP file, replace all the content of that file with the below content
    3. Compile the ModifyingXMP file.
    4. The ModifyXMP.exe will be generated in folder (samples\target\windows\Debug), if you have changed the output folder it will be generated there.
    5. In parallel to ModifyingXMP.exe put the sample.xml (the xml file you have) and also the pdf file (say pdf file name is mypdf.pdf)
    6. Go to console and change directory to the directory where ModifyingXMP is and pass the following command
    ModifyingXMP mypdf.pdf
    7. Open the pdf file and check that value/properties
    For your reference, I am putting the content of the sample.xml file too, put this content in sample.xmp and any pdf and you will find subject field is getting added.
    ************** content of the sample.xml file. Create a file name sample.xml and put that content. Put sample.xml in parallel to ModifyingXMP.exe*******
    <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
        <rdf:Description rdf:about='' xmlns:dc='http://purl.org/dc/elements/1.1/'>
            <dc:subject>
                <rdf:Bag>
                    <rdf:li>XMP</rdf:li>
                    <rdf:li>SDK</rdf:li>
                    <rdf:li>Sample</rdf:li>
                </rdf:Bag>
            </dc:subject>
            <dc:format>image/tiff</dc:format>
        </rdf:Description>
    </rdf:RDF>
    ******************* MODIFIED CONTENT OF MODIFYING.CPP FILE. ***************************************************************************************** ************
    // ========================================================================================= ========
    // Copyright 2008 Adobe Systems Incorporated
    // All Rights Reserved.
    // NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the terms
    // of the Adobe license agreement accompanying it.
    // ========================================================================================= ========
    * Tutorial solution for Walkthrough 2 in the XMP Programmers Guide, Modifying XMP
    * Demonstrates how to open a file for update, and modifying the contained XMP before writing it back to the file.
    #include <cstdio>
    #include <vector>
    #include <string>
    #include <cstring>
    // Must be defined to instantiate template classes
    #define TXMP_STRING_TYPE std::string
    // Must be defined to give access to XMPFiles
    #define XMP_INCLUDE_XMPFILES 1
    // Ensure XMP templates are instantiated
    #include "public/include/XMP.incl_cpp"
    // Provide access to the API
    #include "public/include/XMP.hpp"
    #include <iostream>
    #include <fstream>
    using namespace std;
    * Creates an XMP object from an RDF string.  The string is used to
    * to simulate creating and XMP object from multiple input buffers.
    * The last call to ParseFromBuffer has no kXMP_ParseMoreBuffers options,
    * thereby indicating this is the last input buffer.
    #include <sstream>     
    SXMPMeta createXMPFromRDF()
        string rdf;
        //open the RDF file and put it's content into rdf buffer
        ifstream inFile;
        inFile.open("sample.xml");//open the input file
        if (!inFile.is_open()) {
            cout <<"Couldn't open xml file" <<endl;
            exit(1);
        stringstream strStream;
        strStream << inFile.rdbuf();//read the file
        rdf = strStream.str();//str holds the content of the file
        SXMPMeta meta;
        // Loop over the rdf string and create the XMP object
        // 10 characters at a time
        int i;
        for (i = 0; i < (long)rdf.size() - 10; i += 10 )
            meta.ParseFromBuffer ( &rdf[i], 10, kXMP_ParseMoreBuffers );
        meta.ParseFromBuffer ( &rdf[i], (XMP_StringLen) rdf.size() - i );
        return meta;
    int main ( int argc, const char * argv[] )
        if ( argc != 2 ) // 2 := command and 1 parameter
            cout << "usage: ModifyingXMP (filename)" << endl;
            return 0;
        string filename = string( argv[1] );
        if(!SXMPMeta::Initialize())
            cout << "Could not initialize toolkit!";
            return -1;
        XMP_OptionBits options = 0;
        #if UNIX_ENV
            options |= kXMPFiles_ServerMode;
        #endif
        // Must initialize SXMPFiles before we use it
        if(SXMPFiles::Initialize(options))
            try
                // Options to open the file with - open for editing and use a smart handler
                XMP_OptionBits opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUseSmartHandler;
                bool ok;
                SXMPFiles myFile;
                std::string status = "";
                // First we try and open the file
                ok = myFile.OpenFile(filename, kXMP_UnknownFile, opts);
                if( ! ok )
                    status += "No smart handler available for " + filename + "\n";
                    status += "Trying packet scanning.\n";
                    // Now try using packet scanning
                    opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUsePacketScanning;
                    ok = myFile.OpenFile(filename, kXMP_UnknownFile, opts);
                // If the file is open then read get the XMP data
                if(ok)
                    cout << status << endl;
                    cout << filename << " is opened successfully" << endl;
                    // Create the XMP object and get the XMP data
                    SXMPMeta meta;
                    myFile.GetXMP(&meta);
                    // Create a new XMP object from an RDF string
                    SXMPMeta rdfMeta = createXMPFromRDF();
                    // Append the newly created properties onto the original XMP object
                    // This will:
                    // a) Add ANY new TOP LEVEL properties in the source (rdfMeta) to the destination (meta)
                    // b) Replace any top level properties in the source with the matching properties from the destination
                    SXMPUtils::ApplyTemplate(&meta, rdfMeta, kXMPTemplate_AddNewProperties | kXMPTemplate_ReplaceExistingProperties | kXMPTemplate_IncludeInternalProperties);
                    // Check we can put the XMP packet back into the file
                    if(myFile.CanPutXMP(meta))
                        // If so then update the file with the modified XMP
                        myFile.PutXMP(meta);
                    // Close the SXMPFile.  This *must* be called.  The XMP is not
                    // actually written and the disk file is not closed until this call is made.
                    myFile.CloseFile();
                else
                    cout << "Unable to open " << filename << endl;
            catch(XMP_Error & e)
                cout << "ERROR: " << e.GetErrMsg() << endl;
            // Terminate the toolkit
            SXMPFiles::Terminate();
            SXMPMeta::Terminate();
        else
            cout << "Could not initialize SXMPFiles.";
            return -1;
        return 0;
    Please let me know if you find any issue/assistance.
    -Sunil

  • Sending XML Files with Certificate

    Hello everybody.
    I need develop an abap program for sending XML files with a certificate.
    How I can create this certificate?
    Somebody have an idea?
    Thank you everybody.
    Nelson

    Mikael,
    This sounds like one of the many quirks (perhaps bugs) related to how FrameMaker handles non-FM files in books. The current book model doesn't play well with XML files as chapters and this seems like yet another problem. Apparently, if an xref does not target another .fm file in the book, Frame assumes that the target file is not in the book and therefore will not be in the book PDF.
    There have been discussions here about this in the past. The solution that I use is to run an API client before publishing that converts all XML files to .fm files, and redirect all xrefs appropriately. Then, book features work as expected and PDFs come out as normal. This is not feasible, however, without the automation from the API client.
    There may be some who would say that the best approach is to use XML and books the way that the designers did account for... that is, the whole book becomes an XML document with entity references to the separate chapters. In my work, though, this model was not appropriate... rather, I needed a binary FM book to act like a book, except with XML files as chapters. So, I think I understand your situation.
    Is API programming or FrameScript an option for you? I think it may be the only way to get what you are looking for.
    Russ

  • How to convert XML file to an internal table ?

    Hi All,
    I want to do a batch input program. The source data would be given as an excel file . I would like to know how to convert XML file to internal table properly. Please help me out..
    Thanking you in advance ..
    Shankara Narayanan T.V

    Hi Shankar,
    use 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
             EXPORTING
                  filename                = p_file1
                  i_begin_col             = '1'
                  i_begin_row             = '5'
                  i_end_col               = '40'
                  i_end_row               = '16'
             TABLES
                  intern                  = it_intern
             EXCEPTIONS
                  inconsistent_parameters = 1
                  upload_ole              = 2
                  OTHERS                  = 3.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    LOOP AT it_intern.
          AT NEW row.
            CLEAR it_intern.
          ENDAT.
            CASE lv_flag.
        Production Version
              WHEN  1.
                it_master-matnr      =   it_intern-value.     
              WHEN  2.
                it_master-werks      = it_intern-value.
              WHEN  3.
                it_master-verid      = it_intern-value.
              WHEN  4.
                it_master-text1      = it_intern-value.
              WHEN  5.
                it_master-fdate     = it_intern-value.
          AT END OF row.
            APPEND it_master.
          ENDAT.
        ENDLOOP.
    -Anu
    Message was edited by:
            Anupama Reddy

  • Convert XML file to sap

    Dear friends
                  For converting XML file to SAP, I used TEXT_CONVERT_XML_TO_SAP function module. In this I have some doubt. Pls clarify this.
    1. I am getting run time error with type h.
    2  I_FIELD_SEPERATOR          = ';'
       I_LINE_HEADER              =
       I_TAB_RAW_DATA             =
       I_FILENAME                 =
       I_TOTALSIZE                =
    for the above parameter what are the value has to passed.
    Thanks.

    Hi,
    Take a look in this code:
    *& Report  z_xit_xml_check
      REPORT  z_xit_xml_check.
      TYPE-POOLS: ixml.
      DATA: BEGIN OF t_cabec OCCURS 0.
              INCLUDE STRUCTURE zmmt2010.
      DATA END OF t_cabec.
      DATA: BEGIN OF t_item OCCURS 0.
              INCLUDE STRUCTURE zmmt2011.
      DATA END OF t_item.
      DATA: BEGIN OF t_itemt OCCURS 0.
              INCLUDE STRUCTURE zmmt2012.
      DATA END OF t_itemt.
      TYPES: BEGIN OF t_xml_line,
              data(256) TYPE x,
            END OF t_xml_line.
      DATA check_item(1).
      DATA check_itemt(1).
      DATA: l_ixml            TYPE REF TO if_ixml,
            l_streamfactory   TYPE REF TO if_ixml_stream_factory,
            l_parser          TYPE REF TO if_ixml_parser,
            l_istream         TYPE REF TO if_ixml_istream,
            l_document        TYPE REF TO if_ixml_document,
            l_node            TYPE REF TO if_ixml_node,
            l_xmldata         TYPE string.
      DATA: l_elem            TYPE REF TO if_ixml_element,
            l_root_node       TYPE REF TO if_ixml_node,
            l_next_node       TYPE REF TO if_ixml_node,
            l_name            TYPE string,
            l_iterator        TYPE REF TO if_ixml_node_iterator.
      DATA: l_xml_table       TYPE TABLE OF t_xml_line,
            l_xml_line        TYPE t_xml_line,
            l_xml_table_size  TYPE i.
      DATA: l_filename        TYPE string.
      PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:\xml.xml'.
      START-OF-SELECTION.
        PERFORM busca_xml.
        PERFORM carrega_tabela.
    *&      Form  get_xml_table
      FORM get_xml_table CHANGING l_xml_table_size TYPE i
                                  l_xml_table      TYPE STANDARD TABLE.
      Local variable declaration
        DATA: l_len      TYPE i,
              l_len2     TYPE i,
              l_tab      TYPE tsfixml,
              l_content  TYPE string,
              l_str1     TYPE string,
              c_conv     TYPE REF TO cl_abap_conv_in_ce,
              l_itab     TYPE TABLE OF string.
        l_filename = pa_file.
      upload a file from the client's workstation
        CALL METHOD cl_gui_frontend_services=>gui_upload
          EXPORTING
            filename   = l_filename
            filetype   = 'BIN'
          IMPORTING
            filelength = l_xml_table_size
          CHANGING
            data_tab   = l_xml_table
          EXCEPTIONS
            OTHERS     = 19.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDFORM.                    "get_xml_table
    *&      Form  process_dom
      FORM process_dom USING document TYPE REF TO if_ixml_document.
        DATA: node      TYPE REF TO if_ixml_node,
              iterator  TYPE REF TO if_ixml_node_iterator,
              nodemap   TYPE REF TO if_ixml_named_node_map,
              attr      TYPE REF TO if_ixml_node,
              name      TYPE string,
              prefix    TYPE string,
              value     TYPE string,
              indent    TYPE i,
              count     TYPE i,
              index     TYPE i.
        DATA v_codcat TYPE zmmt2011-codcat.
        DATA v_master_for TYPE zmmt2011-master_for.
        node ?= document.
        CHECK NOT node IS INITIAL.
        IF node IS INITIAL. EXIT. ENDIF.
      create a node iterator
        iterator  = node->create_iterator( ).
      get current node
        node = iterator->get_next( ).
      loop over all nodes
        WHILE NOT node IS INITIAL.
          indent = node->get_height( ) * 2.
          indent = indent + 20.
          CASE node->get_type( ).
            WHEN if_ixml_node=>co_node_element.
            element node
              name    = node->get_name( ).
              TRANSLATE name TO LOWER CASE.
              IF name = 'iten'.
                MOVE 'I' TO check_item.
              ENDIF.
              IF name = 'cabec'.
                MOVE 'C' TO check_item.
              ENDIF.
              IF name = 'iten_texto'.
                MOVE 'T' TO check_item.
              ENDIF.
              nodemap = node->get_attributes( ).
              IF NOT nodemap IS INITIAL.
              attributes
                count = nodemap->get_length( ).
                DO count TIMES.
                  index  = sy-index - 1.
                  attr   = nodemap->get_item( index ).
                  name   = attr->get_name( ).
                  prefix = attr->get_namespace_prefix( ).
                  value  = attr->get_value( ).
                ENDDO.
              ENDIF.
            WHEN if_ixml_node=>co_node_text OR
                 if_ixml_node=>co_node_cdata_section.
            text node
              value  = node->get_value( ).
              IF check_item = 'C'.
                TRANSLATE name TO LOWER CASE.
                CASE name.
                  WHEN 'lifnr'.     MOVE value TO t_cabec-lifnr.
                  WHEN 'codcat'.
                    MOVE value TO t_cabec-codcat.
                    MOVE value TO v_codcat.
                  WHEN 'bukrs'.     MOVE value TO t_cabec-bukrs.
                  WHEN 'zterm'.     MOVE value TO t_cabec-zterm.
                  WHEN 'waers'.     MOVE value TO t_cabec-waers.
                  WHEN 'inco1'.     MOVE value TO t_cabec-inco1.
                  WHEN 'inco2'.     MOVE value TO t_cabec-inco2.
                  WHEN 'telf1'.     MOVE value TO t_cabec-telf1.
                  WHEN 'verkf'.     MOVE value TO t_cabec-verkf.
                  WHEN 'datav'.
                    MOVE value TO t_cabec-datav.
                    APPEND t_cabec.
                ENDCASE.
              ENDIF.
              IF check_item = 'I'.
                TRANSLATE name TO LOWER CASE.
                CASE name.
                  WHEN 'master_for'.
                    MOVE value TO t_item-master_for.
                    MOVE value TO v_master_for.
                  WHEN 'werks'.      MOVE value TO t_item-werks.
                  WHEN 'versao'.     MOVE value TO t_item-versao.
                  WHEN 'matkl'.      MOVE value TO t_item-matkl.
                  WHEN 'j_1bindus3'. MOVE value TO t_item-j_1bindus3.
                  WHEN 'j_1bmatuse'. MOVE value TO t_item-j_1bmatuse.
                  WHEN 'j_1bmatorg'. MOVE value TO t_item-j_1bmatorg.
                  WHEN 'j_1bnbmco1'. MOVE value TO t_item-j_1bnbmco1.
                  WHEN 'bsgru'.      MOVE value TO t_item-bsgru.
                  WHEN 'ekgrp'.      MOVE value TO t_item-ekgrp.
                  WHEN 'txz01'.      MOVE value TO t_item-txz01.
                  WHEN 'epstp'.      MOVE value TO t_item-epstp.
                  WHEN 'netpr'.      MOVE value TO t_item-netpr.
                  WHEN 'peinh'.      MOVE value TO t_item-peinh.
                  WHEN 'meins'.      MOVE value TO t_item-meins.
                  WHEN 'plifz'.      MOVE value TO t_item-plifz.
                  WHEN 'mwskz'.      MOVE value TO t_item-mwskz.
                  WHEN 'steuc'.
                    MOVE value TO t_item-steuc.
                    MOVE v_codcat TO t_item-codcat.
                    APPEND t_item.
                ENDCASE.
              ENDIF.
              IF check_item = 'T'.
                TRANSLATE name TO LOWER CASE.
                CASE name.
                  WHEN 'linha'.     MOVE value TO t_itemt-linha.
                  WHEN 'txlng'.     MOVE value TO t_itemt-txlng.
                    MOVE v_master_for TO t_itemt-master_for.
                    MOVE v_codcat     TO t_itemt-codcat.
                    append t_itemt.
                ENDCASE.
              ENDIF.
          ENDCASE.
        advance to next node
          node = iterator->get_next( ).
        ENDWHILE.
      ENDFORM.                    "process_dom
    *&      Form  Busca_XML
          text
    -->  p1        text
    <--  p2        text
      FORM busca_xml .
        DATA: lc_mess(70) TYPE c,lv_tab.
        TYPES: BEGIN OF ty_zvmsgorgtr.
                INCLUDE STRUCTURE zmmt2011.
        TYPES   END OF ty_zvmsgorgtr.
      Creating the main iXML factory
        l_ixml = cl_ixml=>create( ).
      Creating a stream factory
        l_streamfactory = l_ixml->create_stream_factory( ).
        PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
      wrap the table containing the file into a stream
        l_istream = l_streamfactory->create_istream_itable( table =
        l_xml_table size  = l_xml_table_size ).
      Creating a document
        l_document = l_ixml->create_document( ).
      Create a Parser
        l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
                                          istream        = l_istream
                                          document       = l_document ).
      Parse the stream
        IF l_parser->parse( ) NE 0.
          IF l_parser->num_errors( ) NE 0.
            DATA: parseerror TYPE REF TO if_ixml_parse_error,
                  str        TYPE string,
                  i          TYPE i,
                  count      TYPE i,
                  index      TYPE i.
            count = l_parser->num_errors( ).
            WRITE: count, ' parse errors have occured:'.
            index = 0.
            WHILE index < count.
              parseerror = l_parser->get_error( index = index ).
              i = parseerror->get_line( ).
              WRITE: 'line: ', i.
              i = parseerror->get_column( ).
              WRITE: 'column: ', i.
              str = parseerror->get_reason( ).
              WRITE: str.
              index = index + 1.
            ENDWHILE.
          ENDIF.
        ENDIF.
      ENDFORM.                    " Busca_XML
    *&      Form  Carrega_Tabela
          text
    -->  p1        text
    <--  p2        text
      FORM carrega_tabela .
      Process the document
        IF l_parser->is_dom_generating( ) EQ 'X'.
          PERFORM process_dom USING l_document.
        ENDIF.
      ENDFORM.                    " Carrega_Tabela

  • XML file with an attached MIME encoded ZIP file

    Hi all,
    I'm new to SAP WAS and MIME encoding/decoding, and I'm trying to generate an XML file with an attachment which is also MIME encoded.
    1) I have dummy files (1.jpg, 2.jpg) and I'm trying to zip these files into one zip file (files.zip).
    2) I'm trying to MIME encode/decode this zip file.
    3) I'm trying to attach this MIME encoded zip file to existing XML file.
    Which FMs could I use to accomplish this?  Your help is very appreciated.
    Thank you.
    below is a file example that I'm trying to generate.
    MIME-Version: 1.0
    Content-Type: multipart/mixed;
         boundary="--XXXXboundary text"
    Content-Transfer-Encoding: 7bit
    This is a multi-part message in MIME format.
    --XXXXboundary text
    Content-Type: text/xml;
         charset="utf-8"
    Content-Transfer-Encoding: 8bit
    <?xml version="1.0" encoding="utf-8"?>
    <abc/>
    <def/>
    --XXXXboundary text
    Content-Type: application/octet-stream;       name="files.zip"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment
    UEsDBBQAAAAIAI9EejAs5k34H84DAAYgBAAMAAAAMDAyMjQ5MTEucGRmnLsJWBNJ2zb6jmJIIIFE
    BAMIJGEVBSKGRRAhEGQNoGwKYoiAEnYRUFGIkBAQFzYXRNHAAEGQZRy2ATFDUAHfGScSIUwQMMrM
    ECGADptA0n/jzLtc//dd51znVAKdru6uqn7q6fu5764qQz

    Just create an applet (extend JApplet)... add a JTextArea to it....fill the text area with the text from an XML doc.
    To get the text of the XML doc just do something like..
    File xmlFile = new File("<path to xml file>");
    FileInputStream fis = new FileInputStream(xmlFile);
    byte[] bytes = new byte[(int) xmlFile.length()];
    fis.read(bytes);
    fis.close();
    String xmlText = new String(xmlBytes);
    textArea.setText(xmlText);
    ...try something like that (assuming..i understand what it is u want)

  • How to convert xml file to xsl using java

    Hi all,
    I have an XML file with which i need to convert(transform) it to an xsl file using java.
    I am new to converting xml file to xslt.Please send me if u have code .
    Thanks in advance
    regards
    Ram

    You seem to be asking the wrong question. An XSL file can be used to transform an XML file, but transforming an XML into an XSL does not make sense. The API for running XSL transforms on the Java platform is described here:
    http://java.sun.com/javase/6/docs/api/javax/xml/transform/package-summary.html

  • How to convert  XML file to excel file

    To convert XML file to excel file. what are the jar files required. also tutorial to convert XML File to excel file

    Gotta use your own imagination.
    I'd have a root tag <excel-spreadsheet>. Under that I'd have a <worksheet> tag for each worksheet. Under that I'd have a <row> tag for each row. Each <row> tag would have <column> tags, with "name" attribute, and the spreadsheet entry as the value.
    The problem is that you can't really map everything that will go into a spreadsheet into this stream (e.g., graphs, stray cells, etc.) It maps well to tables, but that's it.

  • 1 xml file to multiple xml files with 200 records in each

    Hello Experts,
    I have below scenario.
    Please suggest me which might be the best approch to work on.
    1) XML file to XML file
    I will have 1 pretty huge XML file which i need to break in multiple XML files with 200 records each.
      1) first approch i can have bpm in which i can split the file according to my requirement.
      2) Second approch i can create 2 scenarios in which 1st scenario will pick up XML file and create multiple flat files with File content conversion. Second scenario will pick up all these flat files and create XML files.
    2) XML file to XML file
    Or i can have multiple files with 1 record per file and i need to merge in multiple XML files with 200 records in each.
    So its kind of 1:N or M:N scenarios.
    Please tell me which is might be better performance and design wise.
    Or if you have any idea in any other way i can do this, then please reply as soon as possbile.
    Please tell me if you have OS command for the same or some script to run or anything which i can implement.
    Thanks,
    Hetal

    what is your senario? is it File to File?
    You can use multi mapping concept without BPM. You can handle the 200 records per message logic in the multimapping.
    Regards,
    Praveen Gujjeti.

Maybe you are looking for

  • Problem with Shift to New External Drive for iTunes

    Hi, I hope I can explain this clearly. I currently have all my music files on an external drive however the iTunes Library files, xml, etc are on my laptop. The external drive is running out of space so I simply got another external put the same exac

  • Variable pop-up using Button Group in WAD

    Hi experts, I've created a button group in WAD to execute a 'Copy' function developed in IP. This copy function has the following variables: Order From: Order To: Version From: Version To: This button group was created as it should referencing my cop

  • Why are my bookmarks blocked

    For several days, "my bookmarks" are not being displayed in my Firefox home page. There is a message displayed in a small window indicating possible causes, however: I do not use Norton Firewall or any other Norton product Javascript is enabled I use

  • Distributed Document Capture and UCM commit issue: 302 Moved Temporarily

    I am installing and configuring Oracle Document Capture and Oracle Distributed Document Capture to commit documents to Oracle UCM. I am unable to commit documents to UCM because of the following error: "302 Moved Temporarily". What can be wrong with

  • Wi-fi desabilitado versão 8.1

    Atualizei para a versão 8.1 e o wi-fi aparece desabilitado. O que devo fazer?