Nested XML structure from Oracle

Using the SQL Adapter i BizTalk, calling a SQL Stored procedure on a MS SQL DB, I can get a nice nested XML structure using p JOIN ii and FOR XML AUTO, like this
<p code="DK003">
<ii stamp="2013-01-14T10:27:38.790"value="180.702052"price="184.000000">
<d Dividend="2.50"DividendDate="2012-03-29T00:00:00" />
</ii>
<ii stamp="2013-01-14T10:27:38.790"value="181.702052"price="14.000000">
<d Dividend="2.50"DividendDate="2012-03-29T00:00:00" />
</ii>
</p>
How can I get the same on Oracle ??

Hi E.,
I guess this an XML namespace issue. I'm creating XmlForms-style documents and had to add an XML namespace to my root element to make them visible as such:
Namespace xf = Namespace.getNamespace("xf", "http://www.sapportals.com/wcm/app/xmlforms");
root.addNamespaceDeclaration(xf);
So what I'd suggest to you is reading out the IResource and treating the content as XML:
Document document = new  SAXBuilder().build(content.getInputStream());
Element root = document.getRootElement();
Namespace xf = Namespace.getNamespace("xf", "http://www.sapportals.com/wcm/app/xmlforms");
root.removeNamespaceDeclaration(xf);
Hope this helps!
regards,
Christian

Similar Messages

  • Create XML file from Oracle DB

    Hi,
    I'm working in a task to create electronic billing for Mexico Rules, to do this; I need to create a XML source that will contain all the information requested from Oracle DB.
    For this reason, I'm looking how to create this XML file from Oracle DB.
    All this is for the new legislations rules in Mexico to use electronic billing.
    Please, if you have any reference about this, let me know.
    Thanks and regards.

    you may want to check out commands like xmlforest and xmlelement
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions221.htm
    copied from documentation
    Purpose
    XMLForest converts each of its argument parameters to XML, and then returns an XML fragment that is the concatenation of these converted arguments.
    •If value_expr is a scalar expression, then you can omit the AS clause, and Oracle Database uses the column name as the element name.
    •If value_expr is an object type or collection, then the AS clause is mandatory, and Oracle uses the specified c_alias as the enclosing tag. The c_alias can be up to 4000 characters.
    •If value_expr is null, then no element is created for that value_expr.
    Examples
    The following example creates an Emp element for a subset of employees, with nested employee_id, last_name, and salary elements as the contents of Emp:
    SELECT XMLELEMENT("Emp",
    XMLFOREST(e.employee_id, e.last_name, e.salary))
    "Emp Element"
    FROM employees e WHERE employee_id = 204;
    Emp Element
    <Emp>
    <EMPLOYEE_ID>204</EMPLOYEE_ID>
    <LAST_NAME>Baer</LAST_NAME>
    <SALARY>10000</SALARY>
    </Emp>

  • How to export a data as an XML file from oracle data base?

    could u pls tell me the step by step procedure for following questions...? how to export a data as an XML file from oracle data base? is it possible? plz tell me itz urgent requirement...
    Thankz in advance
    Bala

    SQL> SELECT * FROM v$version;
    BANNER
    Oracle DATABASE 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS FOR 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    5 rows selected.
    SQL> CREATE OR REPLACE directory utldata AS 'C:\temp';
    Directory created.
    SQL> declare                                                                                                               
      2    doc  DBMS_XMLDOM.DOMDocument;                                                                                       
      3    xdata  XMLTYPE;                                                                                                     
      4                                                                                                                        
      5    CURSOR xmlcur IS                                                                                                    
      6    SELECT xmlelement("Employee",XMLAttributes('http://www.w3.org/2001/XMLSchema' AS "xmlns:xsi",                       
      7                                  'http://www.oracle.com/Employee.xsd' AS "xsi:nonamespaceSchemaLocation")              
      8                              ,xmlelement("EmployeeNumber",e.empno)                                                     
      9                              ,xmlelement("EmployeeName",e.ename)                                                       
    10                              ,xmlelement("Department",xmlelement("DepartmentName",d.dname)                             
    11                                                      ,xmlelement("Location",d.loc)                                     
    12                                         )                                                                              
    13                   )                                                                                                    
    14     FROM   emp e                                                                                                       
    15     ,      dept d                                                                                                      
    16     WHERE  e.DEPTNO=d.DEPTNO;                                                                                          
    17                                                                                                                        
    18  begin                                                                                                                 
    19    OPEN xmlcur;                                                                                                        
    20    FETCH xmlcur INTO xdata;                                                                                            
    21    CLOSE xmlcur;                                                                                                       
    22    doc := DBMS_XMLDOM.NewDOMDocument(xdata);                                                                           
    23    DBMS_XMLDOM.WRITETOFILE(doc, 'UTLDATA/marco.xml');                                                                  
    24  end;                                                                                                                  
    25  /                                                                                                                      
    PL/SQL procedure successfully completed.
    .

  • How can I get the XML structure from a flat structure?

    Hi all,
    in my XI SP 12 I use a JMS adapter to read information using the WebSphereMQ transport protocol.
    The structure that I receive have this format:
    <Name_A.KeyFieldValue><Name_A.fieldName_A1_Value>...<Name_A.fieldName_AN_Value>
    <NumberRecordType_B><NumberRecordType_c>
    <Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>
    <Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>
    <Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
    <Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
    the problem is that in this structure each line is not separated by a carriage return or a comma, I have all the information in a single line:
    <Name_A.KeyFieldValue><Name_A.fieldName_A1_Value>...<Name_A.fieldName_AN_Value><NumberRecordType_B><NumberRecordType_c><Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value>...<Name_B.KeyFieldValue><Name_B.fieldName_B1_Value>...<Name_B.fieldName_BN_Value><Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>...<Name_C.KeyFieldValue><Name_C.fieldName_C1_Value>...<Name_C.fieldName_CN_Value>
    and the customer don't want to insert a line separator.
    Then, the question is:
    How can I get the XML structure from this structure?
    If possible, I don't want to develop new Module and add it in the JMS Module Sequence.
    PS I have already read the article "How to Use the Content Conversion Module with the XI 3 J2EE JMS Adapter.pdf" and it doesn't seem to help me.
    Best Regards,
    Paolo

    To get context parameters from your web.xml file you can simply get the ActionServlet object from an implementing action object class. In the perform (or execute) method make the following call.
    ServletContext context = getServlet().getServletContext();
    String tempContextVar =
    context.getInitParameter("<your context param >");

  • How to create xml file from Oracle and sending the same xml file to an url

    How to create xml file from Oracle and sending the same xml file to an url

    SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
    Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way.

  • How to export an XML file from oracle database?

    plz help me its urgent requirement....could u pls tell me the step by step procedure for following questions...?how to export a data as an XML file from oracle database?
    thanks in advance,
    Bala.
    Edited by: user3523292 on Nov 14, 2008 5:43 AM

    user3523292 wrote:
    plz help me its urgent requirement....could u pls tell me the step by step procedure for following questions...?how to export a data as an XML file from oracle database?
    thanks in advance,
    Bala.
    Edited by: user3523292 on Nov 14, 2008 5:43 AMThis is a forum of volunteers. There is no "urgent" here. Nevertheless, a google search of 'xml oracle export' quickly lead me to this Oracle site:
    otn.oracle.com/sample_code/tech/xml/index.html
    I also see lots of hits when I search the documentation library at tahiti.oracle.com for 'xml'. This one in particular may be what you are looking for:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14252/adx_j_xsu.htm#ADXDK070

  • Export an XML file from oracle database

    plz help me its urgent requirement....could u pls tell me the step by step procedure for following questions...?how to export a data as an XML file from oracle database? is it possible..?
    thanks in advance,
    Bala. is it possible?
    Edited by: user3523292 on Nov 14, 2008 5:45 AM

    Here's the quick and dirty method using SQL*Plus...
    SQL> select * from emp where deptno = 10;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    SQL> set markup html on
    SQL&gt; select * from emp where deptno = 10;
    <br>
    <p>
    <table border='1' width='90%' align='center' summary='Script output'>
    <tr>
    <th scope="col">
    EMPNO
    </th>
    <th scope="col">
    ENAME
    </th>
    <th scope="col">
    JOB
    </th>
    <th scope="col">
    MGR
    </th>
    <th scope="col">
    HIREDATE
    </th>
    <th scope="col">
    SAL
    </th>
    <th scope="col">
    COMM
    </th>
    <th scope="col">
    DEPTNO
    </th>
    </tr>
    <tr>
    <td align="right">
          7782
    </td>
    <td>
    CLARK
    </td>
    <td>
    MANAGER
    </td>
    <td align="right">
          7839
    </td>
    <td>
    09-JUN-81
    </td>
    <td align="right">
          2450
    </td>
    <td align="right">
    </td>
    <td align="right">
            10
    </td>
    </tr>
    <tr>
    <td align="right">
          7839
    </td>
    <td>
    KING
    </td>
    <td>
    PRESIDENT
    </td>
    <td align="right">
    </td>
    <td>
    17-NOV-81
    </td>
    <td align="right">
          5000
    </td>
    <td align="right">
    </td>
    <td align="right">
            10
    </td>
    </tr>
    <tr>
    <td align="right">
          7934
    </td>
    <td>
    MILLER
    </td>
    <td>
    CLERK
    </td>
    <td align="right">
          7782
    </td>
    <td>
    23-JAN-82
    </td>
    <td align="right">
          1300
    </td>
    <td align="right">
    </td>
    <td align="right">
            10
    </td>
    </tr>
    </table>
    <p>
    SQL&gt;which you can spool to a file.

  • How to change  XML  Structure from one form to another form using OO ABAP.

    Hi Experts,
    In my Scenario, i need to do ABAP Mapping in order to change Incoming structure from one form to another.
    My Input to ABAP Mapping (OO ABAP Program)would be :
         <A>..........</A>
         <B>..........</B>
         <C> .........</C>
         <D>..........</D>
         <E>..........</E>
         <F>..........</F>
    OO ABAP Program need to read this input and change the XML Structure into below form:
         <A>..........</A>
         <B>..........</B>
         <C> .........</C>
          <X>
                <D>..........</D>
                <E>..........</E>
          <F>...............<F>
    Please provide inputs (sample Code) to solve this issue.
    Thanks,
    Kish.
    Edited by: Kishore Reddy Thamma on Jan 22, 2008 2:51 PM
    Edited by: Kishore Reddy Thamma on Jan 22, 2008 2:52 PM

    Hi,
    Please provide sample code or Material for converting XML Structure from one form to another using OO ABAP and
    Steps for ABAP MAPPING.
    Thanks,
    Kish.

  • Using XML extraction from Oracle and XSLT data transformation

    Hi
    How can transfer data ie: Using XML extraction from Oracle and XSLT data transformation with java application?
    usually i use to do querying sql, getting data from table assinging to model class then send it to UI. how can i go for XML extraction form oracle?
    thanks

    Sorry, I don't understand what exactly you want to do. And I'm under the impression that you might not know exactly what you want to do as well. Could you explain a bit more detailed what you want to achieve?

  • Database data to nested xml structure

    Hi All,
    I need to convert the data in the oracle database to nested xml tree structure as below:
    Data in the database is in the following structure:
    1     branch1     13-JAN-11     a.txt
    1     branch1     25-JAN-11     b.txt
    1     branch1     25-JAN-11     c.txt
    1     branch2     20-JAN-11     d.txt
    2
    XML for the above data should be in the format:
    <Root>
    <Account_no value="1">
    <Desc value="branch1">
    <Date value="13-JAN-11">
    <Name value="a.txt"/>
    </Date>
    <Date value="25-JAN-11">
    <Name value="b.txt"/>
    <Name value="c.txt"/>
    </Date>
    </Desc>
    <Desc value="branch2">
    <Date value="20-JAN-11">
    <Name value="d.txt"/>
    </Date>
    </Desc>
    </Account_no>
    <Account_no value="2">
    </Account_no>
    </Root>
    I am able to get this kind of xml structure using java after storing the database data in a n-ary tree. But it takes more time to execute.
    Can this kind of same xml format be achieved using pl/sql programming?
    Please help me with your valuable insights.
    Thanks,
    Alagappan

    Hi,
    Please always mention your db version (select * from v$version).
    Here's one solution using SQL/XML functions :
    Sample data used :
    create table sample_data
      account_no  number,
      description varchar2(30),
      dt          date,
      name        varchar2(30)
    insert into sample_data values(1, 'branch1', to_date('13-JAN-11','DD-MON-RR'), 'a.txt');
    insert into sample_data values(1, 'branch1', to_date('25-JAN-11','DD-MON-RR'), 'b.txt');
    insert into sample_data values(1, 'branch1', to_date('25-JAN-11','DD-MON-RR'), 'c.txt');
    insert into sample_data values(1, 'branch2', to_date('20-JAN-11','DD-MON-RR'), 'd.txt');
    insert into sample_data values(2, 'branch3', to_date('20-JAN-11','DD-MON-RR'), 'e.txt');Query :
    SELECT xmlserialize(document
             xmlelement("Root",
               xmlagg(
                 xmlelement("Account_no", xmlattributes(account_no as "value"),
                   xmlagg(
                     xmlelement("Desc", xmlattributes(description as "value"), dt)
                     order by description
                 ) order by account_no
           as clob indent ) doc
    FROM (
      SELECT account_no, description,
             xmlagg(
               xmlelement("Date", xmlattributes(to_char(dt,'DD-MON-RR') as "value"), name)
               order by dt
             ) dt
      FROM (
        SELECT account_no, description, dt,
               xmlagg(
                 xmlelement("Name", xmlattributes(name as "value"))
                 order by name
               ) name
        FROM sample_data
        GROUP BY account_no, description, dt
      GROUP BY account_no, description
    GROUP BY account_no
    DOC
    <Root>
      <Account_no value="1">
        <Desc value="branch1">
          <Date value="13-JAN-11">
            <Name value="a.txt"/>
          </Date>
          <Date value="25-JAN-11">
            <Name value="b.txt"/>
            <Name value="c.txt"/>
          </Date>
        </Desc>
        <Desc value="branch2">
          <Date value="20-JAN-11">
            <Name value="d.txt"/>
          </Date>
        </Desc>
      </Account_no>
      <Account_no value="2">
        <Desc value="branch3">
          <Date value="20-JAN-11">
            <Name value="e.txt"/>
          </Date>
        </Desc>
      </Account_no>
    </Root>
    Here, I used XMLSerialize function with indent option to format the output (available starting with 11g).

  • How to run an XML Report from Oracle Forms 10G

    Hello Friends,
    I am in need of showing a xml report output through a button press trigger in Oracle Forms10G.
    I have designed the report in XML Publisher and the report looks fine.I found few scripts useful in running the Oracle Report from Oracle forms10G like Run_Report_Object.But I am not aware of any script that could run a XML report and show the output directly from a Form.
    All I want is to run a XML report from an Oracle Form with a button press trigger and show the output in an html version.
    Can this be achieved?
    If so, Kindly advise as this is an immediate work.
    Regards,
    Badrul.

    Hi,
    If I am not wrong the XML publisher is same as BI publisher ...
    There is one document which explains how to integrate using web service
    You want to check this
    http://www.oracle.com/technology/products/xml-publisher/docs/Forms_BIP_v22.pdf
    or you can also try web.show_document ..

  • How to generate as XML output from Oracle Apps 11

    Hi Anyone has the experience to generate the output from Oracle Apps 11 as XML file? Database is 8.1.7, Oracle Apps 11. The concurrent program can be written in PL/SQL or can report 2.5 generate the output as XML?
    The scenario is:
    1) Run a concurrent program in Oracle Apps 11
    2) Output generated is XML (.xml)
    Regards.

    This forum is for Oracle XML DB features. XML DB is only available as of database 9iR2.
    You may be better off in legacy XML Features forum...
    PL/SQL XML Programming

  • To generate XML output from Oracle Apps 11

    Hi Anyone has the experience to generate the output from Oracle Apps 11 as XML file? Database is 8.17, Oracle Apps 11. The concurrent program can be written in PL/SQL or can report 2.5 generate the output as XML?
    The scenario is:
    1) Run a concurrent program in Oracle Apps 11
    2) Output generated is XML (.xml)
    Regards.

    This forum is for Oracle XML DB features. XML DB is only available as of database 9iR2.
    You may be better off in legacy XML Features forum...
    PL/SQL XML Programming

  • XML output from oracle equivalent to sql server

    Hi,
    I need an equivalent sql server 2005 equivalent output from oracle.
    Tried with DBMS_XMLGEN.getxml, xforest etc. But I am not able to get desired output.
    Could anyone help me in giving a hint to do so.
    Here below i am pasting sql server 2005 query and output, oracle query and output.
    SELECT top 5
    P.process_id AS Ppid,
    P.name AS Pn,
    P.group_id AS Pg,
    P.locked AS Pl,
    P.build AS Pb,
    100 AS qcount,
    200 AS ocount,
    PI.question_id AS PIqid,
    PI.process_id AS PIpid,
    PI.posx AS PIpx,
    PI.posy AS PIpy,
    PI.innertext AS PItext,
    PI.itemtype AS PItype,
    PI.linkfrom AS PIfrom,
    PI.linkto AS PIto,
    PI.associated AS PIas,
    PI.content_id AS PIc,
    PI.exitpoint1_id AS PIe1,
    PI.exitpoint2_id AS PIe2,
    PI.exitpoint3_id AS PIe3,
    PI.resolveidentifier AS PIri,
    PI.libquestion_idfk AS PIlqid,
    PI.followoncall AS PIfoc,
    PI.userinput AS PIui,
    PI.isLocked AS PIstls,
    PI.PreviousAnswer as PIPAns,
    PI.VisibleToAgent as PIVAgent,
    PI.RetryAttempt as PIRetry,
    PI.Tags as PITag,
    PO.option_id AS POoid,
    PO.question_id AS POqid,
    PO.process_id AS popid,
    PO.posx AS POpx,
    PO.posy AS POpy,
    PO.opt_innertext AS POtext,
    PO.opt_linkfrom AS POfrom,
    PO.opt_linkto AS POto,
    PO.libquestion_idfk AS POlqid,
    PO.liboption_idfk AS POloid
    FROM
    dbo.processes_ec AS P WITH (nolock) INNER JOIN
    dbo.vw_ProcessesQuestions_Simulator_v6 AS PI WITH (nolock)
    ON P.process_id = PI.process_id LEFT OUTER JOIN
    dbo.vw_ProcessesOptions_Simulator_v6 AS PO WITH (nolock)
    ON PI.question_id = PO.question_id AND PI.process_id = PO.process_id
    ORDER BY Ppid, PIqid, POoid ASC
    FOR XML AUTO, ELEMENTS
    O/P
    <P>
    <Ppid>450</Ppid>
    <Pn>CBB1015 - Router Firewall Settinngs Process</Pn>
    <Pg>9</Pg>
    <Pl>0</Pl>
    <Pb>5</Pb>
    <qcount>100</qcount>
    <ocount>200</ocount>
    <PI>
    <PIqid>1</PIqid>
    <PIpid>450</PIpid>
    <PIpx>366</PIpx>
    <PIpy>-516</PIpy>
    <PItext>CBB1015 - Router Firewall Settinngs Process</PItext>
    <PItype>Title</PItype>
    <PIto>2</PIto>
    <PO />
    </PI>
    <PI>
    <PIqid>2</PIqid>
    <PIpid>450</PIpid>
    <PIpx>366</PIpx>
    <PIpy>-437</PIpy>
    <PItext>Is the customers PC Firewall turned off?</PItext>
    <PItype>Question</PItype>
    <PIfrom>1</PIfrom>
    <PIto>2.2,2.1</PIto>
    <PO>
    <POoid>1</POoid>
    <POqid>2</POqid>
    <popid>450</popid>
    <POpx>-50</POpx>
    <POpy>70</POpy>
    <POtext>Yes</POtext>
    <POto>5</POto>
    </PO>
    <PO>
    <POoid>2</POoid>
    <POqid>2</POqid>
    <popid>450</popid>
    <POpx>50</POpx>
    <POpy>70</POpy>
    <POtext>No</POtext>
    <POto>3</POto>
    </PO>
    </PI>
    <PI>
    <PIqid>3</PIqid>
    <PIpid>450</PIpid>
    <PIpx>468</PIpx>
    <PIpy>-344</PIpy>
    <PItext>Advise the customer to turn off the PC Firewall in order to continue. Has this been done?</PItext>
    <PItype>Question</PItype>
    <PIfrom>2.2</PIfrom>
    <PIto>3.2,3.1</PIto>
    <PIc>278</PIc>
    <PO>
    <POoid>1</POoid>
    <POqid>3</POqid>
    <popid>450</popid>
    <POpx>-50</POpx>
    <POpy>70</POpy>
    <POtext>Yes</POtext>
    <POto>5</POto>
    </PO>
    <PO>
    <POoid>2</POoid>
    <POqid>3</POqid>
    <popid>450</popid>
    <POpx>50</POpx>
    <POpy>70</POpy>
    <POtext>No</POtext>
    <POto>4</POto>
    </PO>
    </PI>
    </P>
    Oracle query and output
    select DBMS_XMLGEN.getxml('select * from (SELECT
    P.process_id AS Ppid,
    P.name AS Pn,
    P.group_id AS Pg,
    P.locked AS Pl,
    P.build AS Pb,
    100 AS qcount,
    200 AS ocount,
    PI.question_id AS PIqid,
    PI.process_id AS PIpid,
    PI.posx AS PIpx,
    PI.posy AS PIpy,
    PI.innertext AS PItext,
    PI.itemtype AS PItype,
    PI.linkfrom AS PIfrom,
    PI.linkto AS PIto,
    PI.associated AS PIas,
    PI.content_id AS PIc,
    PI.exitpoint1_id AS PIe1,
    PI.exitpoint2_id AS PIe2,
    PI.exitpoint3_id AS PIe3,
    PI.resolveidentifier AS PIri,
    PI.libquestion_idfk AS PIlqid,
    PI.followoncall AS PIfoc,
    PI.userinput AS PIui,
    PI.isLocked AS PIstls,
    PI.PreviousAnswer as PIPAns,
    PI.VisibleToAgent as PIVAgent,
    PI.RetryAttempt as PIRetry,
    PI.Tags as PITag,
    PO.option_id AS POoid,
    PO.question_id AS POqid,
    PO.process_id AS popid,
    PO.posx AS POpx,
    PO.posy AS POpy,
    PO.opt_innertext AS POtext,
    PO.opt_linkfrom AS POfrom,
    PO.opt_linkto AS POto,
    PO.libquestion_idfk AS POlqid,
    PO.liboption_idfk AS POloid
    FROM
    processes_ec P INNER JOIN
    vw_ProcessesQuestions_Sim_v6 PI
    ON P.process_id = PI.process_id LEFT OUTER JOIN
    vw_ProcessesOptions_Sim_v6 PO
    ON PI.question_id = PO.question_id AND PI.process_id = PO.process_id
    ORDER BY Ppid, PIqid, POoid ASC) where rownum<=5') from dual
    O/P
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <PPID>450</PPID>
    <PN>CBB1015 - Router Firewall Settinngs Process</PN>
    <PG>9</PG>
    <PL>0</PL>
    <PB>5</PB>
    <QCOUNT>100</QCOUNT>
    <OCOUNT>200</OCOUNT>
    <PIQID>1</PIQID>
    <PIPID>450</PIPID>
    <PIPX>366</PIPX>
    <PIPY>-516</PIPY>
    <PITEXT>CBB1015 - Router Firewall Settinngs Process</PITEXT>
    <PITYPE>Title</PITYPE>
    <PITO>2</PITO>
    </ROW>
    <ROW>
    <PPID>450</PPID>
    <PN>CBB1015 - Router Firewall Settinngs Process</PN>
    <PG>9</PG>
    <PL>0</PL>
    <PB>5</PB>
    <QCOUNT>100</QCOUNT>
    <OCOUNT>200</OCOUNT>
    <PIQID>2</PIQID>
    <PIPID>450</PIPID>
    <PIPX>366</PIPX>
    <PIPY>-437</PIPY>
    <PITEXT>Is the customers PC Firewall turned off?</PITEXT>
    <PITYPE>Question</PITYPE>
    <PIFROM>1</PIFROM>
    <PITO>2.2,2.1</PITO>
    <POOID>1</POOID>
    <POQID>2</POQID>
    <POPID>450</POPID>
    <POPX>-50</POPX>
    <POPY>70</POPY>
    <POTEXT>Yes</POTEXT>
    <POTO>5</POTO>
    </ROW>
    <ROW>
    <PPID>450</PPID>
    <PN>CBB1015 - Router Firewall Settinngs Process</PN>
    <PG>9</PG>
    <PL>0</PL>
    <PB>5</PB>
    <QCOUNT>100</QCOUNT>
    <OCOUNT>200</OCOUNT>
    <PIQID>2</PIQID>
    <PIPID>450</PIPID>
    <PIPX>366</PIPX>
    <PIPY>-437</PIPY>
    <PITEXT>Is the customers PC Firewall turned off?</PITEXT>
    <PITYPE>Question</PITYPE>
    <PIFROM>1</PIFROM>
    <PITO>2.2,2.1</PITO>
    <POOID>2</POOID>
    <POQID>2</POQID>
    <POPID>450</POPID>
    <POPX>50</POPX>
    <POPY>70</POPY>
    <POTEXT>No</POTEXT>
    <POTO>3</POTO>
    </ROW>
    <ROW>
    <PPID>450</PPID>
    <PN>CBB1015 - Router Firewall Settinngs Process</PN>
    <PG>9</PG>
    <PL>0</PL>
    <PB>5</PB>
    <QCOUNT>100</QCOUNT>
    <OCOUNT>200</OCOUNT>
    <PIQID>3</PIQID>
    <PIPID>450</PIPID>
    <PIPX>468</PIPX>
    <PIPY>-344</PIPY>
    <PITEXT>Advise the customer to turn off the PC Firewall in order to continue. Has this been done?</PITEXT>
    <PITYPE>Question</PITYPE>
    <PIFROM>2.2</PIFROM>
    <PITO>3.2,3.1</PITO>
    <PIC>278</PIC>
    <POOID>1</POOID>
    <POQID>3</POQID>
    <POPID>450</POPID>
    <POPX>-50</POPX>
    <POPY>70</POPY>
    <POTEXT>Yes</POTEXT>
    <POTO>5</POTO>
    </ROW>
    <ROW>
    <PPID>450</PPID>
    <PN>CBB1015 - Router Firewall Settinngs Process</PN>
    <PG>9</PG>
    <PL>0</PL>
    <PB>5</PB>
    <QCOUNT>100</QCOUNT>
    <OCOUNT>200</OCOUNT>
    <PIQID>3</PIQID>
    <PIPID>450</PIPID>
    <PIPX>468</PIPX>
    <PIPY>-344</PIPY>
    <PITEXT>Advise the customer to turn off the PC Firewall in order to continue. Has this been done?</PITEXT>
    <PITYPE>Question</PITYPE>
    <PIFROM>2.2</PIFROM>
    <PITO>3.2,3.1</PITO>
    <PIC>278</PIC>
    <POOID>2</POOID>
    <POQID>3</POQID>
    <POPID>450</POPID>
    <POPX>50</POPX>
    <POPY>70</POPY>
    <POTEXT>No</POTEXT>
    <POTO>4</POTO>
    </ROW>
    </ROWSET>
    Any help really appreciated.
    Thanks in advance

    Here are the links ->
    http://www.psoug.org/reference/xml_functions.html
    http://www.psoug.org/reference/dbms_xmlgen.html
    http://www.adp-gmbh.ch/ora/sql/xmlelement.html
    http://www.oracle-base.com/articles/9i/SQLXML9i.php
    http://download.oracle.com/docs/cd/B10500_01/appdev.920/a96620/toc.htm
    Regards.
    Satyaki De

  • How to get nested JSON structure from OData service result

    Hi all,
    This is what I have done :
    I have developed OData service where I am following below steps :
    1. Created Stored procedure for the logic
    2. Created scripted calculation view and call stored procedure from the view.
    3. Created OData Service where I am calling calculation view with multiple parameters.
    Every thing is working fine and I am getting proper JSON Result which all the attributes that I am returning from the view in flatten structure.
    Additional requirement:
    On top of this I have additional requirement where I want to get various aggregation or counts.
    For example : from view I am getting all the customers result as result set and I also want some summary level information along with that such as :
    1. Total Number of Records
    2. Total VIP Customers
    3. Total Individual Customers
    4. Total Business Customers
    Above counts can not be each records level information so I need this details in my OData Service result as separate summary section like nested JSON structure.
    For example :
    d: {
    results: [
    __metadata: {
    uri: "http://servername:8000/testmulti.xsodata/calmultiview1('123456')",
    type: "Cust.Multiview1.calmultiview1Type"
    aggregation: {
    totalrecords: "",
    totalVIPCustomers: "",
    totalIndividualCustomers:"",
    totalbusinesscutomers:""
    ID: "123456",
    ENT_ID: 1234,
    FIRST_NM: "ABC",
    LAST_NM: "XYZ",
    CITY: "DELHI",
    In above example like _metadata , I am asking how to get aggregation section also in the JSON result?
    aggregation: {
    totalrecords: "",
    totalVIPCustomers: "",
    totalIndividualCustomers:"",
    totalbusinesscutomers:""
    Please suggest best possible way to implement this kind of requirements.
    Thanks
    - Dharmesh

    Don't expect that OData can help you for this. Still you can try the following.
    Create a XSJS service where you can execute your procedure manually and get the aggregation as well. From the XSJS , you can loop over the result sets and build your corresponding JSON format. But, you can not implement the features of OData, as the return would be "just" a JSON.
    in any way you can establish an association with your main entity and aggregation entity(I am Sure, the worst case), you can get both in the same payload.
    Sreehari

Maybe you are looking for

  • Purchase register vat report

    hi      plz help me  purchase vat Report material wise can you any body tell     me how will take data and relation between Material and vat which table     its urgents Thanks for help Regards, vijay kumar

  • How can I get Messages to show the correct time for read receipts?

    Messages in Mountain Lion shows the wrong time for read receipts. For example, my iPad will show a message was read at 3:37 pm but if I open Messages on my MacBook, the read receipt shows the time that I opened the Messages app as opposed to the time

  • RGB colour output format via HDMI/DP

    Hey Guys, So i just bought a Dell u2410 screen the other day, and decided to hook it up via HDMI, It's being used for photo-editing, I tried to calibrate it, but in the sRGB mode i need to use the colours come out terrible, Reds are orange, etc. The

  • ITunes can't find calendars of Outlook.....

    Windows 7 Simplified Chinese iTunes 64bit Office 2007 Standard Simplified Chinese I can't find Outlook's calendar (in Chinese name) in iTunes. So i can't sync calendar between outlook and iPad/iPhone. I re-installed iTunes and Office for severel time

  • Delivery confirmation & read-receipt in Mail?

    Is it possible to obtain a delivery confirmation & read-receipt in Mail?