Generate xml to download

Hello,
With an APEX application I need to generate an xml file to download to users computer.
The file should look like that:
<?xml version="1.0" encoding="UTF-16"?>
<flashmedialiveencoder_profile>
<preset>
<name>Medium Bandwidth (300 Kbps) - VP6</name>
<description></description>
</preset>
<capture>
<video>
<device>Laptop Integrated Webcam</device>
<crossbar_input>0</crossbar_input>
<frame_rate>15.00</frame_rate>
<size>
<width>320</width>
<height>240</height>
</size>
</video>
<audio>
<device>Microphone Array (SigmaTel High</device>
<crossbar_input>0</crossbar_input>
<sample_rate>22050</sample_rate>
<channels>1</channels>
<input_volume>75</input_volume>
</audio>
</capture>
<process>
<video>
<preserve_aspect></preserve_aspect>
</video>
</process>
<encode>
<video>
<format>VP6</format>
<datarate>200;</datarate>
<outputsize>320x240;</outputsize>
<advanced>
<keyframe_frequency>5 Seconds</keyframe_frequency>
<quality>Good Quality - Good Framerate</quality>
<noise_reduction>None</noise_reduction>
<datarate_window>Medium</datarate_window>
<cpu_usage>Dedicated</cpu_usage>
</advanced>
<autoadjust>
<enable>false</enable>
<maxbuffersize>1</maxbuffersize>
<dropframes>
<enable>false</enable>
</dropframes>
<degradequality>
<enable>false</enable>
<minvideobitrate></minvideobitrate>
<preservepfq>false</preservepfq>
</degradequality>
</autoadjust>
</video>
<audio>
<format>MP3</format>
<datarate>48</datarate>
</audio>
</encode>
<restartinterval>
<days></days>
<hours></hours>
<minutes></minutes>
</restartinterval>
<reconnectinterval>
<attempts></attempts>
<interval></interval>
</reconnectinterval>
<output>
<rtmp>
<url>rtmp://localhost/live</url>
<backup_url></backup_url>
<stream>livestream</stream>
</rtmp>
<file>
<limitbysize>
<enable>false</enable>
<size>10</size>
</limitbysize>
<limitbyduration>
<enable>false</enable>
<hours>1</hours>
<minutes>0</minutes>
</limitbyduration>
<path>sample.flv</path>
</file>
</output>
<metadata>
<entry>
<key>author</key>
<value></value>
</entry>
<entry>
<key>copyright</key>
<value></value>
</entry>
<entry>
<key>description</key>
<value></value>
</entry>
<entry>
<key>keywords</key>
<value></value>
</entry>
<entry>
<key>rating</key>
<value></value>
</entry>
<entry>
<key>title</key>
<value></value>
</entry>
</metadata>
<preview>
<video>
<input>
<zoom>100%</zoom>
</input>
<output>
<zoom>100%</zoom>
</output>
</video>
<audio></audio>
</preview>
<log>
<level>100</level>
<directory>C:\Users\Pille-Riin\Videos</directory>
</log>
</flashmedialiveencoder_profile>
How could I achieve this so that the xml file would be downloadable from a link or a button?
What I have done so far is this:
-- Set the MIME type
owa_util.mime_header( 'text/xml', FALSE );
-- Set the name of the file
htp.p('Content-Disposition: attachment; filename="test.xml"');
-- Close the HTTP Header
owa_util.http_header_close;
htp.p('<?xml version="1.0" encoding="UTF-16"?>
<flashmedialiveencoder_profile>
<preset>
<name>Medium Bandwidth (300 Kbps) - VP6</name>
<description></description>
</preset>
<capture>
<video>
<device>Laptop Integrated Webcam</device>
<crossbar_input>0</crossbar_input>
<frame_rate>15.00</frame_rate>
<size>
<width>320</width>
<height>240</height>
</size>
</video>
<audio>
<device>Microphone Array (SigmaTel High</device>
<crossbar_input>0</crossbar_input>
<sample_rate>22050</sample_rate>
<channels>1</channels>
<input_volume>75</input_volume>
</audio>
</capture>
<process>
<video>
<preserve_aspect></preserve_aspect>
</video>
</process>
<encode>
<video>
<format>VP6</format>
<datarate>200;</datarate>
<outputsize>320x240;</outputsize>
<advanced>
<keyframe_frequency>5 Seconds</keyframe_frequency>
<quality>Good Quality - Good Framerate</quality>
<noise_reduction>None</noise_reduction>
<datarate_window>Medium</datarate_window>
<cpu_usage>Dedicated</cpu_usage>
</advanced>
<autoadjust>
<enable>false</enable>
<maxbuffersize>1</maxbuffersize>
<dropframes>
<enable>false</enable>
</dropframes>
<degradequality>
<enable>false</enable>
<minvideobitrate></minvideobitrate>
<preservepfq>false</preservepfq>
</degradequality>
</autoadjust>
</video>
<audio>
<format>MP3</format>
<datarate>48</datarate>
</audio>
</encode>
<restartinterval>
<days></days>
<hours></hours>
<minutes></minutes>
</restartinterval>
<reconnectinterval>
<attempts></attempts>
<interval></interval>
</reconnectinterval>
<output>
<rtmp>
<url>rtmp://localhost/live</url>
<backup_url></backup_url>
<stream>livestream</stream>
</rtmp>
<file>
<limitbysize>
<enable>false</enable>
<size>10</size>
</limitbysize>
<limitbyduration>
<enable>false</enable>
<hours>1</hours>
<minutes>0</minutes>
</limitbyduration>
<path>sample.flv</path>
</file>
</output>
<metadata>
<entry>
<key>author</key>
<value></value>
</entry>
<entry>
<key>copyright</key>
<value></value>
</entry>
<entry>
<key>description</key>
<value></value>
</entry>
<entry>
<key>keywords</key>
<value></value>
</entry>
<entry>
<key>rating</key>
<value></value>
</entry>
<entry>
<key>title</key>
<value></value>
</entry>
</metadata>
<preview>
<video>
<input>
<zoom>100%</zoom>
</input>
<output>
<zoom>100%</zoom>
</output>
</video>
<audio></audio>
</preview>
<log>
<level>100</level>
<directory>C:\Users\Pille-Riin\Videos</directory>
</log>
</flashmedialiveencoder_profile>');
-- Send an error code so that the
-- rest of the HTML does not render
htmldb_application.g_unrecoverable_error := true;
This gives me a file, but it does not work. I need to use the file as a profile for Flash Media Live Encoder (http://www.adobe.com/products/flashmediaserver/flashmediaencoder/). After donloading this file it says that the file is not good for the encoder.
I really do hope that you can help.

Hello,
Try your htp.p without the <?xml version="1.0" encoding="UTF-16"?>
That should get added automatically when you call owa_util.mime_header
Regards,
Dimitri
http://dgielis.blogspot.com/
http://www.apex-evangelists.com/

Similar Messages

  • Generate XML File from table

    How to generate XML file from a table without using UTL_FILE that too in local machine...

    You downloaded the wrong XML Parser!
    XSQL requires Java Parser. Well, there's a copy included with the XSQL package so you actually don't need to do another download.
    You really don't need XSQL if you just want a XML file from DB, you just needed a XML SQL Utility. Download that and run the samples.

  • XML file download to presentation server.

    Hi Experts,
    Here I have a question regarding file download to desktop.
    I have a report which will generate xml file. Once it is generated i would like to download to desktop.
    I tried with 'GUI_DOWNLOAD', but it is not working. It means the file is downlaoded to presentation server but when i opened it 'Page can't be displayed' message is comming.
    Could you pleas help me to solve this issue.
    Thanks in advance.
    Regards,
    Anil.G

    Hello,
    For processing XMLs always try to make use of the class CL_XML_DOCUMENT.
    You can download the XML stream to a local file using the method of EXPORT_TO_FILE class CL_XML_DOCUMENT.
    Further reading: [/people/uwe.schieferstein/blog/2010/10/17/visualizing-any-kind-of-xml-data-using-class-clxmldocument]
    BR,
    Suhas

  • Java code to generate XML File from XML Schema

    Hi I need this asap... "Java code to generate XML File from XML Schema i.e XML Schema Definition, XSD file".
    Thankz in advance...

    JAXB has been available as an early release download for some time. There are also XML Binding packages available from Borland (JBuilder) and Castor. These tools create Java classes from a source document, xml,dtd etc. You can use these classes to marshal-unmarshal XML documents.
    Dave

  • 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

  • Generating XML from form fmb forms

    I am new to XML. I have some questions about generating XML forms from fmb forms. if possible I need some hints

    If you download the latest XSQL Servlet (release 0.9.8.6) it features several things that would help make this easy:
    (1) If you just want to insert the
    posted HTML form parameters into
    a table or view, you can use
    a new tag called <xsql:insert-request>
    This materializes a "request" document
    from the HTML Form parameters and
    allows you to specify an XSLT
    transformation to transform the request
    document into a format suitable for
    automatic insert into the table you
    provide. (See the release notes for
    details).
    (2) You can write your own custom
    action handler in Java that can
    get access to the materialized
    XML document representing the
    HTML form parameters by calling:
    getPageRequest().getPostedDocument()
    in your custom action handler.

  • MPOZ issue generating XMl file

    Hi,
    we have upgraded our ECC6 system to EHP5.Unfortunately one of the add-ons  FI-CAX was not upgraded.
    I want to generate XML file to upgrade this component.If I select EHP5 installation its picking up all the component which has already being upgraded.
    Can you pls suggest how can I generate XML for one particular  Add-on.
    Thanks for your help in advance.
    Regards!!
    Ravi

    Hi Ravi,
    As you said , ECC system EHP5 upgrade is finished but you need 1 add to upgrade seperatly now.
    Pls ensure your system landscape , in SMSY of SolMan is updated correctly with upgrdaed component version for ECC.
    Then try to download component via MOPZ , it sould auto calculate other latest vesrion to apply including your add on component.
    Regards

  • How to generate XML file using select files manually option in MOPz

    Hi Guru's!
    Can someone tell me how can I generate XML file not using the calculate automatically option but using select files manually. thanks!

    Hi Maix,
    You may manually add the files into download basket and then approve it.
    Use the SCN document below for the steps.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10b14f0c-b9af-2e10-ba83-f05ebcfbc3c2?QuickLink=index&…
    Hope this helps.
    Regards,
    Deepak Kori

  • How to generate XML data from Lotus Notes to migrate to SharePoint by passing XML to SharePoint.?

    How to generate XML data from Lotus Notes to migrate to SharePoint by passing XML to SharePoint.?
    Ramesh S

    You could use XMLQuery to return the data from your tables as XML, that would give you a CLOB.
    An example using the SCOTT schema might be like this:
    SELECT XMLQuery(
             'for $i in ora:view("DEPT")/ROW
              return <Department dname="{$i/DNAME}">
                     <Employee>
                       {for $j in ora:view("EMP")/ROW
                        where $j/DEPTNO eq $i/DEPTNO
                        return ($j/ENAME, $j/JOB, $j/SAL)}
                     </Employee>
                     </Department>'
             RETURNING CONTENT) FROM DUAL;In the docs you can find more information about its use:
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10492/xdb_xquery.htm

  • Generate XML Schema from Oracle Database

    Is there a utility that would allow our team to generate XML Schemas directly from existing Oracle databases? Or do you have a suggestion on how to achieve this?
    Thank you.

    Hey, The Schema Processor is available in the Technologies section on this site. Just download it and see the samples. You will get the way for doing it. If you are having problems then just call me.
    Bye.
    null

  • Generate xml source file for Oracle Order Capture Print Quote

    Hi,
    I am new to xml and need to work on creating templates for Print Quote.
    I am trying to generate the xml source file for which I enabled the report in system administrator and set the output to XML and assigned to Quoting Reports responsiblity. I then assigned XML Report Publisher to the same responsiblity.
    I ran the report (Print Quote) and then I am trying to run the XML Report Publisher but I cannot get the request id in the list of values.
    I am able to generate xml source file for other reports like Printed Purchase Order etc.,
    The view output for the (Print Quote) report is as follows:
    <?xml version="1.0" ?>
    - <!-- Generated by Oracle Reports version 6.0.8.26.0
    -->
    <ASOPQTER />
    How do I get the xml source file? Or are there seeded templates that I can use to create more templates? Any help would be appreciated. Thanks Ravi

    Hi, I am in the same position - did this issue ever ger resolved by anyone. I have done a few XMLP reports successfully now using the Word add-in, but customising the Quote output differs from other standard reports.
    If you look at the data definition for Quote it is a 'dummy' definition and has no XML file attached. Does anyone know how I can get the XML format for the report output?
    Also the template uses XSL-FO ?!?!?! rather than RTF - not sure how to work with this, the Oracle docs are not very helpful in this regard either.
    Has anyone successfully managed to customise the Quote print report? Many thanks,
    Roger

  • Unable to generate XML's for BLOB datatypes from Concurrent program

    Hi All,
    I've a requirement to print images on rtf layout. Images are uploaded by end user through attahments men
    there are getting stored in fnd_lobs tables.
    for printing blob images we need to convert them into CLOB and generate XML's.
    I've done the conversion through a function and calling the function in the select query which is generating XML when i run it from toad.
    SELECT xmlgen.getXml(
    'SELECT file_id,mob_getbase64String(file_data) photo
    FROM fnd_lobs
    WHERE file_id = 2490481'
    ,0
    ) FROM dual;
    But the same thing we i registered as concurrent program (SQL*Plus) the program is running into error.
    Output file
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'https://dbtdev5i.oracleoutsourcing.com/OA_CGI/FNDWRR.e...
    Input truncated to 17 characters
    ^
    Log file
    Concurrent Manager encountered an error while running SQL*Plus for your concurrent request 10868311.
    Review your concurrent request log and/or report output file for more detailed information.
    Can anyone help me through on how to bypass this error and generate XML's.
    Thanks in Advance
    Jana

    Hi Priya..,
    I have changed the query and registered in apps and now i am able to generate XML's of the blob image and the same is getting printed on the tempate..
    DECLARE
    v_colb CLOB;
    v_query VARCHAR2(1000);
    BEGIN
    v_query := 'SELECT file_id,mob_getbase64String(file_data) photo
    FROM fnd_lobs fl,
    fnd_documents_vl fd
    WHERE fd.media_id = fl.file_id
    AND (fd.end_date_active IS NULL
    OR fd.end_date_active > SYSDATE)
    AND fd.security_type = 2
    AND fd.security_id = fnd_profile.value(''GL_SET_OF_BKS_ID'')';
    --FND_FILE.put_line( FND_FILE.LOG,v_query);
    v_colb := xmlgen.getxml (v_query, 0);
    --DBMS_OUTPUT.put_line (v_query);
    FND_FILE.put_line( FND_FILE.OUTPUT,v_colb);
    END;
    /

  • Problem with generating xml and nested cursor (ora-600)

    I have a problem with generating xml (with dbms_xmlquery or xmlgen) and nested cursors.
    When I execute the following command, I get a ORA-600 error:
    select dbms_xmlquery.getxml('select mst_id
    , mst_source
    , cursor(select per.*
    , cursor(select ftm_fdf_number
    , ftm_value
    from t_feature_master
    where ftm_mstr_id = pers_master_id ) as features
    from t_person per
    where pers_master_id = mst_id ) as persons
    from f_master
    where mst_id = 3059435')
    from dual;
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: ORA-00600: internal error code, arguments: [kokbnp2], [1731], [], [], [], [], [], []
    </ERROR>
    The problem is the second cursor (t_feature_master).
    I want to generate this:
    <master>
    <..>
    <persons>
    <..>
    <features>
    <..>
    </features>
    </persons>
    <persons>
    <..>
    <features>
    <..>
    </features>
    </persons>
    </master>
    If i execute the select-statement in sql-plus, then I get the next result.
    MST_ID MST_SOURCE PERSONS
    3059435 GG CURSOR STATEMENT : 3
    CURSOR STATEMENT : 3
    PERS_MASTER_ID PERS_TITLE PERS_INITI PERS_FIRSTNAME PERS_MIDDL PERS_LASTNAME
    3059435 W. Name
    CURSOR STATEMENT : 15
    FTM_FDF_NUMBER FTM_VALUE
    1 [email protected]
    10 ....
    I use Oracle 8.1.7.4 with Oracle XDK v9.2.0.5.0.
    Is this a bug and do somebody know a workaround?

    Very simple...Drop all type objects and nested tables and create them again. You will get no error. I'll explain the reason later.

  • How to generate XML from relational data : PL/SQL or Java

    I'm new to Oracle XML and would appreciate some advice. I've been asked to generate XML documents from data stored in relational tables. The XML documents must be validated against a DTD. We will probably want to store the XML in the database.
    I've seen a PL/SQL based approach as follows :
    1.Mimic the structure of the DTD using SQL object types 2.Assign the relational data to the object type using PL/SQL as required
    3.Use the SYS_XMLGEN package to render the required XML documents from the SQL objects
    However, creating the object types seems to be quite time consuming (step 1 above) for anything other than the simplest of XML documents.
    I've also seen that there is the Java based approach, namely :
    1. Use the XML generator to build Java classes based on a DTD.
    2. Use these classes to build the required XML
    On the face of it, the Java based approach seems simpler. However, I'm not that familiar with Java.
    Which is the best way to proceed ? Is the PL/SQL based approach worth pursuing or should I bite the bullet and brush up my Java ?
    Is it possible to use a combination of PL/SQL and Java to populate the dtd generated java classes (step 2 of the Java approach) to reduce my learning curve ?
    Thanks in advance

    To help answer your questions:
    1) Now, in 9iR2, you can use SQL/XML as another choice.
    2) You can also use XSU to generate the XML and use XSLT to transform it to a desired format instead of using object views if possible.
    3) XDK provide Class generator support to populate XML data to Java classes.

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

Maybe you are looking for

  • HT4322 Why isn't iTunes enabling VoiceOver on my iPod Shuffle (4th gen)?

    I'm using iTunes for Windows 7 64-bit. I have the iPod freshly restored and resynced with my playlist, and I want to enable VoiceOver. I click the checkbox, and iTunes downloads the software. After it's done, however, the checkbox goes blank again. W

  • Real Racing 3?

    Hi guys its me again and i was wondering if i should go ahead and update my iPhone because i heard the iPhone 5 is faster than the iPhone 4 and my question was does real racing 3 lag on the iPhone 5 if so how do i stop it?

  • X64 java 1.4.2_18 for SAP

    Hello Basis. I'm install yesterday new SR3 Netweaver AS JAVA (Portal+BI). On installation stage I have faced a problem.... OS are Windows x64 --> System Model:         PowerEdge 2950 System Type:           x64-based PC Processor(s):            8 Proc

  • Change mode for 'further participant;' in appraisal document

    hi! My goal is to change HAP_DOCUMENT BSP to allow Further Participants(FP) to change goal setting and appraisal documents. for this i am changing the page document.where.participated.htm  to enable the FP to change document(employee columns ONLY (ob

  • Fetch Image from Portal in ABAP

    Hello, I have an image in a HTML published in the portal (with broadcaster). Now I want to use this image in an ABAP program. I can't call the web address directly because my program can't handle the Portal authentication. So I have two questions: -