Properly formatting output to XML

While the code below would work to format something simple like this:
<USERS>
��<USER>Tim Smith</USER>
��<USER>Jack Dempsey</USER>
��<USER>John Doe</USER>
</USERS>
hd.startDocument();
AttributesImpl atts = new AttributesImpl();
// USERS tag.
hd.startElement("","","USERS",atts);
for (int i=0;i<id.length;i++)
  atts.clear();
  hd.startElement("","","USER",atts);
  hd.characters(desc.toCharArray(),0,desc[i].length());
hd.endElement("","","USER");
hd.endElement("","","USERS");
hd.endDocument();
How does one do more complex nesting of xml elements? Such as if I wanted the output to resemble:
<USERS>
��<USER>Tim Smith</USER>
��<ADDRESS>14 Main St</ADDRESS>
��<CITY>Denver</CITY>
��<STATE>CO</STATE>
</USERS>
Message was edited by:
drakester
Message was edited by:
drakester

I don't quit understand your answer. Serializing objects pertains to formatting output?

Similar Messages

  • Payment Format Program Output in XML

    Hi All,
    I am trying to create a new payment format and should display the output in XML.
    For this I created a PL/SQL procedure , created my tags and displayed the out put in XML format. Using this I created one RTF template and did the data def and data Template.
    I defined the payment format, programs and a document.
    When I run the payment batch using this format , It says no output is generated.
    But the xml output is generated, the template is not shown as attached.
    If I run the concurrent program alone of the payment format I can see the template attched and the output generated in XML.
    BUt when I run the same through a payment batch selecting the document from which the program format is run it does not seem to take the template and hence no output even though there is XML.
    Can someone throw some light.
    Thanks.

    Hi,
    I got it...Now I am able to generated the output in PDF.
    It is a 2 step process, I had to submit XML Report Publisher Program once the format program is run so that it picks the tempalte and generates the output.
    So, Now is there a way to skip this 2 step process ?
    coz finally I have to print the out of the format to a printer.
    Thanks
    Edited by: user576422 on Oct 21, 2008 2:22 PM

  • Report output in XML format

    Is it possible to save (or export) report output in XML format, it is ok with either WebI or DeskI report, here we are concerned about output format not what type of report we can use to produce the output in XML format.
    Thank you,
    Srini

    Hi Srinivas,
    Only options available in WEBI or DESKI is to save documents in Excel or PDF format.
    As a workaround you can use Excel as an intermediate between your WEBI or DESKI document to XML format.
    When you try to save WEBI document in XML Data format you may get following Error because the Excel sheet does not contain any XML format that requires.
    u201CCan Not save XML data because the workbook does not contain any XML mappingsu201D
    Solution:
    1. Excel cannot save all or part of your workbook as XML Data if you have not created one or more mapped ranges.
    2. If you haven't added an XML map to your workbook, or your data is not contained within an XML list, then you can save your workbook in the XML Spreadsheet file format.
    If you have added an XML map to your workbook, follow these steps to map XML elements to your worksheet:
    1. On the Data menu, point to XML, and then click XML Source to open the XML Source task pane.
    2. To map one or more elements to your worksheet, select the elements in the XML Source task pane. To select nonadjacent elements, click one element, and then hold down CTRL and click each element.
    3. Drag the selected elements to the worksheet location where you want them to appear.
    I Hope this helps to find  the path of solution with Ease.
    Thanks...
    Pratik

  • Can anybody tell me the way of getting Smartform output as xml format??

    Dear Experts,
    Can anybody tell me the way of getting Smartform output as xml format??
    Is there exists a standard way of getting it?
    Regards,
    Nikhil Jain

    Hi,
    Use function module FB_DOWNLOAD_FORM .
    Provide your form name as input for i_formname.
    you will get the output in xml format.
    or use utilities--> download option for downloading in xml format.
    For your referrence:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0b6bc290-0201-0010-5b87-a0e7c7eb55d0?quicklink=index&overridelayout=true
    May it helps you.
    Regards.
    DS

  • PO output with XML and PDF format

    Hi All,
    I need PO output with XML and PDF format. when I give print it shld go to vendor with xml and pdf format through mail. please kindly guide me on this .
    Thanks in advance
    JK

    hi,
    try this code to get in pdf form
    REPORT zsuresh_test.
    Variable declarations
    DATA:
    w_form_name TYPE tdsfname VALUE 'ZSURESH_TEST',
    w_fmodule TYPE rs38l_fnam,
    w_cparam TYPE ssfctrlop,
    w_outoptions TYPE ssfcompop,
    W_bin_filesize TYPE i, " Binary File Size
    w_FILE_NAME type string,
    w_File_path type string,
    w_FULL_PATH type string.
    Internal tables declaration
    Internal table to hold the OTF data
    DATA:
    t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    Internal table to hold OTF data recd from the SMARTFORM
    t_otf_from_fm TYPE ssfcrescl,
    Internal table to hold the data from the FM CONVERT_OTF
    T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
    This function module call is used to retrieve the name of the Function
    module generated when the SMARTFORM is activated
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = w_form_name
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    fm_name = w_fmodule
    EXCEPTIONS
    no_form = 1
    no_function_module = 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.
    Calling the SMARTFORM using the function module retrieved above
    GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
    format of the output
    w_cparam-no_dialog = 'X'.
    w_cparam-preview = space. " Suppressing the dialog box
                                                        " for print preview
    w_cparam-getotf = 'X'.
    Printer name to be used is provided in the export parameter
    OUTPUT_OPTIONS
    w_outoptions-tddest = 'LP01'.
    CALL FUNCTION w_fmodule
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = w_cparam
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    output_options = w_outoptions
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    job_output_info = t_otf_from_fm
    JOB_OUTPUT_OPTIONS =
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    t_otf[] = t_otf_from_fm-otfdata[].
    Function Module CONVERT_OTF is used to convert the OTF format to PDF
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    ARCHIVE_INDEX = ' '
    COPYNUMBER = 0
    ASCII_BIDI_VIS2LOG = ' '
    PDF_DELETE_OTFTAB = ' '
    IMPORTING
    BIN_FILESIZE = W_bin_filesize
    BIN_FILE =
    TABLES
    otf = T_OTF
    lines = T_pdf_tab
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    ERR_BAD_OTF = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    To display File SAVE dialog window
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
    EXPORTING
    WINDOW_TITLE =
    DEFAULT_EXTENSION =
    DEFAULT_FILE_NAME =
    FILE_FILTER =
    INITIAL_DIRECTORY =
    WITH_ENCODING =
    PROMPT_ON_OVERWRITE = 'X'
    CHANGING
    filename = w_FILE_NAME
    path = w_FILE_PATH
    fullpath = w_FULL_PATH
    USER_ACTION =
    FILE_ENCODING =
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    NOT_SUPPORTED_BY_GUI = 3
    others = 4
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
    presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_bin_filesize
    filename = w_FULL_PATH
    FILETYPE = 'BIN'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = ' '
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    CONFIRM_OVERWRITE = ' '
    NO_AUTH_CHECK = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    WRITE_BOM = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = T_pdf_tab
    FIELDNAMES =
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    reward points if useful,
    siri

  • How to get XML format output from Hyperion Financial Reporting

    Dears,
    We are using Hyperion Financial Reporting to replace FSG in fusion. I found that Hyperion FR report can be exported to html/excel/pdf format. However, I would like the report to export to xml format.It means I only need the xml data source.
    Anyone who knows how to get the xml format output from Hyperion FR, is there any avaiable API?

    I think if you export the report, you will be able to open the .des file in Notepad/Wordpad and see xml content.

  • How to regenerate output in XML format after having assigned RTF Template

    1. I created a concurrent request to get the output in XML data format
    2. Having created RTF File and assigned Data Definition and Template through XML Administartor Responsibility
    3. Now I want to make changes in Data Definition XML File, However I need to get the output file in XML data format, However Concurrent Request is not allowing me to get the XML output because Template is already assigned for the output and not able to de-assign template file from concurrent request.
    For some reason in XML publisher, the end date for Template is disable, I am not able to update end date for template.
    Is there any way to create an output in XML format through concurrent request after Template File is assigned to create an output? I will appreciate your help.

    This is for people who want to know more in detail. Problem is if you put end date then you have to recreate an entry and then have to go through the same process. However I have found a way to use the same file,
    Get the template_id by running the following query
    select * from xdo_templates_b
    where template_code = 'TEMPLATE_CODE'
    Run the following query to update the end_date to some previous date value
    update xdo_templates_b
    set end_date = to_date('6/9/2011','mm/dd/yyyy')
    where template_id = 162
    After that when you run request through concurrent request, it will not show the default template assigned to concurrent request. Run the request, output will be created in XML format.
    Run the following query to use the template again
    update xdo_templates_b
    set end_date = null
    where template_id = 162
    Edited by: user9941374 on Jun 10, 2011 9:20 AM

  • Download script Output to XML format

    Dear friends,
    I want to download script output to xml format.
    Can you please help me regarding this issue.
    Its very Urgent.....
    Regards,
    Munna.G

    hi krishna,
    In Smartforms
    goto UTILITIES ---> download form.
    Browse the location and save the form.
    The saved form is in xml format.
    If you want to use that form,
    create a new form and go to utilities--> upload
    OR:
    Use function module FB_DOWNLOAD_FORM .
    Provide your form name as input for i_formname.
    you will get the output in xml format
    i think this will help u
    reward if help ful
    regards,
    sindhu.

  • Need help to get output in XML

    Hi all
    I am a PL/SQL programmer and have no idea about XML :-(
    I am using ORACLE 10g and my application generates atleast 100 text files a day for customers. These files are manipulated using Utl_File package and gets data from the DB.These files are tab or comma delimeted. Now company wants to give an option to customers to get the same output in XML format. My understanding is that I need to get information from customers first to make the report template for them and then use some XML parser to get data from DB and give an output using that customer's specific template.
    I wanna know, if there is any whitepaper or manual that can guide me step by step. I just need to make an idea how the things can go togather and the sequence of operation.
    Rashid

    Hi all
    I am a PL/SQL programmer and have no idea about XML :-(
    I am using ORACLE 10g and my application generates atleast 100 text files a day for customers. These files are manipulated using Utl_File package and gets data from the DB.These files are tab or comma delimeted. Now company wants to give an option to customers to get the same output in XML format. My understanding is that I need to get information from customers first to make the report template for them and then use some XML parser to get data from DB and give an output using that customer's specific template.
    I wanna know, if there is any whitepaper or manual that can guide me step by step. I just need to make an idea how the things can go togather and the sequence of operation.
    Rashid

  • Oracle Matrix Report output to XML Publisher

    We have an Oracle matrix report (rdf) registered in our applications and we are trying to format the report output using XML publisher.
    I have taken XML output of the report by changing the Report output to XML in concurrent program definition. Using this XML output we have started designing the RTF template using Template Builder for Word 5.6.2.
    I am not able to get the MAtrix output in XML publisher. I am not sure how to design a Matrix Report using Template builder for word. I am not sure whether the XML output of Original Report has Tags mentioning Matrix report attributes or Not.
    Can anyone help me by explaining how to design a Matrix Report template using XML report output. Appreicate your help.

    I have posted a Blog on our blog site about how to create a matrix report in XML-Publisher
    http://technology.amis.nl/blog/?p=1558
    Perhaps this helps.
    Marcos

  • Report VS Excel output using XML Publisher tool (DBMS_XMLGEN)

    Hi All,
    Currently I am working on report generation in MRP module with Excel output using XML Publisher tool.
    XML tool works based on query.
    I have developed PLSQL block by using DBMS_XMLGEN – database package, to generate XML output of query.
    My question is how we can put generated xml on above PLSQL block into OUT file (APPS).
    Because DBMS_OUTPUT.PUT_LINE( ) has limitation, it allow 255 character string only.
    But I do not know, Is FND_FILE.PUT_LINE (FND_FILE.OUTPUT,’’) allow for large data?
    If it does not allow what will be the other solution in oracle application to resolve above problem.
    Let me know any queries regarding to this problem.
    Thanks and Regards,
    Sai Krishna @cavaya.com

    Hi Prakash,
    Thanks for the reply. We did apply the one-off patch and got rid of the problem of not viewing 'Excel' output using XMLP.
    Now we are looking at a different perspective:
    Basically our client is looking for the following:
    1. Mathematical functions in the resulting XLS (like SUM, AVG etc..) ouput
    2. Use of macros if possible.
    And to do this i am looking out for a sample template that gives me output in excel format I have a TAR with Oracle for this purpose, but the TAR has so far been unsuccessful in providing us with any material in the direction.
    Our client remembers seeing this as a demo at the Oracle Conference this yr at San Fransisco, but does not have a sample to provide us. We are looking for such a sample.
    Thx,
    Nitin

  • How to generate PDF from XML output without XML publisher

    Hi,
    I am facing a problem while splitting the rdf generated XML output.
    Problem Description:
    I have a oracle invoice report which runs once every day (scheduled program). This report fetches me the invoices generated on that day and needs to be Mailed / Faxed to the customers.
    So i developed the report in such a way that it generates the output order by customers...since the output generated will be as one .out file in APPLCSF/out directory...the .out file needs to be splitted by customers, for which i have written a cursor which takes the data of the main query and submits that many requests as many as customers are there.....There is a possibility of having 1000 customers per day also. If that is the case then my main program will fire that many requests.
    Is there a different approach......any inputs are highly appreciated.
    Also, i am generating the output in XML format. Is there a way from which i can directly generate a PDF from that XML output rather using any other tool.
    Thanks & Regards,
    Lakshmi Kalyan Vara Prasad.

    Hi,
    with Reports Bursting and the defined "distributions" it's possible to have one report splittet to several parts with different receipients. Have a look at http://download-uk.oracle.com/docs/cd/B14504_01/dl/bi/B13673_01/pbr_dist.htm.
    With xsl-fo it's possible to create pdf out of xml ... that's what xml publisher is doing.
    Regards
    Rainer

  • How to write oracle output in XML

    can any one please let me know how to write or covert procedure or function output in XML?

    845470 wrote:
    can any one please let me know how to write or covert procedure or function output in XML?What is that asking?
    Are you wanting to take output from a procedure/function that is in XML format and then convert it to something else?
    Are you wanting to get the procedure/function to produce output in XML format?
    Are you wanting to take an existing procedure/function and convert it so the code is stored in some XML structure for some purpose?
    How is anybody supposed to know what you're talking about if you don't explain it?
    {message:id=9360002}

  • Product-sku-output-config.xml - Is there a schema definition (XSD or DTD)?

    For the product-sku-output-config.xml file (used to define the set of product and sku attributes that are sent to Endeca from ATG as part of the Baseline Index process, as defined in chapter 4 of the ATGEndecaIntegrationGuide.pdf, 10.1.2 version), is there a schema definition (XSD or DTD) available?
    The format used by product-sku-output-config.xml seems similar to, but not the same as, the format described by http://www.atg.com/dtds/search/indexing-dependency-schema.dtd. For example, p35 of the ATGEndecaIntegrationGuide.pdf gives an example of a product-sku-output-config.xml with a "properties" child element of the top-level "item" element; per that indexing-dependency-schema.dtd, that isn't allowed. (Per that DTD, it should be either "meta-properties" or "text-properties", not "properties".)
    More generally, I'm wondering if there's place that fully defines what can go into the product-sku-output-config.xml file.
    I'm also interested this same question for the category-dim-output-config.xml file.
    Thanks,
    -Jon

    For the product-sku-output-config.xml file (used to define the set of product and sku attributes that are sent to Endeca from ATG as part of the Baseline Index process, as defined in chapter 4 of the ATGEndecaIntegrationGuide.pdf, 10.1.2 version), is there a schema definition (XSD or DTD) available?
    The format used by product-sku-output-config.xml seems similar to, but not the same as, the format described by http://www.atg.com/dtds/search/indexing-dependency-schema.dtd. For example, p35 of the ATGEndecaIntegrationGuide.pdf gives an example of a product-sku-output-config.xml with a "properties" child element of the top-level "item" element; per that indexing-dependency-schema.dtd, that isn't allowed. (Per that DTD, it should be either "meta-properties" or "text-properties", not "properties".)
    More generally, I'm wondering if there's place that fully defines what can go into the product-sku-output-config.xml file.
    I'm also interested this same question for the category-dim-output-config.xml file.
    Thanks,
    -Jon

  • Getting report output in XML

    hi guys,
    can anyone help me in getting a report output in XML format as we havnt got that output format.
    Thanks
    Veer

    When you send concurrent at the form submit request press button Options and look, Is there your template? And look it format.

Maybe you are looking for

  • Web service proxy receiving single element in array

    I've generated a web service proxy over a web service and expect to get multiple elements returned from the web service. However when I excute the proxy I receive only the first element. Testing the web service with the same parameters on the applica

  • Saels Quotation,Contract, Order, Return, Debit/Credit Memo Request

    Hi,   I have Saels Quotation,Contract, Order, Return, Debit/Credit Memo Request. Now I want to change the Sales office, Sales Group and sales District in the existing Quotation,Contract, Order, Return, Debit/Credit. But in all the these requests thes

  • FRM-92100 Jacob / Quit Word.

    When using jacob to quit a Word document I'm getting an error as follows: The error message is as follows: FRM-92100: Your connection to the Server was interrupted. Details: Java Exception: com.jacob.com.ComFailException: A COM exception has been enc

  • Time Machine crashing

    Hi, This seems to be a common problem, however maybe someone has an answer! I have just moved to a Time Capsule for back ups. As in many previous posts my iMac 'freezes' at random points during the back up and has to be re-booted. I have tried using

  • Paired ipad and imac..now what?

    I was pairing my wireless keyboard with my iPad and saw iMac on the list calling out to me.  So I paired them.   I have looked for uses and advantages for this but have yet to find anything. Suggestions and tips are welcomed. JiPi