9 Replies Latest reply on Aug 18, 2015 11:39 AM by Denes Kubicek

    how to generate xml  in oracle apex 5

    ömer faruk akyüzlü

      Hi...

      I use apex 5.0.

      I have products table.

      I want to generate xml

      my purpose,  everyone will be use xml and they will show my products using xml

      thank you very much for help

        • 1. Re: how to generate xml  in oracle apex 5
          fac586

          ömer faruk akyüzlü wrote:

           

          I use apex 5.0.

          I have products table.

          I want to generate xml

          my purpose,  everyone will be use xml and they will show my products using xml

          Everyone will use XML to do what? When? Where? How?

           

          Please explain your requirements in more detail, including all of the information detailed in these guidelines, making specific reference to all APEX components involved using standard terminology.

          • 2. Re: how to generate xml  in oracle apex 5
            ömer faruk akyüzlü

            We have a lot of customers.

            We have products in our database.

            We'll give them XML.

            they will sell our products in their systems.(web sites)

            • 3. Re: how to generate xml  in oracle apex 5
              Tim St. H.

              I am guessing that english is not your first language.  I give you credit for trying to phrase your question in english. 

               

              Look for "generate XML from ORACLE"

               

              DBMS_XMLGEN

              http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_xmlgen.htm

              XML Developers Guide

              http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/toc.htm

               

              APEX as a delivery mechanism: 

              There is more than one way to provide that data.

              One thing you might want to look at is providing an APEX report.

              - Use a STANDARD report (not interactive)

              - Set the "Report Attributes" report template to "export:XML"

               

              When the page is run - the contents of the report will be saved as XML

               

              Again - more than one way to solve this problem.

               

              Hope this helps.

               

              -- Tim St.

              • 4. Re: how to generate xml  in oracle apex 5
                Scott Wesley

                Could another way be to write a query that returns XML and define as a RESFful web service?

                • 5. Re: how to generate xml  in oracle apex 5
                  Kiran Pawar

                  Hi Omer,

                  ömer faruk akyüzlü wrote:

                   

                  We have a lot of customers.

                  We have products in our database.

                  We'll give them XML.

                  they will sell our products in their systems.(web sites)

                       Yes, agree with Scott Wesley.  As you want the products in your database available to your customers in their websites, the best way to make your products available in your customers websites will be Web Service. Web Service allows two web sites to interact and exchange data over internet.

                       You can use any of the following type of web service:

                  • RESTful Web Service : With ORDS deployed to Java EE Application Server you can use Oracle APEX to define and host/emit RESTful Web Services which can be consumed by your customer websites.
                  • SOAP Web Service : This is old format of web service communicating using XML requests and responses. If your most of the customer websites do not support RESTful, you can go for this web service. But with Oracle APEX you cannot host/emit SOAP Web Services. You will require Java Middle Tier like Oracle SOA to define/host SOAP Web Service.

                   

                  Regards,

                  Kiran

                  • 6. Re: how to generate xml  in oracle apex 5
                    ömer faruk akyüzlü

                    DBMS_XMLGEN or XML Developers Guide

                    I clicked on the link.
                    I have examined the document.
                    apex'l not related.
                    but our goal is to generate XML using Apex

                    • 7. Re: how to generate xml  in oracle apex 5
                      Scott Wesley

                      APEX is part of the DB.

                      The DB can generate XML.

                      eg:

                      Matrix report

                      • 9. Re: how to generate xml  in oracle apex 5
                        Denes Kubicek

                        This is an example:

                         

                        DECLARE
                           v_xml   CLOB;
                        BEGIN
                           FOR c IN
                              (SELECT XMLELEMENT
                                         ("DEPARTMENT",
                                          xmlattributes (deptno AS "ID", dname AS "NAME"),
                                          XMLELEMENT
                                             ("EMPLOYEES",
                                              (SELECT XMLAGG (XMLELEMENT ("EMPLOYEE",
                                                                          XMLFOREST (empno AS "ID",
                                                                                     ename AS "NAME"
                                                                                    )
                                                                         )
                                                             )
                                                 FROM emp
                                                WHERE emp.deptno = dept.deptno)
                                             )
                                         ) xml_element
                                 FROM dept)
                           LOOP
                              v_xml := v_xml || c.xml_element.getclobval ();
                           END LOOP;
                        
                           DBMS_OUTPUT.put_line (v_xml);
                        END;
                        

                         

                        Denes Kubicek