Generate XML with multiple parent nodes

I have the following test data
CREATE TABLE #TEST1 (
HS VARCHAR(20),
HN VARCHAR(20),
NC FLOAT
INSERT INTO #TEST1
VALUES ('COMPLETE','ABC123',1234.56789),
('REJECTED','ABC124',1234.56789),
('PLANNED','ABC125',1234.56789),
('COMPLETE','ABC126',1234.56789),
('COMPLETE','ABC127',1234.56789),
('REJECTED','ABC128',1234.56789),
('COMPLETE','ABC129',1234.56789),
('PLANNED','ABC130',1234.56789),
('COMPLETE','ABC131',1234.56789),
('COMPLETE','ABC132',1234.56789),
('REJECTED','ABC133',1234.56789),
('COMPLETE','ABC134',1234.56789),
('PLANNED','ABC135',1234.56789),
('COMPLETE','ABC136',1234.56789),
('REJECTED','ABC137',1234.56789),
('COMPLETE','ABC138',1234.56789),
('COMPLETE','ABC139',1234.56789),
('PLANNED','ABC140',1234.56789)
SELECT ( SELECT *
FROM #TEST1 T
FOR XML PATH('STATUS'), TYPE
FOR XML PATH('Document'), ROOT('kml')
DROP TABLE #TEST1
Which produces the following results.
<kml>
<Document>
<STATUS>
<HS>COMPLETE</HS>
<HN>ABC123</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>REJECTED</HS>
<HN>ABC124</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>PLANNED</HS>
<HN>ABC125</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>COMPLETE</HS>
<HN>ABC126</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>COMPLETE</HS>
<HN>ABC127</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>REJECTED</HS>
<HN>ABC128</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>COMPLETE</HS>
<HN>ABC129</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>PLANNED</HS>
<HN>ABC130</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>COMPLETE</HS>
<HN>ABC131</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>COMPLETE</HS>
<HN>ABC132</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>REJECTED</HS>
<HN>ABC133</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>COMPLETE</HS>
<HN>ABC134</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>PLANNED</HS>
<HN>ABC135</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>COMPLETE</HS>
<HN>ABC136</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>REJECTED</HS>
<HN>ABC137</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>COMPLETE</HS>
<HN>ABC138</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>COMPLETE</HS>
<HN>ABC139</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
<STATUS>
<HS>PLANNED</HS>
<HN>ABC140</HN>
<NC>1.234567890000000e+003</NC>
</STATUS>
</Document>
</kml>
What I really want to produce is this
<kml>
<Document>
<STATUS>
<HS>
COMPLETE
<Data>
<HN>ABC123</HN>
<NC>1.234567890000000e+003</NC>
</Data>
<Data>
<HN>ABC126</HN>
<NC>1.234567890000000e+003</NC>
</Data>
<Data>
<HN>ABC127</HN>
<NC>1.234567890000000e+003</NC>
</Data>
<Data>
<HN>ABC129</HN>
<NC>1.234567890000000e+003</NC>
</Data>
<Data>
<HN>ABC131</HN>
<NC>1.234567890000000e+003</NC>
</Data>
<Data>
<HN>ABC132</HN>
<NC>1.234567890000000e+003</NC>
</Data>
<Data>
<HN>ABC134</HN>
<NC>1.234567890000000e+003</NC>
</Data>
<Data>
<HN>ABC136</HN>
<NC>1.234567890000000e+003</NC>
</Data>
<Data>
<HN>ABC138</HN>
<NC>1.234567890000000e+003</NC>
</Data>
<Data>
<HN>ABC139</HN>
<NC>1.234567890000000e+003</NC>
</Data>
</HS>
</STATUS>
<STATUS>
<HS>
REJECTED
<Data>
<HN>ABC124</HN>
<NC>1.234567890000000e+003</NC>
</Data>
<Data>
<HN>ABC128</HN>
<NC>1.234567890000000e+003</NC>
</Data>
<Data>
<HN>ABC133</HN>
<NC>1.234567890000000e+003</NC>
</Data>
<Data>
<HN>ABC137</HN>
<NC>1.234567890000000e+003</NC>
</Data>
</HS>
</STATUS>
<STATUS>
<HS>
PLANNED
<Data>
<HN>ABC125</HN>
<NC>1.234567890000000e+003</NC>
</Data>
<Data>
<HN>ABC130</HN>
<NC>1.234567890000000e+003</NC>
</Data>
<Data>
<HN>ABC135</HN>
<NC>1.234567890000000e+003</NC>
</Data>
<Data>
<HN>ABC140</HN>
<NC>1.234567890000000e+003</NC>
</Data>
</HS>
</STATUS>
</Document>
</kml>
Is it possible to group header and then group data under those headers using one SQL statement?
Thanks in advance
Q

E.g.
DECLARE @TEST1 TABLE
HS VARCHAR(20) ,
HN VARCHAR(20) ,
NC FLOAT
INSERT INTO @TEST1
VALUES ( 'COMPLETE', 'ABC123', 1234.56789 ),
( 'REJECTED', 'ABC124', 1234.56789 ),
( 'PLANNED', 'ABC125', 1234.56789 ),
( 'COMPLETE', 'ABC126', 1234.56789 ),
( 'COMPLETE', 'ABC127', 1234.56789 ),
( 'REJECTED', 'ABC128', 1234.56789 ),
( 'COMPLETE', 'ABC129', 1234.56789 ),
( 'PLANNED', 'ABC130', 1234.56789 ),
( 'COMPLETE', 'ABC131', 1234.56789 ),
( 'COMPLETE', 'ABC132', 1234.56789 ),
( 'REJECTED', 'ABC133', 1234.56789 ),
( 'COMPLETE', 'ABC134', 1234.56789 ),
( 'PLANNED', 'ABC135', 1234.56789 ),
( 'COMPLETE', 'ABC136', 1234.56789 ),
( 'REJECTED', 'ABC137', 1234.56789 ),
( 'COMPLETE', 'ABC138', 1234.56789 ),
( 'COMPLETE', 'ABC139', 1234.56789 ),
( 'PLANNED', 'ABC140', 1234.56789 )
SELECT O.HS ,
( SELECT I.HN ,
I.NC
FROM @TEST1 I
WHERE I.HS = O.HS
FOR XML PATH('') ,ROOT('Data'), TYPE
) AS HS
FROM @TEST1 O
GROUP BY O.HS
FOR XML PATH('Document') , ROOT('kml');
Caveat: You're using mixed element name casing.

Similar Messages

  • EBS-R12 Generate XML (with data) from Embedded Data Definition

    Hi
    I'm new to running XMLP/BIP in EBS.
    I have found the extensive set of data definitions and templates in EBS and they work great out of the box.
    I, however, need to make template modifications.
    To this end, a correctly structured XML data template - containing all the data fields - is needed for loading into the template-builder in Word.
    If for example I take the embedded R12 data definition - XLAJELINESRPT.xml - for Posted Payable Invoices, and load it into the template builder, it provides the structure of the data template and not the structure of the output XML data.
    I have tried several ways to run the Data definition through XMLP using the concurrent manager attempting to intercept the generated XML (with data) but it either completes the process and uses the linked output template - producing the PDF - or other output - or if I remove the (output template altogether) it fails with an error.
    Maybe I'm missing an obvious step, but there has to be a way of taking the very comprehensive Data Definitions embedded in R12 EBS and using them in custom report templates.
    If I've totally missed the point, please give me the steps to follow.
    Many thaks in anticipation.
    Mike MacMurray

    HI Mike,
    You cannot load your Data Template into the MS Word Template Builder plugin, as it cannot be run to generate XML this way.
    You have two options to get the data from an XML Publisher Report run as a concurrent program in EBS.
    1) Using the XML Publisher Administrator responsibility, set an end date for both the Data Defintion and Template Definitions associated with the XLAJELINESRPT report.
    2) Leave the concurrent program, Data Defintions and Template Definitions exactly as they are and run the report. Once the report has completed, select the Concurrent Request, click "Diagnostics" then click "View XML". This will open the XML in a new browser window. You can then right click, View Source and then save this document locally.
    You can then load this XML into the MS Word Template Builder and start building your template.
    I hope this helps.
    Regards,
    Cj

  • JNDI Lookup for multiple server instances with multiple cluster nodes

    Hi Experts,
    I need help with retreiving log files for multiple server instances with multiple cluster nodes. The system is Netweaver 7.01.
    There are 3 server instances all instances with 3 cluster nodes.
    There are EJB session beans deployed on them to retreive the log information for each server node.
    In the session bean there is a method:
    public List getServers() {
      List servers = new ArrayList();
      ClassLoader saveLoader = Thread.currentThread().getContextClassLoader();
      try {
       Properties prop = new Properties();
       prop.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
       prop.put(Context.SECURITY_AUTHENTICATION, "none");
       Thread.currentThread().setContextClassLoader((com.sap.engine.services.adminadapter.interfaces.RemoteAdminInterface.class).getClassLoader());
       InitialContext mInitialContext = new InitialContext(prop);
       RemoteAdminInterface rai = (RemoteAdminInterface) mInitialContext.lookup("adminadapter");
       ClusterAdministrator cadm = rai.getClusterAdministrator();
       ConvenienceEngineAdministrator cea = rai.getConvenienceEngineAdministrator();
       int nodeId[] = cea.getClusterNodeIds();
       int dispatcherId = 0;
       String dispatcherIP = null;
       String p4Port = null;
       for (int i = 0; i < nodeId.length; i++) {
        if (cea.getClusterNodeType(nodeId[i]) != 1)
         continue;
        Properties dispatcherProp = cadm.getNodeInfo(nodeId[i]);
        dispatcherIP = dispatcherProp.getProperty("Host", "localhost");
        p4Port = cea.getServiceProperty(nodeId[i], "p4", "port");
        String[] loc = new String[3];
        loc[0] = dispatcherIP;
        loc[1] = p4Port;
        loc[2] = null;
        servers.add(loc);
       mInitialContext.close();
      } catch (NamingException e) {
      } catch (RemoteException e) {
      } finally {
       Thread.currentThread().setContextClassLoader(saveLoader);
      return servers;
    and the retreived server information used here in another class:
    public void run() {
      ReadLogsSession readLogsSession;
      int total = servers.size();
      for (Iterator iter = servers.iterator(); iter.hasNext();) {
       if (keepAlive) {
        try {
         Thread.sleep(500);
        } catch (InterruptedException e) {
         status = status + e.getMessage();
         System.err.println("LogReader Thread Exception" + e.toString());
         e.printStackTrace();
        String[] serverLocs = (String[]) iter.next();
        searchFilter.setDetails("[" + serverLocs[1] + "]");
        Properties prop = new Properties();
        prop.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
        prop.put(Context.PROVIDER_URL, serverLocs[0] + ":" + serverLocs[1]);
        System.err.println("LogReader run [" + serverLocs[0] + ":" + serverLocs[1] + "]");
        status = " Reading :[" + serverLocs[0] + ":" + serverLocs[1] + "] servers :[" + currentIndex + "/" + total + " ] ";
        prop.put("force_remote", "true");
        prop.put(Context.SECURITY_AUTHENTICATION, "none");
        try {
         Context ctx = new InitialContext(prop);
         Object ob = ctx.lookup("com.xom.sia.ReadLogsSession");
         ReadLogsSessionHome readLogsSessionHome = (ReadLogsSessionHome) PortableRemoteObject.narrow(ob, ReadLogsSessionHome.class);
         status = status + "Found ReadLogsSessionHome ["+readLogsSessionHome+"]";
         readLogsSession = readLogsSessionHome.create();
         if(readLogsSession!=null){
          status = status + " Created  ["+readLogsSession+"]";
          List l = readLogsSession.getAuditLogs(searchFilter);
          serverLocs[2] = String.valueOf(l.size());
          status = status + serverLocs[2];
          allRecords.addAll(l);
         }else{
          status = status + " unable to create  readLogsSession ";
         ctx.close();
        } catch (NamingException e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
        } catch (CreateException e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
        } catch (IOException e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
        } catch (Exception e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
       currentIndex++;
      jobComplete = true;
    The application is working for multiple server instances with a single cluster node but not working for multiple cusltered environment.
    Anybody knows what should be changed to handle more cluster nodes?
    Thanks,
    Gergely

    Thanks for the response.
    I was afraid that it would be something like that although
    was hoping for
    something closer to the application pools we use with IIS to
    isolate sites
    and limit the impact one badly behaving one can have on
    another.
    mmr
    "Ian Skinner" <[email protected]> wrote in message
    news:fe5u5v$pue$[email protected]..
    > Run CF with one instance. Look at your processes and see
    how much memory
    > the "JRun" process is using, multiply this by number of
    other CF
    > instances.
    >
    > You are most likely going to end up on implementing a
    "handful" of
    > instances versus "dozens" of instance on all but the
    beefiest of servers.
    >
    > This can be affected by how much memory each instance
    uses. An
    > application that puts major amounts of data into
    persistent scopes such as
    > application and|or session will have a larger foot print
    then a leaner
    > application that does not put much data into memory
    and|or leave it there
    > for a very long time.
    >
    > I know the first time we made use of CF in it's
    multi-home flavor, we went
    > a bit overboard and created way too many. After nearly
    bringing a
    > moderate server to its knees, we consolidated until we
    had three or four
    > or so IIRC. A couple dedicated to to each of our largest
    and most
    > critical applications and a couple general instances
    that ran many smaller
    > applications each.
    >
    >
    >
    >
    >

  • Breadcrumbs - entry with multiple parents?

    I have a page that branches out into two pages depending upon a choice, and right after then connects back to the flow.
    like
                      .--> which cologne? ---,
    are you m/f? ---|                          |--> what packaging? --> what address?
                      `--> which perfume? ---'The bread crumbs do not allow you to have more than one parent... so while i can branch off to two lower pages, if they come back together then the parent has to be either cologne or perfume, or i have to make seperate pages, or use conditional showing on the one page for perfume and colgone and choose a generic name.
    Is there any way to create breadcrumbs with multiple parents? Is this a feature i should request for the next version?
    Cheers,
    Alex

    Hope this helps any one else trying to do this
    P14 real parent (view) --> P17
    P15 alt parent (edit) --> P17
    P200 dummy page
    step 1.
    create dummy page to hold variables P200
    create two items P200_NAME, P200_TARGET
    step 2.
    Edit the parent page 1 say P14
    edit the page to pass a name (say 'view' for instance) into P200_NAME and pass another value (14) into P200_TARGET
    Test this to make sure the session gets the values
    step 3.
    go to the real target page say P17 and take a note of the parent
    step 4.
    go to the parent page (there can omly be one)
    step 5.
    edit the bread crumb
    change the short name to &P200_NAME
    change the target to &P200_TARGET.
    step6
    go to the other patent (not referenced by the breadcrumb) P15 get it to pass values to P200 (on rout to P17)
    &P200_NAME (say 'edit')
    &P200_TARGET (15)
    because the target only has one real parent you dont have to do anything to the alternate parent breadcrumb.
    set these items P17_PROPERTY_NAME,P200_TARGET,P200_NAME
    with these values &P16_SLPN.,&P16_PROPERTY_NAME.,16,&P16_NAME.

  • Endless loop when clicking on ADF TreeTable Node with multiple Parents

    Using Jdev 11.1.2.2.0.
    I have been using the ADF Tree Table to render a parent/child relationship table(using EO's and VO's); this table allows a child node to have many parents. I've followed the example from Code Corner #32 "How to create a tree table from a single View Object and how to access selected rows" but my example is a little different. I have a Hierarchy Table that lists it's TopNode and then I have a Relationship (parent/child) table that includes the relationships for that hierarchy. I've created the ViewLinks between the Hierarchy VO and the Relationship VO and everything shows up fine in the ADF BC Tester.
    The tables look like the following (Note: the node 5 has multiple parents (4&3)
    Hierarchy Table:
    ID NAME TOPNODEID
    1 HIER1 1
    PARENTCHILDTABLE
    PARENT_ID CHILD_ID
    1 2
    1 3
    2 4
    4 5
    3 5
    -1 1
    The View Links I have setup are the (TopNodeID to ChildID... 1 to 1) as well as the (Child_Id to Parent_ID.. 1 to *).
    I added a tree table to a jsf page; I setup the bindings correctly with the Hierarchy vo as the top level object and the relationship VO as the parent/child (self referencing) table.
    However, when I start expanding some of the nodes at runtime in the JSF page and when I click on the child 5 an hour glass appears and it seems to be in an endless loop. Has anyone seen this before or anyone know why this gets into an endless loop.
    Edited by: user623583 on Aug 21, 2012 7:26 AM

    No exceptions occur but I was able to turn on logging (oracle.adf*) and this shows up. This is only a portion of what gets logged as it seems to log the same thing over and over while in the endless loop. The loop is intermittent too; it doesn't occur all the time. It seems to occur when I click on one of the duplicate nodes OR try to expand one of the duplicate nodes and/or one of their parents.
    <UIXRegion> <processEvent> RegionModel associated with component client ID: pt1:pt_region11
    <UIXRegion> <processEvent> RegionModel associated with component client ID: pt1:pt_region12
    <UIXRegion> <processEvent> RegionModel associated with component client ID: pt1:pt_region13
    <UIXRegion> <processEvent> RegionModel associated with component client ID: pt1:pt_region14
    <UIXInclude> <_tearDownIncludeContext> UIXInclude._tearDownIncludeContext() - Client ID: pt1
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext()
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext() - model var was being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to oracle_epm_view_view1PageDef
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext()
    <UIXInclude$ContextualFacesBeanWrapper> <getProperty> UIXInclude$ContextualFacesBeanWrapper.getProperty() - _inContext = false and key.getName() = value
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext() - model var is being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to ptb1
    <UIXInclude> <_setupIncludeContext> UIXInclude._setupIncludeContext() - Client ID: pt1
    <UIXInclude> <_tearDownIncludeContext> UIXInclude._tearDownIncludeContext() - Client ID: pt1
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext()
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext() - model var was being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to oracle_epm_view_view1PageDef
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext()
    <UIXInclude$ContextualFacesBeanWrapper> <getProperty> UIXInclude$ContextualFacesBeanWrapper.getProperty() - _inContext = false and key.getName() = value
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext() - model var is being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to ptb1
    <UIXInclude> <_setupIncludeContext> UIXInclude._setupIncludeContext() - Client ID: pt1
    <UIXInclude> <tearDownChildrenVisitingContext> UIXInclude.tearDownChildrenVisitingContext() - Client ID: pt1, called by oracle.adf.view.rich.component.fragment.UIXPageTemplate.tearDownChildrenVisitingContext at 275
    <UIXInclude> <_tearDownIncludeContext> UIXInclude._tearDownIncludeContext() - Client ID: pt1
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext()
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext() - model var was being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to oracle_epm_view_view1PageDef
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext()
    <UIXInclude$ContextualFacesBeanWrapper> <getProperty> UIXInclude$ContextualFacesBeanWrapper.getProperty() - _inContext = false and key.getName() = value
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext() - model var is being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to ptb1
    <UIXInclude> <setupChildrenVisitingContext> UIXInclude.setupChildrenVisitingContext() - Client ID: pt1, called by oracle.adf.view.rich.component.fragment.UIXPageTemplate.setupChildrenVisitingContext at 249
    <UIXInclude> <_setupIncludeContext> UIXInclude._setupIncludeContext() - Client ID: pt1
    <UIXInclude> <_tearDownIncludeContext> UIXInclude._tearDownIncludeContext() - Client ID: pt1
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext()
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext() - model var was being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to oracle_epm_view_view1PageDef
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext()
    <UIXInclude$ContextualFacesBeanWrapper> <getProperty> UIXInclude$ContextualFacesBeanWrapper.getProperty() - _inContext = false and key.getName() = value
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext() - model var is being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to ptb1
    <UIXInclude> <_setupIncludeContext> UIXInclude._setupIncludeContext() - Client ID: pt1
    <UIXInclude> <tearDownChildrenVisitingContext> UIXInclude.tearDownChildrenVisitingContext() - Client ID: pt1, called by oracle.adf.view.rich.component.fragment.UIXPageTemplate.tearDownChildrenVisitingContext at 275
    <UIXInclude> <_tearDownIncludeContext> UIXInclude._tearDownIncludeContext() - Client ID: pt1
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext()
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext() - model var was being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to oracle_epm_view_view1PageDef
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to oracle_epm_view_view1PageDef
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to oracle_epm_view_view1PageDef
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <DCBindingContainer> <internalRefreshControl> Lifecycle:BindingContainer.refresh type:prepare for:oracle_epm_view_view1PageDef
    <DCBindingContainer> <internalRefreshControl> Lifecycle:BindingContainer.refresh type:prepare for:ptb1
    <ADFLogger> <begin> Region refresh
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <ADFLogger> <end> Region refresh
    <ADFLogger> <begin> Region refresh
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <ADFLogger> <end> Region refresh
    <ADFLogger> <begin> Region refresh
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <ADFLogger> <end> Region refresh
    <ADFLogger> <begin> Region refresh
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <ADFLogger> <end> Region refresh
    <ADFLogger> <begin> Region refresh
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <ADFLogger> <end> Region refresh
    <ADFLogger> <begin> Region refresh
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <ADFLogger> <end> Region refresh
    <ADFLogger> <begin> Region refresh
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <ADFLogger> <end> Region refresh
    <ADFLogger> <begin> Region refresh
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <ADFLogger> <end> Region refresh
    <ADFLogger> <begin> Region refresh
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <ADFLogger> <end> Region refresh
    <ADFLogger> <begin> Region refresh
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <ADFLogger> <end> Region refresh
    <ADFLogger> <begin> Region refresh
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <ADFLogger> <end> Region refresh
    <ADFLogger> <begin> Region refresh
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <ADFLogger> <end> Region refresh
    <ADFLogger> <begin> Region refresh
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <ADFLogger> <end> Region refresh
    <ADFLogger> <begin> Region refresh
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <ADFLogger> <end> Region refresh
    <ADFLogger> <begin> Region refresh
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <ADFLogger> <end> Region refresh
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to oracle_epm_view_view1PageDef
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to oracle_epm_view_view1PageDef
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <FacesPageLifecycle> <getToken> ADFc: State-token for 'oracle_epm_view_view1PageDef' has been restored and is not null.
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ServletADFContext> <findApplicationScopeMap> The applicationScope Map returned
    <ADFContext> <getADFFacesViewScopeMap> oracle.adf.view.rich.context.AdfFacesContext used to get ViewScope
    <FacesPageLifecycle> <getToken> ADFc: State-token for 'oracle_epm_view_view1PageDef' has been restored and is not null.
    <UIXInclude$ContextualFacesBeanWrapper> <getProperty> UIXInclude$ContextualFacesBeanWrapper.getProperty() - _inContext = false and key.getName() = rendered
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext()
    <UIXInclude$ContextualFacesBeanWrapper> <getProperty> UIXInclude$ContextualFacesBeanWrapper.getProperty() - _inContext = false and key.getName() = value
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext() - model var is being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to ptb1
    <UIXInclude> <setupChildrenVisitingContext> UIXInclude.setupChildrenVisitingContext() - Client ID: pt1, called by oracle.adf.view.rich.component.fragment.UIXPageTemplate.setupChildrenVisitingContext at 249
    <UIXInclude> <_setupIncludeContext> UIXInclude._setupIncludeContext() - Client ID: pt1
    <UIXInclude$ContextualFacesBeanWrapper> <getProperty> UIXInclude$ContextualFacesBeanWrapper.getProperty() - _inContext = true and key.getName() = rendered
    <UIXInclude> <_tearDownIncludeContext> UIXInclude._tearDownIncludeContext() - Client ID: pt1
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext()
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext() - model var was being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to oracle_epm_view_view1PageDef
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext()
    <UIXInclude$ContextualFacesBeanWrapper> <getProperty> UIXInclude$ContextualFacesBeanWrapper.getProperty() - _inContext = false and key.getName() = value
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext() - model var is being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to ptb1
    <UIXInclude> <_setupIncludeContext> UIXInclude._setupIncludeContext() - Client ID: pt1
    <UIXInclude> <_tearDownIncludeContext> UIXInclude._tearDownIncludeContext() - Client ID: pt1
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext()
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext() - model var was being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to oracle_epm_view_view1PageDef
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext()
    <UIXInclude$ContextualFacesBeanWrapper> <getProperty> UIXInclude$ContextualFacesBeanWrapper.getProperty() - _inContext = false and key.getName() = value
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext() - model var is being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to ptb1
    <UIXInclude> <_setupIncludeContext> UIXInclude._setupIncludeContext() - Client ID: pt1
    <UIXInclude$ContextualFacesBeanWrapper> <getProperty> UIXInclude$ContextualFacesBeanWrapper.getProperty() - _inContext = true and key.getName() = logoImagePath
    <UIXInclude$ContextualFacesBeanWrapper> <getProperty> UIXInclude$ContextualFacesBeanWrapper.getProperty() - _inContext = true and key.getName() = logoImagePath
    <UIXInclude> <_tearDownIncludeContext> UIXInclude._tearDownIncludeContext() - Client ID: pt1
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext()
    <UIXPageTemplate> <_tearDownPageTemplateContext> UIXPageTemplate._tearDownPageTemplateContext() - model var was being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to oracle_epm_view_view1PageDef
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext()
    <UIXInclude$ContextualFacesBeanWrapper> <getProperty> UIXInclude$ContextualFacesBeanWrapper.getProperty() - _inContext = false and key.getName() = value
    <UIXPageTemplate> <_setupPageTemplateContext> UIXPageTemplate._setupPageTemplateContext() - model var is being managed by the component.
    <LoggingRequestWrapper> <setAttribute> Setting the value of 'bindings' to ptb1
    <UIXInclude> <_setupIncludeContext> UIXInclude._setupIncludeContext() - Client ID: pt1
    <UIXInclude> <_tearDownIncludeContext> UIXInclude._tearDownIncludeContext() - Client ID: pt1

  • Generate XML with tag names generated dynamically.

    Hi Mark,
    I want to generate xml in the following way using SQLXoperators.
    But only problem is when i use the operator, the tag name should be supplied before in hand as parameter.
    So it works well when the data for the tags are stored in seperate columns then its pretty simple.
    But lets say the whole hierarchy of the nodes is stored in one table with ID-->PARENTID relationship and the text is stored in a column called description.
    Now using CONNECT BY PRIOR i get the hierarchy and now based on the description value i have to generate the tags and then fill in the other details.
    This is just a summary of what i want. the below sample has much more than that and actual data comes from more than one table.
    But if i get the solution for what i asked before i think i can build the test of the thing.
    <?xml version="1.0" encoding="UTF-8"?>
    <SequenceData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SequenceData.xsd">
         <Header>
              <TemplateName>Template(XML)</TemplateName>
              <TemplateVersion>1.1</TemplateVersion>
              <CreatedUser>rsh2kor</CreatedUser>
              <CreatedDate>17-06-2005 12.12.22</CreatedDate>
         </Header>
         <List>
              <LoadPoints>
                   <LoadPoint description="Loadpoint1_in_list(level one)">
                        <SetPhase>
                             <SetPhaseVariables>
                                  <SetPhaseVariable>
                                       <Name>pRail</Name>
                                       <Unit>bar</Unit>
                                       <Value>100</Value>
                                       <SettlingTime>0.0</SettlingTime>
                                  </SetPhaseVariable>
                             </SetPhaseVariables>
                             <MonitoredVariables>
                                  <MonitoredVariable>
                                       <ID>12344<ID>
                                       <Name>MeasPoint</Name>
                                       <Unit>pascal</Unit>
                                       <Limit>10</Limit>
                                       <Tolerance>0.0</Tolerance>
                                       <Operator>&gt;</Operator>
                                       <AlertType>STOP</AlertType>
                                  </MonitoredVariable>
                             </MonitoredVariables>
                        </SetPhase>
                        <WaitPhase>
                             <WaitingTime>10</WaitingTime>
                             <MonitoredVariables>
                                  <MonitoredVariable>
                                       <Name>MeasPoint</Name>
                                       <Unit>pascal</Unit>
                                       <Limit>10</Limit>
                                       <Tolerance>0.0</Tolerance>
                                       <Operator>&gt;</Operator>
                                       <AlertType>STOP</AlertType>
                                  </MonitoredVariable>
                             </MonitoredVariables>
                        </WaitPhase>
                        <MeasPhase>
                             <MeasPhaseVariables>
                                  <MeasPhaseVariable>
                                       <Name>MeasPoint</Name>
                                       <Unit>pascal</Unit>
                                       <Result>0</Result>
                                  </MeasPhaseVariable>
                             </MeasPhaseVariables>
                        </MeasPhase>
                   </LoadPoint>
              </LoadPoints>
         </List>
         <Loop Iteration="5">
              <LoadPoints>
                   <LoadPoint description="Loadpoint2_in_Loop">
                        <SetPhase>
                             <SetPhaseVariables>
                                  <SetPhaseVariable LoopCount="1">
                                       <Name>pRail</Name>
                                       <Unit>bar</Unit>
                                       <Value>10</Value>
                                       <SettlingTime>0.0</SettlingTime>
                                  </SetPhaseVariable>
                                  <SetPhaseVariable LoopCount="2">
                                       <Name>pRail</Name>
                                       <Unit>bar</Unit>
                                       <Value>20</Value>
                                       <SettlingTime>0.0</SettlingTime>
                                  </SetPhaseVariable>
                                  <SetPhaseVariable LoopCount="3">
                                       <Name>pRail</Name>
                                       <Unit>bar</Unit>
                                       <Value>30</Value>
                                       <SettlingTime>0.0</SettlingTime>
                                  </SetPhaseVariable>
                                  <SetPhaseVariable LoopCount="4">
                                       <Name>pRail</Name>
                                       <Unit>bar</Unit>
                                       <Value>40</Value>
                                       <SettlingTime>0.0</SettlingTime>
                                  </SetPhaseVariable>
                                  <SetPhaseVariable LoopCount="5">
                                       <Name>pRail</Name>
                                       <Unit>bar</Unit>
                                       <Value>50</Value>
                                       <SettlingTime>0.0</SettlingTime>
                                  </SetPhaseVariable>
                             </SetPhaseVariables>
                             <MonitoredVariables>
                                  <MonitoredVariable>
                                       <Name>MeasPoint</Name>
                                       <Unit>pascal</Unit>
                                       <Limit>10</Limit>
                                       <Tolerance>0.0</Tolerance>
                                       <Operator>&gt;</Operator>
                                       <AlertType>STOP</AlertType>
                                  </MonitoredVariable>
                             </MonitoredVariables>
                        </SetPhase>
                        <WaitPhase>
                             <WaitingTime>10</WaitingTime>
                             <MonitoredVariables>
                                  <MonitoredVariable>
                                       <Name>MeasPoint</Name>
                                       <Unit>pascal</Unit>
                                       <Limit>10</Limit>
                                       <Tolerance>0.0</Tolerance>
                                       <Operator>&gt;</Operator>
                                       <AlertType>STOP</AlertType>
                                  </MonitoredVariable>
                             </MonitoredVariables>
                        </WaitPhase>
                        <MeasPhase>
                             <MeasPhaseVariables>
                                  <MeasPhaseVariable>
                                       <Name>MeasPoint</Name>
                                       <Unit>pascal</Unit>
                                       <Result>0</Result>
                                  </MeasPhaseVariable>
                             </MeasPhaseVariables>
                        </MeasPhase>
                   </LoadPoint>
              </LoadPoints>
              <List>
                   <LoadPoints>
                        <LoadPoint description="Loadpoint3_in_list(level two)">
                             <MonitoredVariables/>
                             <SetPhase>
                                  <SetPhaseVariables>
                                       <SetPhaseVariable>
                                            <Name>pRail</Name>
                                            <Unit>bar</Unit>
                                            <Value>100</Value>
                                            <SettlingTime>0.0</SettlingTime>
                                       </SetPhaseVariable>
                                  </SetPhaseVariables>
                                  <MonitoredVariables>
                                       <MonitoredVariable>
                                            <Name>MeasPoint</Name>
                                            <Unit>pascal</Unit>
                                            <Limit>10</Limit>
                                            <Tolerance>0.0</Tolerance>
                                            <Operator>&gt;</Operator>
                                            <AlertType>STOP</AlertType>
                                       </MonitoredVariable>
                                  </MonitoredVariables>
                             </SetPhase>
                             <WaitPhase>
                                  <WaitingTime>10</WaitingTime>
                                  <MonitoredVariables>
                                       <MonitoredVariable>
                                            <Name>MeasPoint</Name>
                                            <Unit>pascal</Unit>
                                            <Limit>10</Limit>
                                            <Tolerance>0.0</Tolerance>
                                            <Operator>&gt;</Operator>
                                            <AlertType>STOP</AlertType>
                                       </MonitoredVariable>
                                  </MonitoredVariables>
                             </WaitPhase>
                             <MeasPhase>
                                  <MeasPhaseVariables>
                                       <MeasPhaseVariable>
                                            <Name>MeasPoint</Name>
                                            <Unit>pascal</Unit>
                                            <Result>0</Result>
                                       </MeasPhaseVariable>
                                  </MeasPhaseVariables>
                             </MeasPhase>
                        </LoadPoint>
                   </LoadPoints>
              </List>
         </Loop>
    </SequenceData>
    Pls help as soon as possible.
    Thanks.

    I'm not Mark, but check out this article it may be helpful.
    http://www.oracle.com/technology/oramag/oracle/05-may/o35asktom.html
    In 10g there are other SQL statements besides connect by prior for parent child relationships.
    such as:
    CONNECT_BY_ROOT—returns the root of the hierarchy for the current row; this greatly simplifies our query. (See below for an example).
    CONNECT_BY_ISLEAF—is a flag to tell you if the current row has child rows.
    CONNECT_BY_ISCYCLE—is a flag to tell you if the current row is the beginning of an infinite loop in your hierarchy. For example, if A is the parent of B, B is the parent of C, and C is the parent of A, you would have an infinite loop. You can use this flag to see which row or rows are the beginning of an infinite loop in your data.
    NOCYCLE—lets the CONNECT BY query recognize that an infinite loop is occurring and stop without error (instead of returning a CONNECT BY loop error).

  • XML with multiple signature

    Hi,
    I use J2SE and I try to create a SIGNED XML file. I would know if is possible to generate a xml file with multiple digital signature(i.e. signs of two or more signers).
    Any help is appreciated.
    Thanks in advance.
    Ramengo.

    Many thanks to Bhushan Khaladkar fro the answer
    The following xsl works.
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:inp="http://xmlns.oracle.com/InvoiceIntegrationDemo">
    <xsl:template match="/">
    <html>
    <body>
    <table border="1">
    <tr bgcolor="#9acd32">
    <th>Customer Name</th>
    <th>Invoice Number</th>
    <th>Invoice Value</th>
    <th>Invoice Date</th>
    <th>Backoffice System</th>
    </tr>
    <xsl:for-each select="inp:InvoiceIntegrationDemoProcessResponse/Xxinvoice">
    <tr>
    <td><xsl:value-of select="customerName"/></td>
    <td><xsl:value-of select="invoiceNumber"/></td>
    <td><xsl:value-of select="invoiceValue"/></td>
    <td><xsl:value-of select="invoiceDate"/></td>
    <td>System XX</td> </tr>
    </xsl:for-each>
    </table>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>

  • Content based routing and XML with multiple objects

    I have some structure:
    <contracts>
      <contract>
         <department>1</department>
      </contract>
      <contract>
         <department>1</department>
       </contract>
      <contract>
         <department>2</department>
       </contract>
    </contracts>
    I need to route contract to 2 system based on <department> value:
    contracts/department = 1 --> System1
    contracts/department = 2 --> System2
    Will XI split my XML (based on Content Routing rules in ID) into 2 structures (with departmet=1 and department=2 accordingly) ?
    Or I have to perform 1ToN mapping? I don't like it bacause it will be diffucult to monitor hundred of messages.

    Alternatively if you donot like 1:n mapping and BPM.
    Create two message mappings in the IR
    1.Source :<contracts>
    <contract>
    <department>1</department>
    </contract>
    <contract>
    <department>1</department>
    </contract>
    <contract>
    <department>2</department>
    </contract>
    </contracts>
    Target:
    <contracts>
    <contract>
    <department>1</department>
    </contract>
    <contract>
    <department>1</department>
    </contract>
    Basically mapping generates a target structure which has only department 1.
    2.Same like step1 but the mapping should generate the XML with department = 2.
    Once requires steps are done in the ID , do the content based routing in the reciever determination and give the appropraite message mapping in the interface determination.
    That should your problem and also you will like doing it as it does not involve any split level mapping..:)

  • Generating XML with attributes using XSU

    Oracle document claims if the sql is:
    select empno as @empno from employee
    Using XSU to generate XML will produce and XML document with EMPNO as an attribute instead of element name. But this does not seem to work. There is an exception:
    <ERROR>oracle.xml.sql.OracleXMLSQLException: Character '&' is not allowed in an XML tag name.</ERROR
    Is there anything wrong or is there a work around

    Oracle document claims if the sql is:
    select empno as @empno from employee
    Using XSU to generate XML will produce and XML document with EMPNO as an attribute instead of element name. But this does not seem to work. There is an exception:
    <ERROR>oracle.xml.sql.OracleXMLSQLException: Character '&' is not allowed in an XML tag name.</ERROR
    Is there anything wrong or is there a work around

  • Generate XML with SAX (OutputFormat/XMLSerializer deprecated)

    Hi,
    I'm working on a project using an old code, written by don't-know-who, which generates XML code from data obtained at the moment, at run-time, and then returns it as a String.
    Recently, my project included a new version (2.9) of the xercesImpl.jar library, and now classes OutputFormat and XMLSerializer have become deprecated.
    I'd like to update the old code. Do you know how to modify my code in order to do exactly the same things with a "new" approach which is not deprecated?
    I tried to search in the net and I found this FAQ <http://xerces.apache.org/xerces2-j/faq-general.html#faq-6>, but I didn't understand at all how to convert my code. :(
    Here's a "semplified" version of my method:
    public String generateDocument() {
        OutputFormat of = new OutputFormat("XML", "UTF-8", true);
        of.setIndent(1);
        of.setIndenting(true);
        StringWriter sw = new StringWriter();
        XMLSerializer xs = new XMLSerializer(sw, of);
        try {
            ContentHandler hd = xs.asContentHandler();
            hd.startDocument();
            AttributesImpl atts = new AttributesImpl();
            atts.addAttribute("", "", "id", "CDATA", "1");
            hd.startElement("", "", "addressBook", atts);
            atts.clear();
            hd.startElement("", "", "name", atts);
            String s = "John";
            hd.characters(s.toCharArray(), 0, s.length());
            hd.endElement("", "", "name");
            hd.startElement("", "", "surname", atts);
            s = "Smith";
            hd.characters(s.toCharArray(), 0, s.length());
            hd.endElement("", "", "surname");
            hd.endElement("", "", "addressBook");
            hd.endDocument();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        return sw.toString();
    }This code returns a String with this content:
    <addressBook id="1">
      <name>John</name>
      <surname>Smith</surname>
    </addressBook>Thanks a lot.

    This is easy. You have to somewhen learn the basics of the Java XML APIs, e.g. the DOM API. Or fight like a man through
    http://java.sun.com/webservices/reference/tutorials/jaxp/html/dom.html
    http://java.sun.com/webservices/reference/tutorials/jaxp/html/intro.html
    http://java.sun.com/webservices/docs/1.6/tutorial/doc/index.html.

  • Generate Query in PLSQL to return Well Formed XML with Multiple records

    Hi there
    This is very urgent. I am trying to create a PLSQL query that should retrieve all records from oracle database table "tbl_Emp" in a well formed xml format. The format is given below
    *<Employees xmlns="http://App.Schemas.Employees" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">*
    *<Employee>*
    *<First_Name></First_Name>*
    *<Last_Name></Last_Name>*
    *</Employee>*
    *<Employee>*
    *<First_Name></First_Name>*
    *<Last_Name></Last_Name>*
    *</Employee>*
    *</Employees>*
    To retrieve data in above format, I have been trying to create a query for long time as below
    SELECT XMLElement("Employees",
    XMLAttributes('http://App.Schemas.Employees' AS "xmlns",
    *'http://www.w3.org/2001/XMLSchema-instance' AS "xmlns:xsi"),*
    XMLElement("Employee", XMLForest(First_Name, Last_Name)))
    AS "RESULT"
    FROM tbl_Emp;
    But it does not give me the required output. It creates <Employees> tag with each individual record which I don't need. I need <Employees> tag to be the root tag and <Employee> tag to repeat and wrap each individual record. Please help me in this as this is very urgent. Thanks.

    Hi,
    Please remember that nothing is "urgent" here, and repeating that it is will likely produce the opposite effect.
    If you need a quick answer, provide all necessary details in the first place :
    - db version
    - test case with sample data and DDL
    That being said, this one's easy, you have to aggregate using XMLAgg :
    SELECT XMLElement("Employees"
           , XMLAttributes(
               'http://App.Schemas.Employees' AS "xmlns"
             , 'http://www.w3.org/2001/XMLSchema-instance' AS "xmlns:xsi"
           , XMLAgg(
               XMLElement("Employee"
               , XMLForest(
                   e.first_name as "First_Name"
                 , e.last_name  as "Last_Name"
           ) AS "RESULT"
    FROM hr.employees e
    ;

  • Table View with Multiple Context Nodes

    I want to create a table-view consisting of an object composition, e.g. multiple business objects. The chtml:configCellerator -tag supports just one context node which corresponds to just one business object.
    How do you create a table composed by different objects, i.e. BTAdminH and BTAdminI ?
    Edited by: romanglass on May 18, 2010 4:07 PM

    Hi,
    I would suggest to create a new component and not to disturb the standard ones. Because the super class of the header context node (BTAdminH in your case) must be inherited from CL_BSP_WD_CONTEXT_NODE_DTV - Deep table view.
    The dependent nodes must be passed to return parameter rt_result of method GET_SUB_CNODE_DEFINITIONS.
    This cant be done via wizard. I just tried to replicate your scenario. Below are the steps,
    1. create a view with context node BTADMINH as tableview. Then change the super class of the context node to   CL_BSP_WD_CONTEXT_NODE_DTV.
    2. Add another context node BTADMINI and mark it as dependent to BTADMINH.
    3. Now change the super class of context node BTADMINI to CL_BSP_WD_CONTEXT_NODE_TV  (Table View).
    4. Redefine method GET_SUB_CNODE_DEFINITIONS in context node BTADMINH.
    In the view layout you should use cellerator and pass an iterator with interface IF_THTMLB_CELLERATOR_ITERATOR. The interface has a method RENDER_DEPENDANT_OBJECTS which returns the table of dependant objects.
    Regards,
    Arun
    Edited by: Arun Kumar on May 19, 2010 1:01 PM

  • XML with multiple signatures

    Hello,
    I am trying to find examples showing how I could implement multiple signatures from multiple signers within a single XML file. I read textual confirmation that this can be done, but I hanen't found an example of implementation so far.
    I would like to follow a "business-document-approval-along-hierarchy"-like process and produce an XML similar to the following:<NewIdea>
      <ApprovalCTO id="CTO">
        <ApprovalProjMngr id="ProjMngr">
          <ProgrammersIdea id="Programmer">...</ProgrammersIdea>
          <Signature id="Programmer">...</Signature>
        </ApprovalProjMngr>
        <Signature id="ProjMngr">...</Signature>
      </ApprovalCTO>
      <Signature id="CTO">...</Signature>
    </NewIdea>1. Is it possible in general to include multiple signatures in a single XML file?
    2. If yes, is the above a correct and suggested approach? Should I use enveloped or enveloping signature instead? Or is this irrelevant?
    3. If no, can this be done using multiple XML files with references of one into the other?
    4. Do you have any pointers to examples and sample code?
    5. I am using Apache XML Security. I guess since it conforms to the W3C XML-DigSig specification it could work for this case, right?
    Sorry for the many questions. Any suggestions are welcome.
    Thanks in advance.

    1 -- yes.
    2 -- There are no 100% correct and suggested approach. You can skin the cat anyway you want to.
    3 -- N/A
    4 -- Sample code to do what? You've already provided an XML file. If you want Parser codes go to w3schools.com. or Google them.
    5 -- no idea. Beyond my scope of little knowledges. :-)

  • Generate XML with answer values

    Hi Forum,
    I wnat to know if there is any function or method to generate a xml, a string, with the answer values. I want to generate this string to attach this survey with the all fields completed in an activity.
    Regards and thanks in advance,
    Mon

    Hi,
    you can use one of the following Classes for XML conversion.
    CL_PROXY_XML
    CL_CRM_XML_PROVIDER
    CL_CXF_XML_TOOLS
    Also if none of the above is useful, you can search one in SE24 with XML.
    There are lots and one will be definitely useful.
    Please reward with points in case helpful.
    Sharif.

  • Loading an XML with multiple nested tags

    I've got some problems dealing with loading a nested tags XML file.
    Let's suppose I have such a very simple myxml.xml file:
    <ROWDATA>
    <ROW>
      <EMPNO>7369</EMPNO>
      <ENAME>SMITH</ENAME>
       </ROW>
    <ROW>
      <EMPNO>7902</EMPNO>
      <ENAME>FORD</ENAME>
    </ROW>
    </ROWDATA>
    I can create the following table:
    create table EMP
    empno NUMBER(4) not null,
    ename VARCHAR2(10),
    and then inserting the XML file in this way:
    insert into EMP
        (empno, ename)
      select extractvalue (column_value, '/ROW/EMPNO'),
          extractvalue (column_value, '/ROW/ENAME'),
      from   table
               (xmlsequence
              (extract
               (xmltype
                 (bfilename ('MY_DIR', 'myxml.xml'),
                   nls_charset_id ('AL32UTF8')),
                 '/ROWDATA/ROW')))
    so as to get inserted two rows into my table:
    EMPNO   ENAME
    7369         SMITH
    7902         FORD
    Now, and this is my question, let's suppose I have such a “more difficult” XML:
    <ROWDATA>
    <ROW>
      <COMPANY>
        <EMPNO>7369</EMPNO>
        <ENAME>SMITH</ENAME>
        <EMPNO>1111</EMPNO>
        <ENAME>TAYLOR</ENAME>
      </COMPANY>
    </ROW>
    <ROW>
      <COMPANY>
       <EMPNO>7902</EMPNO>
       <ENAME>FORD</ENAME>
      </COMPANY>
    </ROW>
    <ROW>
      <COMPANY>
      </COMPANY>
    </ROW>
    </ROWDATA>
    In this case it seems to me things look harder 'cause for every row that I should insert into my table, I don't know how many “empno” and “ename” I'll find for each /ROW/COMPANY and so how could I define a table since the number of empno and ename columns are “unknown”?
    According to you, in that case should I load the whole XML file in an unique XMLType column and than “managing” its content by using EXTRACT and EXTRACTVALUE built-in funcions? But this looks a very difficult job.
    My Oracle version is 10gR2 Express Edition
    Thanks in advance!

    Here's a possible solution using a single pass through the XML data :
    with sample_data as (
      select xmltype(
        '<ROWDATA>
        <ROW>
          <COMPANY>
            <EMPNO>7369</EMPNO>
            <ENAME>SMITH</ENAME>
            <EMPNO>1111</EMPNO>
            <ENAME>TAYLOR</ENAME>
          </COMPANY>
        </ROW>
        <ROW>
          <COMPANY>
           <EMPNO>7902</EMPNO>
           <ENAME>FORD</ENAME>
          </COMPANY>
        </ROW> 
      </ROWDATA>'
      ) doc
      from dual
    select min(case when node_name = 'EMPNO' then node_value end) as empno
         , min(case when node_name = 'ENAME' then node_value end) as ename
    from (
      select trunc((rownum-1)/2) as rn
           , extractvalue(value(x), '.') as node_value
           , value(x).getrootelement() as node_name
      from sample_data t
         , table(
             xmlsequence(extract(t.doc, '/ROWDATA/ROW/COMPANY/*'))
           ) x
    group by rn ;
    I would be cautious with this approach though, as I'm not sure the ROWNUM projection is entirely deterministic.
    As Jason said, it's probably safer to first apply a transformation in order to get a more friendly format.
    For example :
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="node()|@*">
        <xsl:copy>
          <xsl:apply-templates select="node()|@*"/>
        </xsl:copy>
      </xsl:template>
      <xsl:template match="COMPANY">
        <xsl:apply-templates select="EMPNO"/>
      </xsl:template>
      <xsl:template match="EMPNO">
        <EMP>
          <xsl:copy-of select="."/>
          <xsl:copy-of select="following-sibling::ENAME[1]"/>
        </EMP>
      </xsl:template>
    </xsl:stylesheet>

Maybe you are looking for

  • Can you please help me figure out why Firefox is so slow on my brand new computer?

    Hi, my name is Michael Stevenson and I'm a long time Firefox user, but for the longest time Firefox has been extremely slow for me. I currently have a 4 month old PC that Firefox lags when opening tabs, scrolling pages, right clicking, typing, etc. T

  • Simple query takes time to run

    Hi, I have a simple query whcih takes about 20 mins to run.. here is the TKPROF forit:   SELECT     SY2.QBAC0,     sum(decode(SALES_ORDER.SDCRCD,'USD', SALES_ORDER.SDAEXP,'CAD', SALES_ORDER.SDAEXP /1.0452))   FROM     JDE.F5542SY2  SY2,     JDE.F4211

  • Signon user name field length

    Folks - this might be a VERY simple question, but here goes. We have been trying to confirm the userid length available in ECC6/etc. Knowing that this has been constrained in previous releases to a shorter field length, i.e.?12? chars...we want to be

  • Time Capsule is slow on my Network

    My Time Capsule is plugged into a Gigabit network yet it is operating at 10mps. Any ideas why. There is a Belkin switch between it and the BT router that is acting as the DCHP device. The Time Capsule is in Bridge mode. Any ideas?

  • Data Transfer (Newbie)

    Hi, I have an Oracle DB. I want to transfer the data from that DB to a second DB in the quickest most efficient way. I cannot buy any third party tools and don't want to rely on evaluations etc as I may have to perform similar tasks in the near futur