Generate XML output using DBMS_XMLGEN.getxmltype and not from rdf

Hi,
I have a requirement to display output from a particular table in XL format. Out of all the known possible options, I am planning to use the XML publisher to generate XL output.
For the data source, instead of using the conventional way of creating XML data using rdf,I am planning to use DBMS_XMLGEN.getxmltype pl/sql procedure to generate the XML output. And from the output, call the template to generate the required Excel output.
Now, I am using the following code to generate XML output but am not sure how to proceed from here. I need to first print the XML data in the FND Output file after which I was planning to call the 'XML Report Publisher' (XDOREPPB) program and use the current request id to get the excel output but I am not able to find the way to print the XML data in the output file as:
fnd_file.put_line (fnd_file.output, l_xml_type); - is throwing an error as l_xml_type is an XML data output.
PROCEDURE xml_main (
errbuf OUT VARCHAR2
,retcode OUT VARCHAR2
,p_project_from IN VARCHAR2
,p_project_to IN VARCHAR2
AS
l_xml_type XMLTYPE;
BEGIN
SELECT DBMS_XMLGEN.getxmltype
('SELECT fnd_global.conc_request_id
,TO_CHAR (segment1)
,to_char(start_date,''MM/DD/RRRR'')
,to_char(xxmcc_project_details_pkg.current_profit_projection
(project_id),''999,999,990.90'')
,to_char(xxmcc_project_details_pkg.cost_to_date (project_id),''999,999,990.90'')
,''1''
FROM pa_projects_all
WHERE segment1 BETWEEN NVL (p_project_from, segment1)
AND NVL (p_project_to, segment1)')
INTO l_xml_type
FROM DUAL;
     fnd_file.put_line (fnd_file.output, l_xml_type);
END xml_main;
Can anyone point me as to how to publish XML output using a PL/SQL procedure (DBMS_XMLGEN.getxmltype)
Thanks.

Pl see if the example included in this presentation helps http://www.oracle.com/technology/products/applications/Events/OOW-2006/EBS/S281401_Sridhar_Bogelli.pdf
Also, you do not need to explicitly call XDOREPPB in later versions of XML Publisher. If you set up everything correctly (as described in the presentation above and the link below) the Output Post Processor is called automatically after the XML file is generated successfully.
Another excellent tutorial is at http://www.oracle.com/technology/obe/fusion_middleware/fusion/bi/xmlp_ebiz/index.html
HTH
Srini

Similar Messages

  • How to Generate XML Output file

    Hi,
    I want to print sample output XML file.
    I got this link 362496.1
    An output file can be generated via the Preview functionality available under the XML Publisher Administrator responsibility. Navigation path :
    1. Login to the application as SYSADMIN
    2. Responsibility: XML Publisher Administrator
    3. Function: Templates
    4. Select a Template for which a Preview Data file has been uploaded in the past.
    5. Click on the Preview icon
    6. Save the PDF to the client PC
    7. Determine the version either by the above instructions OR by provide the PDF file to Global Customer Support.But in #4 I can not populate any values to search, even if I put all %.
    How can I get a valid search?
    Thanks a lot,
    Ms K

    Hi;
    AFAIK if you prepare template in XML publisher than you can take output as pdf, by the way you can take xml output too
    Please check user guide:
    http://www.oracle.com/technology/products/xml-publisher/docs/XMLP5.6.1UserGuide.pdf
    Oracle XML Publisher and Oracle Reports
    Oracle XML Publisher and Oracle Reports
    Also Please check below thread:
    XML output for pdf concurrent program
    http://www.quovera.com/whitepapers/downloads/xml_oracle.pdf
    Generate XML output using DBMS_XMLGEN.getxmltype and not from rdf
    http://www.orafaq.com/forum/t/35204/2/
    Hope it helps
    Regard
    Helios

  • Most effecient way to generate XML output

    What is the most effecient way to generate XML output using ORACLE.
    Presently I am aware of the following:
    1)DBMS_XMLQUERY
    2)DBMS_XMLGEN
    3)SQLX functions
    We are using the first 2 in our database to generate hierarchical XML. Once the XML is generated the XML file is ftp'd to a UNIX box. Because of the file size restrictions in our UNIX bix we decided not to transform the XML output into XML Attributes.
    The attributes are assigned from an XSLT file and the raw XML file is transformed to a file which has attributes.
    My question is:
    In the Oracle Database release 9.2 is there a better efficient way to genarate the final XML file with Attributes from the database side without using the XSLT. If yes, please give an example how to do this?
    Thank You

    In general the SQL/XML publishing functions are the most efficient way..
    DBMS_XMLQUERY is a legacy technology imlimented in Java. The main advantage is that it can be run outside the database in the mid-tier is required.
    DBMS_XMLGEN is a re-implementation of DBMS_XMLQUERY in 'C' which runs inside the database. In most cases it should be much faster than DBMS_XMLQUERY. It provides some features that are still not availalble in the SQL/XML standard such as the ability to generate XML based on a cursor, and the ability to generate recursive output from a connect by query. It is hoped that future versions of the SQL/XML publishing functions will address these issues.
    Both DBMS_XMLGEN and DBMS_XMLQUERY are somewhat limited in terms of generating complex XML documents with multiple levels of nesting.
    The SQL/XML publishing functions are the preferred way of generating XML from relational data. THey provide the ability to generate extremely complex XML structures from relation data and provide full control over element / attributes names, levels of nested etc. Future development projects will focus on enhancing the performance and functionality of the SQL/XML publishing functions rather than the PL/SQL packages
    In general if you can use SQL/XML publishing functions you should do so.
    Does this help....

  • Easiest and/or best methods for generating XML output (not with a report)

    Hi, several of our EBS customers (11.5.10) are converting their PDF reports to use XML/BI publisher to produce output. The data stream comes from a report that generates the XML output, and then the XML template is applied. This works great ... no problems, etc. From what I have read, however, Oracle intends to treat the traditional Forms and Reports Developers as legacy tools (although still supporting them, of course).
    My question is if I wanted to ditch using Reports to generate XML output, what, in your opinion or in your current usage, is the easiest way of getting this data? In Reports, the data modeler is excellent in providing a method to write your queries, split them into different repeating groups, write formula and summary columns, link multiple queries, etc, etc. If one were to become Reports Developer free, what comparable tools are available to take its place? I would expect this tool to handle a mix of GUI and coding like the Reports data modeler. Please note that I'm not looking for an EBS-specific solution -- say for a custom application using regular Oracle 10g DB and iAS, with BI Publisher for reporting.
    Thanks for your feedback,
    Ryan

    What I'm looking for is to not use Oracle Reports to generate the XML data output since Oracle's statement of direction is pushing BI Publisher rather than Oracle Reports as the preferred tool for reporting. That said, the data modeler in Reports provides a very flexible tool to construct and link multiple queries and to manipulate the queries into several levels of a master/detail relationship. Further, the mix of GUI and coding makes setting up the data model a lot more efficient. What I'm looking for (and I don't know if anything exists) is something comparable that can be used to generate XML output from the DB -- the idea being that I wouldn't use legacy tools, like Reports, for this task. I hope that is clearer.
    Really, another way of answering my question is, aside from Reports and the APIs mentioned so far, what are my fellow developers using, if anything, to extract XML data in a way that handles the features i list above?

  • Error while printing generated XML doc using DBMS_OUTPUT

    while generating XML document using XDK for PL/SQL i am getting " ORU-10027: buffer overflow, limit of 1000000 bytes " error even though i had set DBMS_OUTPUT to 1000000.
    Is there any way to getrid of this problem .
    i am using this code ..
    CREATE OR REPLACE procedure SQLToXML1 is
    queryCtx DBMS_XMLquery.ctxType;
    result CLOB;
    begin
    DBMS_OUTPUT.ENABLE (1000000);
    queryCtx := DBMS_XMLQuery.newContext ('select * from depolib_library' )
    result := DBMS_XMLQuery.getXML(queryCtx);
    printClobOut(result);
    DBMS_XMLQuery.closeContext(queryCtx);
    exception
    when others then
    dbms_output.put_line(sqlerrm);
    end;
    urgent help is needed
    Thanks
    null

    No, It is a PO Print only. Only for changes to PO that do not affect the value of the PO,this error occurs. When i select the entry for the PO and click on Output message, the output message fails. On clicking Display Message, it shows the message - No schedules exist for the Scheduling Agreement XXXXXX(the PO number".
    So,it is not for Scheduling Agreements but for PO only. I know it is weird to see such an error on the PO output message in ME9F.
    Pls help.

  • 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.

  • Error in generating HTML output using Central Output Pro Server 5.5

    I am getting the following error while generating HTML output using the Output Pro Server. A new printer was created with the Physical Device as "HTML Template Generation - [html]" and added to the Job.<br /><br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [400](1801) The printer name is invalid.<br /><br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [3015]Error, unable to open printer.<br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [3008]Error, unable to get info about device 'PAYMENTADVICEHTM.html' attached to port '<nil>'.<br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [400](183) Cannot create a file when that file already exists.<br /><br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [2]Error opening output device/file 'PAYMENTADVICEHTM.html'.<br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [400](6) The handle is invalid.<br /><br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [3018]Error ending page on printer.<br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [210]Nothing was printed.<br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfserver.exe: [314]Agent exit message: [3018]Error ending page on printer.

    If I were to guess, I'd guess that your filename is invalid. How about removing all special characters (spaces, brackets, etc.) from the device name. Also, make sure your form was compiled for HTML.
    I haven't actually used the HTML driver, but these are general things you should do if you have trouble with any Central driver.
    Regards,
    Rob McDougall
    Indigo Pacific

  • Can TestStand 3.0 generate XML output instead of HTML?

    Can TestStand 3.0 generate XML output instead of HTML?

    Hi
    TestStand can generate XML reports instead of HTML.
    This can be changed under Configure -> Report Options and choose XML instead of Html
    Hope this helps
    Regards
    Anand Jain
    National Instruments

  • For the Attribute Movement type(BWA) we use Value " 201" and not "101" why?

    Hello Experts,
    We are in SRM 7.0 classic scenario,
    For the Attribute Movement type(BWA) we use Value " 201" and not "101" and provide the Source syst(backend R/3)
    Can you all plz help me understand what is the difference if use value "101" for the  Attribute Movement type(BWA)
    Also,can you all plz help me understand if we shd use value "101" or "201" for the  Attribute Movement type(BWA) and under what scenario.
    Any pointers will be highly appreciated.
    Thanks & Regards,
    RKS

    Hi,
    Movment type " 201 maintained for the Classic scenario only.
    It is necessary to maintain the attribute if the default material group for a given user (or) sit is set to a backend logical system. The EBP system knows that if the user is set for backend procurement ,that there might be a possibility for a reservation to be generated therefore it checks to see that a value for this attribute is  maintained. The BWA value should be defined  for the  as 201 preceeded by the logical system and a backslash.
    101 should not be used. This isfor the Good receipt.
    In the extended classic scenario when you do the confirmations in SRM the movement type 101 will be created in the
    backend system (R/3 or ECC6.0)
    Regards
    Ganesh Kumar .G

  • Generating XML Output for Eclipse

    Does anyone know if you can customize RoboHelp HTML such
    that, if you generate XML output, you get your TOC in the XML
    needed for Eclipse-based online help platforms? Thanks...

    Good question. The app XML file I was referring to was the one in the source folder. It seems that Flash Builder (or something else, hard to say) is having trouble parsing the brackets and so it's preventing the test app from launching.
    I just told my project to "Execute FlexUnit Tests" again to repro the problem to verify.
    /src/FlexUnitApplication-app.xml
    Contains <content>[...]</content>
    Shows a modification date of 9:04 am (now)
    /bin-debug/FlexUnitApplication-app.xml
    Contains <content>FlexUnitApplication.swf</content>
    Shows a modification date of yesterday (when I last successfully ran the tests)
    I'm unclear why Flash Builder is modifying this file (in the source folder) at all. Should the app XMLs be read-only configurations?

  • Ow can I use my time capsule as a time machine backup without using it wirelessly and not as a wireless router?

    How can I use my time capsule as a time machine backup without using it wirelessly and not as a wireless router?

    bzb888 wrote:
    I have a wireless transmitter already, would like to use the capsule just as a back up drive, I tried hooking up from the ethernet port on the imac to the one of the ports on the capsule but then my Wifi would not work. do I hook the cable to the port with the circle or the arrows?
    It is better to have the TC as part of the main network in bridge. You do not need to run wireless.
    If you want to use the TC plugged in by ethernet and still use wireless for internet, that is possible but the setup is rather more complicated.. the computer must not get confused about which device to use as a gateway or dns server.
    See info in this thread on setting this up.
    https://discussions.apple.com/thread/4817218?tstart=30
    I need to add.. a USB drive would be cheaper, faster and more reliable. It is really poor use of a TC.

  • Hi I have a Iphone4 in using. I couldn't find Safary, E-mail and notes from my phone one day. I made this mistake when I want to delete some programe from my phone. Who can help I recovery my phone please.

    Hi
    I have a Iphone4 in using. I couldn't find Safary, E-mail and notes from my phone one day. I made this mistake when I want to delete some programe from my phone. Who can help I recovery my phone please.
    Thanks

    Hello, HenryWang2103.
    Thank you for visiting Apple Support Communities.
    The Safari, Email and Notes applications are native to the iOS and is unable to be deleted.  Since this is the case, they are either in a folder on the iPhone, on another page or Restrictions are enabled.  You can also search for these Apps on the iPhone by touching the screen and sliding your finger down.  Here is some information regarding these features.  The information about folders is located in the user guide below.
    iPhone User Guide
    iOS: Understanding Restrictions (Parental Controls)
    http://support.apple.com/kb/HT4213
    Cheers,
    Jason H.

  • Imessage using apple id and not phone number

    When using imessage it is being sent from my apple id and not from my phone number, when I go in to the message settings my phone number is greyed out. Then I went into the called id and my phone number is the one listed as the caller ID yet evertying is still being sent through my apple ID

    check in settings > messages > send & recieve and look for start new conversation from and you should be able to change it from there
    dante

  • HT204406 I am using iTunes Match and want to "uncheck" songs so that I can use my shuffle and not hear every song in my itunes.

    Can I "uncheck" songs in my iTunes while using iTunes Match?  I want to use my shuffle and not hear every song in my itunes.  I use a MacBook Pro, iphone 4S and an ipad.

    I know of no way to do this.
    Itunes ringtones are for iphones.

  • Re: Photosmart 5514; must you use setup cartridges and not standard 564 cartridges during setup?

    Re: Photosmart 5514; must you use setup cartridges and not standard 564 cartridges during setup?

    Yes.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

Maybe you are looking for