Characterset definition in XML output

Hello,
my issue is the following.
I have R12 instance with UTF8 database.
I have defined a data template which looks something like this:
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <dataTemplate name="BEGIN" description="Purchase_Orders_Printouts" version="1.0">
- <parameters>
<parameter name="PONumber" dataType="character" />
</parameters>
- <dataQuery>
<sqlStatement name="Q1">SELECT poh.creation_date AS po_ord_date, poh.segment1 AS po_nbr, poh.created_by, ppf.full_name AS created_by, povc.first_name || ' ' || povc.last_name AS po_contact, 'VMI-tilaus' AS po_rmks, vnd.segment1 AS po_vend, vnd.vendor_name AS v_ad_name, vnds.address_line1 AS v_ad_line1, vnds.address_line2 AS v_ad_line2, vnds.address_line3 AS v_ad_line3, vnds.state || '-' || vnds.zip || ' ' || vnds.city AS v_ad_line4, fndt1.territory_short_name AS v_ad_country, vnd.segment1 AS po_bill, vnd.vendor_name AS i_ad_name, loc.address_line_1 AS i_ad_line1, loc.address_line_2 AS i_ad_line2, loc.address_line_3 AS i_ad_line3, loc.postal_code || ' ' || loc.town_or_city AS i_ad_line4, fndt.territory_short_name AS i_ad_country, vnd.segment1 AS po_ship, vnd.vendor_name AS d_ad_name, loc.address_line_1 AS D_ad_line1, loc.address_line_2 AS D_ad_line2, loc.address_line_3 AS D_ad_line3, loc.postal_code || ' ' || loc.town_or_city AS D_ad_line4, fndt.territory_short_name AS D_ad_country, FNDT.territory_short_name AS orig_country, --FNDT.territory_short_name AS d_ad_country, POH.ship_via_lookup_code AS po_shipvia, FNDL.meaning AS po_fob, TRMS.name AS ct_desc FROM po_headers_all poh, per_all_people_f ppf, fnd_user fnd, po_vendor_contacts povc, po_vendors vnd, po_vendor_sites_all vnds, hr_locations_all loc, fnd_territories_tl fndt, fnd_territories_tl fndt1, FND_LOOKUPS FNDL, AP_TERMS TRMS WHERE ppf.person_id = fnd.employee_id AND fnd.user_id = poh.created_by AND poh.vendor_site_id = povc.vendor_site_id AND poh.vendor_id = vnd.vendor_id AND poh.vendor_site_id = vnds.vendor_site_id AND loc.location_id = poh.bill_to_location_id AND fndt.territory_code = loc.country AND fndt1.territory_code = vnds.country AND FNDL.lookup_code(+) = POH.fob_lookup_code AND TRMS.term_id = POH.terms_id AND poh.segment1 = :PONumber</sqlStatement>
</dataQuery>
- <dataStructure>
- <group name="PURCHASE_HEADER" source="Q1">
<element name="sls_language" value="sls_language" />
<element name="paper_size" value="paper_size" />
<element name="australian" value="australian" />
<element name="tcp_ip" value="tcp_ip" />
<element name="fax_nbr" value="fax_nbr" />
<element name="fax_dir" value="fax_dir" />
<element name="email_from" value="email_from" />
<element name="email" value="email" />
<element name="arc_dir" value="arc_dir" />
<element name="arc_file" value="arc_file" />
<element name="arc_file_type" value="arc_file_type" />
<element name="data_output" value="data_output" />
<element name="deljit" value="deljit" />
<element name="entity" value="entity" />
<element name="po_buyer" value="po_buyer" />
<element name="forwarding_agent" value="forwarding_agent" />
<element name="po_vend" value="po_vend" />
<element name="v_ad_name" value="v_ad_name" />
<element name="v_ad_line1" value="v_ad_line1" />
<element name="v_ad_line2" value="v_ad_line2" />
<element name="v_ad_line3" value="v_ad_line3" />
<element name="v_ad_line4" value="v_ad_line4" />
<element name="v_ad_country" value="v_ad_country" />
<element name="po_ship" value="po_ship" />
<element name="d_ad_name" value="d_ad_name" />
<element name="d_ad_line1" value="d_ad_line1" />
<element name="d_ad_line2" value="d_ad_line2" />
<element name="d_ad_line3" value="d_ad_line3" />
<element name="d_ad_line4" value="d_ad_line4" />
<element name="d_ad_country" value="d_ad_country" />
<element name="po_ord_date" value="po_ord_date" />
<element name="po_nbr" value="po_nbr" />
<element name="po_contact" value="po_contact" />
<element name="po_rmks" value="po_rmks" />
<element name="po_bill" value="po_bill" />
<element name="i_ad_name" value="i_ad_name" />
<element name="i_ad_line1" value="i_ad_line1" />
<element name="i_ad_line2" value="i_ad_line2" />
<element name="i_ad_line3" value="i_ad_line3" />
<element name="i_ad_line4" value="i_ad_line3" />
<element name="i_ad_country" value="i_ad_country" />
<element name="orig_country" value="orig_country" />
<element name="d_ad_country" value="d_ad_country" />
<element name="po_shipvia" value="po_shipvia" />
<element name="po_fob" value="po_fob" />
<element name="ct_desc" value="ct_desc" />
<element name="po_curr" value="po_curr" />
</group>
</dataStructure>
</dataTemplate>
Now the problem is, that the concurrent request generates XML with UTF-8 specified. And as soon as there are language specific characters the XML fails to parse.
Is there any way how to force XML publisher to put ISO-8859-1 in the xml specification?
Thanks,
Martins

Hi,
My Source BLS output is an XML file. In the ValueMap.vmap (in the Meta-Inf when defining the rule) when I click on "Browse Document" it doesn't give me the option to select the source bls's xml output. Please see the sceenshot below. Is there way to sepecify the BLS XMl output here?
Thanks,
Latha.

Similar Messages

  • R12 Check Printing Need XML output for seeded data definition--urgent

    Hi--
    I really need to get ahold of the XML output from the checks running off the data definition called "Oracle Payments Funds Disbursement Payment Instruction Extract 1.0" in Oracle R12 quickly--particulary the XML tag that holds the MICR string (should be the concatenation of Check Number, Routing and Acct number).
    I found an entry here in the forums about running a query of:
    SELECT XMLType.getClobVal(instruction)
    FROM IBY_XML_FD_INS_1_0_V
    WHERE rownum =1 ;
    to get the entire XML output. I have an open SR but haven't really gotten anywhere with it yet.
    However, all we get back is an error about datatype. Could someone please help out with this--it is quite urgent as I need to finish this last piece of the checks and work with the bank on formatting this week.
    Thanks--I'd really appreciate any assistance!
    Kate

    SELECT XMLType.getClobVal(instruction)
    INTO x_extract_doc
    FROM iby_xml_fd_ins_1_0_v
    WHERE payment_instruction_id = p_payment_instruction_id;
    or you can use
    SELECT document FROM iby_trxn_documents order by creation_date desc;
    provided that the last run was urs.

  • XML Elements Ordering in Generated XML Output

    I have a requirement where I need the xml element tags to appear in the generated xml output in the same order as in data template definition but in my case this is not happening. I have one master group - Customer and two subgroups - BillingAddress and ShipToAddress. The subgroups appear below some master elements eg. Contact but above other master elements eg. Telephone . However when the xml output is finally generated all the Master Elements appear first followed by the subgroup elements. Does anyone know how I can rectify this?
    See below:
    my data template structure is as follows:
    - <group name="Customer" dataType="varchar2" source="Q_MASTER_FILE_CUST">
    <element name="CustomerID" datatype="varchar2" value="CUSTOMER_NUM" />
    <element name="CustomerTaxID" datatype="varchar2" value="TAXPAYER_ID" />
    <element name="CompanyName" datatype="varchar2" value="COMPANY_NAME1" />
    <element name="Contact" datatype="varchar2" value="CONTACT_NAME" />
    - <group name="BillingAddress" dataType="varchar2" source="Q_MF_CUST_BILLTO">
    <element name="BuildingNumber" datatype="varchar2" value="BUILD_NUM1" />
    <element name="StreetName" datatype="varchar2" value="STREET_NAME1" />
    <element name="AddressDetail" datatype="varchar2" value="ADDRESS_STYLE1" />
    <element name="City" datatype="varchar2" value="CITY1" />
    <element name="PostalCode" datatype="varchar2" value="POSTAL_CODE1" />
    <element name="Region" datatype="varchar2" value="COUNTY1" />
    <element name="Country" datatype="varchar2" value="COUNTRY1" />
    </group>
    - <group name="ShipToAddress" dataType="varchar2" source="Q_MF_CUST_SHIPTO">
    <element name="BuildingNumber" datatype="varchar2" value="BUILD_NUM2" />
    <element name="StreetName" datatype="varchar2" value="STREET_NAME2" />
    <element name="AddressDetail" datatype="varchar2" value="ADDRESS_STYLE2" />
    <element name="City" datatype="varchar2" value="CITY2" />
    <element name="PostalCode" datatype="varchar2" value="POSTAL_CODE2" />
    <element name="Region" datatype="varchar2" value="COUNTY2" />
    <element name="Country" datatype="varchar2" value="COUNTRY2" />
    </group>
    <element name="Telephone" datatype="varchar2" value="PHONE_NUMBER" />
    <element name="Fax" datatype="varchar2" value="FAX1" />
    <element name="Email" datatype="varchar2" value="EMAIL_ADDRESS" />
    <element name="WebSite" datatype="varchar2" value="URL" />
    </group>
    </group>
    My XML Output is as follows:
    <Customer>
    <CustomerID>1000</CustomerID>
    <CustomerTaxID>65-94238654</CustomerTaxID>
    <CompanyName>World of Business</CompanyName>
    <Contact>MS. Jolene Smith-Kelly</Contact>
    <Telephone>8441212</Telephone>
    <Fax />
    <Email />
    <WebSite />
    - <BillingAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </BillingAddress>
    - <ShipToAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </ShipToAddress>
    </Customer>
    It should be as follows:
    <Customer>
    <CustomerID>1000</CustomerID>
    <CustomerTaxID>65-94238654</CustomerTaxID>
    <CompanyName>World of Business</CompanyName>
    <Contact>MS. Jolene Smith-Kelly</Contact>
    - <BillingAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </BillingAddress>
    - <ShipToAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </ShipToAddress>
    <Telephone>8441212</Telephone>
    <Fax />
    <Email />
    <WebSite />
    </Customer>
    is anyone able to advise?
    Rani

    If you know the changes necessary then you could write an XSL transformation to do them. But a generalized piece of code that examined an XML document and a schema, then produced a corrected document, would be quite difficult to write.

  • XML output in Apps instead of PDF

    Hi All,
    I have converted several Oracle reports to XML Publisher and working fine in EBS. The problem I have is that I am getting the XML instead of a PDF output when running a report under Release Sales Orders form(Pick Slip). I am able to preview the PDF output in the XML Admin page using similar XML file.
    I have the concurrent program definition changed to XML from text and XMLP template/data definition configured. Any idea on the issue?
    Best regards,
    MM

    Hi MM,
    Are you still in 11i? Check if the report(Pick Slip) is being submitted thru document set (OM(R)> Setup> Shipping> Documents> Document Sets)… if yes, then you probably need to apply a patch... or have you tried Gareth's solution explicitly calling from report AfterReport trigger?
    Metalink note:
    NEW FUNCTIONALITY: Ability to Execute Document Sets in XML Output Format - Patch 5688014
    Doc ID: 413108.1
    regards,...

  • Need to reference file name within the XML Output

    Not sure if this is possible, as I'm new to the livecycle/XML world. But I need to be able to reference a file within the XML output from the PDF.
    The Scenario is that a pdf form of a business card will be issued to 50 franchisees for them to type in their names and mobiles, click submit and the XML file to be sent to myself, and be imported in to InDesign populating their data ready for printing. Up to here I have it working perfectly.
    However as each franchisee have a combination of up to 5 logos to place in the bottom corner to save having to have various templates with different combinations of logos and having to ensure the correct templates are used. I intend to reference each companies combination as an EPS and make the reference within the xml out and have it import directly in with the other data. I can type the code directly within the xml but I would like to have the form reference it directly in the xml output. Is this possible or am expecting to much of livecycle? Any help/advice greatly appreciated.
    David

    Hi MadhavaGanji,
    I have post how to validate the file name, header row against definition table which stored the file name and column definition. 
    Take a look and see if this is helpful.
    http://sqlage.blogspot.com/2013/11/ssis-validate-file-header-against.html
    http://sqlage.blogspot.com/

  • XML output from Repostiory Reports

    Hi,
    Any ideas why the table definition report (cktci.rdf) data from the Repository Reports cannot be generated to XML?
    I'm running Designer ver. 9.0.2.91.9, Reports ver. 9.0.2.0.3 . XML is not on the destination format list in Repository Reports, but if you type in xml, the DESFORMAT parameter is correctly set to it. However, only part of the data model is output to the xml file:
    &lt;?xml version="1.0"?&gt;
    &lt;!-- Generated by Oracle Reports version 9.0.2.0.3 --&gt;
    &lt;CKTCI&gt;
    &lt;LIST_G_IRID&gt;
    &lt;G_IRID&gt;
    &lt;IRID&gt;*****&lt;/IRID&gt;
    &lt;NAME&gt;SODO&lt;/NAME&gt;
    &lt;LIST_G_LEV&gt;
    &lt;G_LEV&gt;
    &lt;VERSION&gt;1.8&lt;/VERSION&gt;
    &lt;LEV&gt;0&lt;/LEV&gt;
    &lt;/G_LEV&gt;
    &lt;/LIST_G_LEV&gt;
    &lt;CS_TABS&gt;1&lt;/CS_TABS&gt;
    &lt;/G_IRID&gt;
    &lt;/LIST_G_IRID&gt;
    &lt;D_USERNAME&gt;REP_OWNER&lt;/D_USERNAME&gt;
    &lt;D_USERNAME1&gt;&lt;/D_USERNAME1&gt;
    &lt;F_COL_DET&gt;N&lt;/F_COL_DET&gt;
    &lt;F_VW&gt;&lt;/F_VW&gt;
    &lt;F_SNP&gt;&lt;/F_SNP&gt;
    &lt;TABLES_YN&gt;Yes&lt;/TABLES_YN&gt;
    &lt;VW_TYPE&gt;No&lt;/VW_TYPE&gt;
    &lt;SNP_TYPE&gt;No&lt;/SNP_TYPE&gt;
    &lt;COL_DET&gt;Yes&lt;/COL_DET&gt;
    &lt;D_TABTY1&gt;&lt;/D_TABTY1&gt;
    &lt;CF_PROP_NAME&gt;&lt;/CF_PROP_NAME&gt;
    &lt;P_NULL_IND&gt;Optional ? : &lt;/P_NULL_IND&gt;
    &lt;P_DOMAIN_NAME&gt;Domain : &lt;/P_DOMAIN_NAME&gt;
    &lt;P_UPPERCASE&gt;Uppercase ? : &lt;/P_UPPERCASE&gt;
    &lt;P_ORAC_SEQ&gt;Sequence : &lt;/P_ORAC_SEQ&gt;
    &lt;P_DEF_VAL&gt;Default Value : &lt;/P_DEF_VAL&gt;
    &lt;P_ORD_SEQ&gt;Order By Sequence : &lt;/P_ORD_SEQ&gt;
    &lt;P_SORT_ORD&gt;Sort Order : &lt;/P_SORT_ORD&gt;
    &lt;D_YN&gt;&lt;/D_YN&gt;
    &lt;D_YES&gt;Yes&lt;/D_YES&gt;
    &lt;D_NO&gt;No&lt;/D_NO&gt;
    &lt;D_NULL&gt;Yes&lt;/D_NULL&gt;
    &lt;D_NOT_NULL&gt;No&lt;/D_NOT_NULL&gt;
    &lt;D_NULL_IND&gt;&lt;/D_NULL_IND&gt;
    &lt;D_VERSION&gt;1.8&lt;/D_VERSION&gt;
    &lt;D_CONTAINER&gt;ZSI-WARTA/SODO&lt;/D_CONTAINER&gt;
    &lt;D_VERSION1&gt;&nbsp&lt;/D_VERSION1&gt;
    &lt;D_CONTAINER1&gt;&nbsp&lt;/D_CONTAINER1&gt;
    &lt;COUNTER&gt;*****&lt;/COUNTER&gt;
    &lt;/CKTCI&gt;
    The biggest problem is that the main group G_APP from the report definition is not generated to XML, in spite of its parameter "Exclude from XML Output" being set to No. Any ideas why this happens?
    Regards,
    Tomasz

    hello,
    you can specify the look of the XML tags in the "XML Settings" property of the respective field. so let's say your datamodel has the colun called NAME then by default the xml tag would look soemthing like this
    <NAME>this is the value </NAME>
    now if you set the value for the
    "XML Tag" property and the "XML Tag Attributes" property to e.g. facet and name="his-name"> (the * is just to terminate the the values in this text) the generated XML tag would look something like
    <facet name="his-name">name="his-name"></facet>
    columns that are not in the datamodel (like i asume you mean by <stuff> and <futurestuff> you can create by adding formula columns into your datamodel. formula columns have the same "XML settings" section in their property sheet and can be modified accordingly.
    hope this is what you are looking for.
    thanks,
    ph.

  • XML output doesn't have some psecial characters

    Hi All ,
    I am using RDF as my data definition from which i generate some special characters.
    When this RDF is deployed in APPS it doen't generate any character:
    Folowing is a part of xml being generated.
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Generated by Oracle Reports version 6.0.8.27.0 -->
    Following a part of XML output i am getting.
    1> FROM Report Builder
    Open RDF -> Generate to File -> XML
    OUTPUT:
    <CF_FIRST_COL>Í,BXLÎ</CF_FIRST_COL>
    2> Running a concurrent program in 11.5.9 having output type XML
    <CF_FIRST_COL>,BX</CF_FIRST_COL>
    The data Í,BXLÎ got converted to ,BX , which is incorrect.
    Kindly someone help. We are using XMLP 5.6.3 versin.
    Thanks & Regards,
    Swapnesh Parmar

    I still doubt it..
    What ever character you have it in database, is going to be fetched in xml..
    be in Report builder, or sql, pl/sql.
    the way the data is being converted is the first we need to see.. if the character is getting messed here..
    once you got it as xml, and open xml in browser, then the parser finds the encoding in the top of xml, and renders the character . if it cannot understand the encoding character, then it will skip or do some abnormal things..
    oracle apps , is generating xml ?? what is that means ??
    data-template ? pl/sql or sql ??

  • Created Excel Template XSL, but XML output always open IE (not Excel)

    Hello,
    We are using :
    -     XML Publisher : 10.1.3.4.1
    -     Oracle Appli : 11.5.10.2 ( DB : 10.2.0.4.0)
    - Oracle Reports Builder : 10.1.2.0.2
    We use Reports for building the query that is used with XML Publisher.
    We would like to use XML Publisher with an output Excel.
    After noticing a problem with display of numeric cells when using a RTF template ( decimal places, there's a lot of threads on this), we decided to follow an advice on xlspe.com, and we created a Excel template, that we saved as a XML Spreadsheet, and using the xlspe tools, we generated the XSL file.
    Then we defined everything in Oracle Applications EBS:
    - data definition
    - template ( XSL-XML as input, and XML as output. Note that XML is the only option)
    - executable ( execution method "Oracle Reports" )
    - program request : ( output format XML )
    This works fine when the use a RTF template with an output Excel. (except the issue on the decimal places). in the concurrrent requests form, the output button opens Excel correctly.
    When we go with a XSL template, with an output XML, the output generation works fine, but, in the concurrent requests form, the output button opens internet explorer IE instead of Excel (probably because it's a XML output file)
    I hope my explanation is clear.
    Did I make a mistake in the definition ?
    Is there anyone who has experienced and solved this issue ?
    Thanks a lot in advance,
    Olivier

    Hello,
    After many talks, I found out how to fix this issue.
    Basically, the issue is in Oracle Application where the MIME type is not defined for XML Excel type files.
    By default, XML is open with the browser.
    For solving the opening of XML Excel files with Excel (and not Internet Explorer IE), we had to add under the "System Admin > install > Viewer Options " a new entry for " XML - application/xnd.ms-excel - Microsoft Excel "
    And also, under the System profiles, for option "Viewer: Application for XML", set the value to Microsoft Excel, and, as well, for option "Viewer: Application : Text", set the value to Browser.
    This resolves the issue, and a XML Excel file generated by XML Publisher (from a XSL-XML template), is opened directly with Excel.
    Thanks for your contributrion,
    Olivier

  • Build Reports from XML output from Reports

    Hi,
    I was just wondering if it is possible to build reports from output in XML format, originally generated by Oracle Reports.
    The XML output produced by Reports is stored in a database for further processing.
    TIA
    Hien

    Hi Hien
    If I have understood this right, you need to create report in XML format from an XML Report Definition File. From the Builder, Generate to File from the File menu and choose XML format for the output.
    Remember that XML output from Reports is Data driven and faithfully reproduces the Data Model. It is NOT layout driven.
    Regards
    Sripathy

  • Adding Comment for XML output

    How to add comment in xml output.
    I have to replace the default comment in the xml output.
    If i use SRW.ADD_DEFINITION, Its not working.
    Can any on guide me through this to achieve it.

    i have written the following code in after parameter form. In the data model i am selecting empno and empname. Now i have to generate an xml which has the comment "Internal purpose only". I have to dynamically change the tag names also. But this code throws an error
    REP-0069:Internal error
    REP-57054: In-Process job terminated:Terminated with error
    REP-866648059:Error in the xml report definition at line 3 in
    Invalid element 'source' in content of 'section',expected elements '[tabular,groupAbove,groupLeftinsideAbove....]
    -------------------------------------------------------code----------------------------
    SRW.ADD_DEFINITION('<report name="Employee"
    author="Generated" DTDVersion="9.0.2.0.0"> <!-- Internal purpose only-->');
    SRW.ADD_DEFINITION('<layout>');
    SRW.ADD_DEFINITION('<section name="main">');
    SRW.ADD_DEFINITION('<source="empno">');
    SRW.ADD_DEFINITION('<source="empname" >');
    SRW.ADD_DEFINITION('</section>');
    SRW.ADD_DEFINITION('</layout>');
    SRW.ADD_DEFINITION('</report>');
    SRW.APPLY_DEFINITION;

  • Automatic XML output generation

    i am trying to generate automatic xml output for a report. report dsnt take any parameters. i have written a xml definition
    <report name="XML Report date spec GRFS03" DTDVersion="1.0">
    <layout>
    <section name="main">
    <groupLeft name="G_LOC_CODE" >
    <group>
    <field name="LOC_CODE" source="loc_code"/>
    <field name="QTTY" source="qty"/>
    <field name="STK_NO" source="stk_no"/>
    <field name="UNIT_COST" source="unit_cost"/>
    <field name="USER_CODE" source="user_code"/>
    </group>
    </groupLeft>
    </section>
    </layout>
    <customize>
    <object name=”Gary D” type=”Report”>
    //<properties>
    //<property name=”beforeReportType”>File</property>
    //<property name=”beforeReportValue”>C:\xmlreport.html
    //</property>
    </object>
    </customize>
    </report>
    i have used SRW.APPLY_DEFINITION(xml_report.xml) for runtime customization but when i run report i get error : REP-6106: error in XML report definition at line 3 in 'xml_report.xml'
    Root element name must match the DOCTYPE name.
    can anyone suggest a solution to this?

    JDOM has an XMLOutputter.
    DOM Level 3 allegedly supports outputting from the DOM itself.
    However if you don't want to use JDOM, and you don't have access to DOM Level 3, there is a way to do it using transformers. I'm not sure if this is a trick or whether it's considered the standard way to do it.
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    Document dom; // this is what you want outputted
    OutputStream stream; // this is where you want it outputted
    Transformer identity = TransformerFactory.newInstance().newTransformer();
    identity.transform(new DOMSource(dom), new StreamResult(stream));Note that it's not actually much code if you keep the identity transform around for reuse. JDOM's approach is a lot simpler though. :-)

  • Help require to get the XML output to design template- JDE

    Hi Friends,
    I am asking this question from JDE perspective.I want to design XMLP Template for R40572 Check Printing.
    When I upload an blank template and after attaching RD, When ever I initiate a check from P04572 Application.RThe Write Row exit will lead to check printing which in turn will call a batch R04571 and this batch will call R04572(Which I require the XML output) since it is the second report and we cant direct it to local server I am not able to get the XML output..
    Another think is since its running in server i think its not taking the RD modification we done in loacl because it always fires PDF .

    Hi,
    I assume you're Using XMPOSA for generating the files locally. What I suggest is, you set the application to run with the report definition by default. That way, even when it is called, it will be called along with the report definition. You can take the resultant XML file from P95630
    hope this helps,
    -Domnic

  • XML output changed after tools release

    Enterprise One 812. XML output to print invoices is now missing two fields. Layout of xml is now different in DV/PY compared to PD.
    * E1 Tools Release 8.98.32 installed in DV/PY - problem started after this.
    * The problem does not exist in PD but it does exist in DV and PY.
    * The source for the xml template and report definition is a custom UBE for invoice printing and has not been changed in any environment.
    * The xml template and report definitions have not been changed.
    * No processing options have changed.
    * Downloaded the PD RTF and ran it locally against xml data from PD and PY. The PD xml displays the fields and DV/PY do not. This proves the RTF is not different between environments.
    To try and solve, ran ER compare of custom base object between PD and DV/PY and found no diffs. Also tried a new RTF template and report definition, still doesn't work. Ran a package build to push the PD custom base object into DV/PY, still didn't solve.
    Is it possible the Tools Release in DV/PY caused this XML problem? Any help is greatly appreciated, running out of ideas.
    Thanks in advance...

    Hi
    Sorry, I dont know enough about the JDE patching and environment. If you suspect a regression issue, I would log a service request with JDE support and get them to ping development for some help on confirming the issue
    Regards
    Tim

  • Upload XML output into DMS

    Hello all,
                 I have generated an XML output through Smartforms. Now I need to load this file into DMS . Please let me know how I can achieve this.
    Thanks,
    Kalyan

    check this code and use it...
    REPORT  Z_RMTIWARI_XML_TO_ABAP_46C              .
    Load iXML Lib.
    type-pools: ixml.
    class cl_ixml definition load.
    data: G_IXML type ref to if_ixml.
    data: STREAMFACTORY type ref to if_ixml_stream_factory.
    data: ISTREAM type ref to if_ixml_istream.
    data: DOCUMENT type ref to if_ixml_document.
    data: PARSER type ref to if_ixml_parser.
    data: LV_FILE_URL type rlgrap-filename.
    You should provide the parameter for file name
    LV_FILE_URL = 'C:input_xml.xml'.
    types: begin of XML_LINE,
            DATA(256) type x,
          end of XML_LINE.
    types: begin of TY_HEADER,
             CUST_NAME(20)     type c,
             CARD_NO(20)       type c,
             TAX_AMOUNT(10)    type c,
             TOTAL_AMOUNT(10)  type c,
           end of TY_HEADER.
    types: begin of TY_ITEM,
             ITEM_NO(4)      type n,
             ITEM_ID(20)     type c,
             ITEM_TITLE(50)  type c,
             ITEM_QTY(10)    type c,
             ITEM_UPRICE(10) type c,
           end of TY_ITEM.
    data: GV_HEADER type TY_HEADER.
    data: GT_ITEM   type standard table of TY_ITEM   with header line.
    data: XML_TABLE      type table of XML_LINE,
          XML_TABLE_SIZE type i.
    The next step is creating the main factory for the iXML library:
    G_IXML = cl_ixml=>create( ).
    Now Create Stream Factory
    STREAMFACTORY = G_IXML->create_stream_factory( ).
    upload a file from the client's workstation
    call function 'WS_UPLOAD'
         exporting
              filename   = LV_FILE_URL
              filetype   = 'BIN'
         importing
              filelength = XML_TABLE_SIZE
         tables
              data_tab   = XML_TABLE
         exceptions
              others     = 11.
    wrap the table containing the file into a stream
    ISTREAM = STREAMFACTORY->create_istream_itable( table = XML_TABLE
                                                    size  = XML_TABLE_SIZE )
    Get the file data as Stream
    *istream = streamfactory->create_istream_uri( public_id = lv_file_url
                                                system_id = lv_file_url ).
    Create XML Document instance
    DOCUMENT = G_IXML->create_document( ).
    Create parser Object
    PARSER = G_IXML->create_parser( stream_factory = STREAMFACTORY
                                    ISTREAM = istream
                                    DOCUMENT = document ).
    Parse an XML document into a DOM tree
    *parser->parse( ).
    Parsing Error Processing
    if PARSER->parse( ) ne 0.
      if 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 = PARSER->num_errors( ).
        write: COUNT, ' parse errors have occured:'.
        INDEX = 0.
        while INDEX < COUNT.
          PARSEERROR = 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.
    Close the stream since it �s not needed anymore
    call method ISTREAM->close( ).
    clear ISTREAM.
    Now try to make it look good
    data : lv_size     type sytabix,
            lv_ret_code type sysubrc.
    data: lo_xml_document type ref to cl_xml_document.
    field-symbols: <fs_xml_data> type any table.
    lo_xml_document = document.
    call method lo_xml_document->get_as_table
       importing
         table   = <fs_xml_data>
         size    = lv_size
         retcode = lv_ret_code
    *data: items type ref to if_ixml_node_collection.
    *items = document->get_elements_by_tag_name( name = 'Item' ).
    *data: iterator type ref to if_ixml_node_iterator,
         node     type ref to if_ixml_node.
    *iterator = document->create_iterator( ).
    *node = iterator->get_next( ).
    *while not node is initial.
    do something with the node
    node = iterator->get_next( ).
    *endwhile.
    DATA : GV_NODE type ref to if_ixml_node.
    DATA : GV_NODETEXT type STRING.
    data:  GV_FIRST_TIME.
    GV_FIRST_TIME = 'X'.
    GV_NODE = DOCUMENT.
    GT_ITEM-item_no = 1.
    perform GET_DATA tables     GT_ITEM
                     using      GV_NODE
                     changing   GV_HEADER.
    Last item is still not added.
      append GT_ITEM.
    write  : GV_HEADER-cust_name,
             GV_HEADER-card_no,
             GV_HEADER-tax_amount,
             GV_HEADER-total_amount.
    loop at GT_ITEM.
      write  /:.
      write  : GT_ITEM-item_no,
               GT_ITEM-item_id,
               GT_ITEM-item_title,
               GT_ITEM-item_qty,
               GT_ITEM-item_uprice.
    endloop.
          FORM Get_data                                                 *
    form get_data tables   YT_ITEM    structure GT_ITEM
                  using value(x_node) type ref to if_ixml_node
                  changing Y_HEADER   type TY_HEADER.
      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( ).
          GV_NODETEXT = STRING.
        when if_ixml_node=>co_node_text.
          PTEXT ?= X_NODE->query_interface( IXML_IID_TEXT ).
          if PTEXT->ws_only( ) is initial.
            STRING = X_NODE->get_value( ).
            case GV_NODETEXT.
              when 'Customer'.
                clear GV_HEADER.
              when 'Name'.
                move STRING to GV_HEADER-cust_name.
              when 'Cardnum'.
                move STRING to GV_HEADER-card_no.
              when 'Tax'.
                move STRING to GV_HEADER-tax_amount.
              when 'Total'.
                move STRING to GV_HEADER-total_amount.
            Iteam details
              when 'ID'.
                move STRING to GT_ITEM-item_id.
              when 'Title'.
                move STRING to TEMP_STRING.
                move TEMP_STRING to GT_ITEM-item_title.
              when 'Quantity'.
                move STRING to GT_ITEM-item_qty.
              when 'UnitPrice'.
                move STRING to GT_ITEM-item_uprice.
            endcase.
          endif.
      endcase.
      if GV_NODETEXT = 'Customer'.
        clear GV_HEADER.
      elseif GV_NODETEXT = 'Item'.
        if GV_FIRST_TIME ne 'X'.
           append GT_ITEM.
         clear : gt_item.
           GT_ITEM-item_no = gt_item-item_no + 1.
        endif.
        GV_FIRST_TIME = ' '.
      endif.
    Get the next child
      X_NODE = x_node->get_first_child( ).
    Recurse
      while not X_NODE is initial.
        perform GET_DATA tables     GT_ITEM
                         using      X_NODE
                         changing   GV_HEADER.
        X_NODE = x_node->get_next( ).
      endwhile.
    endform.

  • How to get XML output from a stored procedure

    I have a very simple question:
    I would like to write a stored procedure (SP) that will return results in XML format (as a string). My tables in database are not of XML TYPE. But I need XML output.
    ie, SP will run like a typical SP but the only difference will be its output in XML.
    1) is it possible?
    2) if possible, how?
    Please, help
    Omer Koksal

    Thank you Peter, it was a great problem for me !
    Omer Koksal

Maybe you are looking for