How to merge XML-Data of two variables of different namespace?

Hi all,
I am facing a problem manipulating XML data in a BPEL process. As I didn't get any response on my question in the BPEL forum, I decided to post it again in this forum. I am not very familiar with using XML up to this moment, so please don't blame me if this turns out to be a stupid question.
I have to combine information coming from 2 different sources (1st delivered by BPEL-client input "FileInfo", 2nd delivered by a ftp-adapter "FileData") for passing it to another service.
So there are 3 XSDs (2 in, 1 out), each with a different namespace. As every structure is composed of several elements, I don't want to copy them one by one. But when copying a whole node including child elements, the target structure yields empty nodes, because the target child elements maintain the source namespace!
Using 2 XSLT's works well for each input, but in combination, the last transformation deletes the information of the first one.
So, the only way to merge the data I figured out by now, is to use a XSLT for each input, transforming it into 2 separate Variables belonging to the same namespace and then copying the complete nodes of the two variables into the target (which of course belongs to the common namespace as well).
Although there is an inconsistent indexing of the namespaces (see example), happily all data can be accessed.
  <CommonData>
    <CommonData xmlns="http://TargetNamespace.com/CommonData">
      <FileInfo xmlns="http://TargetNamespace.com/CommonData">
        <Name>testfile2.txt</Name>
        <Size/>
        <DateReceived>2009-02-10T17:15:46+01:00</DateReceived>
      </FileInfo>
      <FileData xmlns:ns0="http://TargetNamespace.com/CommonData">
        <ns0:KOPF>
          <ns0:Id>1</ns0:Id>
          <ns0:Value>1</ns0:Value>
          <ns0:Text>Hier könnten Ihre Daten stehen -</ns0:Text>
        </ns0:KOPF>
        <ns0:POSI>
          <ns0:Id>1</ns0:Id>
          <ns0:Position>1</ns0:Position>
          <ns0:Value>1</ns0:Value>
          <ns0:Text>eins ----</ns0:Text>
        </ns0:POSI>
        <ns0:POSI>
          <ns0:Id>2</ns0:Id>
          <ns0:Position>2</ns0:Position>
          <ns0:Value>2</ns0:Value>
          <ns0:Text>zwei ----</ns0:Text>
        </ns0:POSI>
      </FileData>
    </CommonData>
  </CommonData>Now for the question:
Is this really the only way to merge variables? As it took 4 operations to achieve this, it seems to be too complicated, and therefore too inperformant to me.
BTW: In real life there would be up to 9999 positions with much more payload (in total up to several MBs) to be processed!
Having full control of the namespaces in this case, I could think of using one namespace for all XSDs too. But would this be a better solution? Is there a golden rule on using namespaces relating to design issues?
Any comments appreciated,
cheers, Marco

Well, if you only want to change namespace (no other changes) I would use a single generic XSL that changes the namespace for any XML document into a given target namespace, keeping the rest. That will require two transformation calls, but only one XSL. I'm afraid I don't have an example available, but if you google perhaps you can find it, I have seen it somewhere.
Normally when you have different namespaces the contents differ as well, though, and what you really want is a merge function. There is a way to pass two documents into a single XSL and that is to use parameters. You pass one source document the normal way and assign the other converted to a string to a paramter. You must use an assign with processXSLT in BPEL, not a transform activity. The processXSLT really takes three arguments and the third contains the parameters. Now to the difficulty - in the transformation you need to change the string into a nodeset (an XML document). In the current XPath version used by the platform there is no nodeSet function, but it is possible to write one in Java. If you have it you can select from both documents while building the third. I don't have an example handy and yes it is a bit messy as well, but much of the work only has to be done once and can be reused in other processes.

Similar Messages

  • How to merge XML-Data of two variables?

    Hi all,
    I have to combine information coming from 2 different sources (1st delivered by client input, 2nd delivered by ftp-adapter) for passing it to another service.
    So there are different namespaces for the three describing xsd's (2 in, 1 out). As every structure is composed of several elements, I don't want to copy them one by one . But when copying a whole node with child elements, the target structure yields empty nodes, because the target child elements obtain the source namespace!
    Using 2 XSLT's works well for each input, but in combination, the last translate deletes the information of the first one.
    So, the only way to merge the data I figured out by now, is to use a XSLT for each input transforming into 2 separate Variables belonging to the same namespace and then copying the complete nodes of the two variables into the target (which of course belongs to this namespace as well).
    Although there is an inconsistent indexing of the namespaces (see example), happily all data can be accessed.
      <CommonData>
        <CommonData xmlns="http://TargetNamespace.com/CommonData">
          <FileInfo xmlns="http://TargetNamespace.com/CommonData">
            <Name>testfile2.txt</Name>
            <Size/>
            <DateReceived>2009-02-10T17:15:46+01:00</DateReceived>
          </FileInfo>
          <FileData xmlns:ns0="http://TargetNamespace.com/CommonData">
            <ns0:KOPF>
              <ns0:Id>1</ns0:Id>
              <ns0:Value>1</ns0:Value>
              <ns0:Text>Hier könnten Ihre Daten stehen -</ns0:Text>
            </ns0:KOPF>
            <ns0:POSI>
              <ns0:Id>1</ns0:Id>
              <ns0:Position>1</ns0:Position>
              <ns0:Value>1</ns0:Value>
              <ns0:Text>eins ----</ns0:Text>
            </ns0:POSI>
            <ns0:POSI>
              <ns0:Id>2</ns0:Id>
              <ns0:Position>2</ns0:Position>
              <ns0:Value>2</ns0:Value>
              <ns0:Text>zwei ----</ns0:Text>
            </ns0:POSI>
          </FileData>
        </CommonData>
      </CommonData>Now for the question:
    Is this really the only way to merge variables? As it took 4 operations to achieve this, it seems to be too complicated, and therefore too inperformant to me.
    BTW: In real life there would be up to 9999 positions whith much more payload to be processed ;-)
    Any comments appreciated,
    cheers, Marco
    Edited by: MarcoSfromGER on 11.02.2009 08:43

    Well, if you only want to change namespace (no other changes) I would use a single generic XSL that changes the namespace for any XML document into a given target namespace, keeping the rest. That will require two transformation calls, but only one XSL. I'm afraid I don't have an example available, but if you google perhaps you can find it, I have seen it somewhere.
    Normally when you have different namespaces the contents differ as well, though, and what you really want is a merge function. There is a way to pass two documents into a single XSL and that is to use parameters. You pass one source document the normal way and assign the other converted to a string to a paramter. You must use an assign with processXSLT in BPEL, not a transform activity. The processXSLT really takes three arguments and the third contains the parameters. Now to the difficulty - in the transformation you need to change the string into a nodeset (an XML document). In the current XPath version used by the platform there is no nodeSet function, but it is possible to write one in Java. If you have it you can select from both documents while building the third. I don't have an example handy and yes it is a bit messy as well, but much of the work only has to be done once and can be reused in other processes.

  • How can I share data between two forms on different lists

    Using a custom content type, I created two lists that I want to share the same data - one is a calendar.  Our employees complete a form from the "Out of Office Request" list that has workflow functionality that sends an email to that person's
    manager.  If the manager approves the request, the item automatically populates the "Out of Office Calendar."  The problem is that the only information from the request list that populates the calendar is the Title field and date/time fields. 
    I need the manager name in order to create a view for each manager.  
    How can I connect the other information in the request list to the calendar list.  It seems to me that if the title and date fields carry over the information, there should be a way to connect the other information.  I'm using Designer.
    I've tried to connect the two lists' webparts with the wizard, but when I get to the page that maps the two lists, there are no column names and the "Next >" button is grayed out.  This seems like the logical place to connect the two lists,
    but it isn't working.

    Hi,
    According to your post, my understanding is that you wanted share data between two forms on different lists.
    To show external  information on the calendar event, there are two methods: Calculated column, workflow. You can refer to:
    A Simple Guide to Show More Information on a Calendar Event
    I recommend to use workflow to achieve what you want. But you need to create a people column to display the manager.
    You can create a workflow associated to the "Out of Office Request" list, add action to Start Approve Process. If the manager approves the request, you can create a item in the calendar, and then update the people column and the title column.
    Then the calendar will display the Title, date/time and the manager.
    To create a view for each manager, you need to modify the Filter. You can use the people column is equal to the manager name or the Title contains the manager name.
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to merge the data from two cubes into ODS?

    Hi,
    I wan to analyze the data of both the cubes by means of merging into an ODS.
    And i want to have one of the characteristic is used as a key for the purpose which is existing in both the cubes
    Cany nay one detail me of how this can be done?
    Thanks,
    Ravi

    Hi,
    If it is very needful.
    you can create the ODS object for each infocubes and map these ODS objects to target ODS object.
    or, you can create the Export datasources from each infocube and map these to new target ODS object which is having all the char and KF of both the infocubes.
    reg.
    Vis

  • How do you merge the data of two MIDI regions?

    How do you merge the data of two MIDI regions into one MIDI region without using copy and paste functions in the piano roll editor?

    Sorry - didn't make myself clear. The glue tool would be no good here. I meant that I wanted, for example, to merge the MIDI contents of two regions that are perhaps on different tracks but play back at the same time, i.e. I want to add the 2nd region's MIDI to the 1st region's MIDI, but without having to go into the piano roll editor and cut and paste the data.

  • How to share the data between two or more frames

    How to share the data between two or more frames based on the database relationship in JDeveloper?

    You can pass data between frames by passing it as parameters.
    That is when you are invoking another frame, pass your data as arguments through the constructor to that frame .
    You can also achieve this through static or public methods, but static variables as we know is not suggested which might occupy more memory space.
    Regards,
    Srinivasan AShwath
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by [email protected]:
    How to share the data between two or more frames based on the database relationship in JDeveloper? <HR></BLOCKQUOTE>
    null

  • How to parsing xml data in sql statement??

    Hi friends, I have a table which contain column as clob ,stores in xml format, for example my column contain xml data like this
    <Employees xmlns="http://TargetNamespace.com/read_emp">
       <C1>106</C1>
       <C2>Harish</C2>
       <C3>1998-05-12</C3>
       <C4>HR</C4>
       <C5>1600</C5>
       <C6>10</C6>
    </Employees>
      Then how to extract the data in above xml column data using SQL statement...

    Duplicate post
    How to parsing xml data in sql statement??

  • How to store xml data into file in xml format through java program?

    HI Friends,
    Please let me know
    How to store xml data into file in xml format through java program?
    thanks......
    can discuss further at messenger.....
    Avanish Kumar Singh
    Software Engineer,
    Samsung India Development Center,
    Bangalore--560001.
    [email protected]

    Hi i need to write the data from an XML file to a Microsoft SQL SErver database!
    i got a piece of code from the net which allows me to parse th file:
    import java.io.IOException;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import org.apache.xerces.parsers.SAXParser;
    import java.lang.*;
    public class MySaxParser extends DefaultHandler
    private static int INDENT = 4;
    private static String attList = "";
    public static void main(String[] argv)
    if (argv.length != 1)
    System.out.println("Usage: java MySaxParser [URI]");
    System.exit(0);
    String uri = argv[0];
    try
    XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
    MySaxParser MySaxParserInstance = new MySaxParser();
    parser.setContentHandler(MySaxParserInstance);
    parser.parse(uri);
    catch(IOException ioe)
    ioe.printStackTrace();
    catch(SAXException saxe)
    saxe.printStackTrace();
    private int idx = 0;
    public void characters(char[] ch, int start, int length)
    throws SAXException
    String s = new String(ch, start, length);
    if (ch[0] == '\n')
    return;
    System.out.println(getIndent() + " Value: " + s);
    public void endDocument() throws SAXException
    idx -= INDENT;
    public void endElement(String uri, String localName, String qName) throws SAXException
    if (!attList.equals(""))
    System.out.println(getIndent() + " Attributes: " + attList);
    attList = "";
    System.out.println(getIndent() + "end document");
    idx -= INDENT;
    public void startDocument() throws SAXException
    idx += INDENT;
    public void startElement(String uri,
    String localName,
    String qName,
    Attributes attributes) throws SAXException
    idx += INDENT;
    System.out.println('\n' + getIndent() + "start element: " + localName);
    if (localName.compareTo("Machine") == 0)
    System.out.println("YES");
    if (attributes.getLength() > 0)
    idx += INDENT;
    for (int i = 0; i < attributes.getLength(); i++)
    attList = attList + attributes.getLocalName(i) + " = " + attributes.getValue(i);
    if (i < (attributes.getLength() - 1))
    attList = attList + ", ";
    idx-= INDENT;
    private String getIndent()
    StringBuffer sb = new StringBuffer();
    for (int i = 0; i < idx; i++)
    sb.append(" ");
    return sb.toString();
    }// END PRGM
    Now , am not a very good Java DEv. and i need to find a soln. to this prob within 1 week.
    The next step is to write the data to the DB.
    Am sending an example of my file:
    <Start>
    <Machine>
    <Hostname> IPCServer </Hostname>
    <HostID> 80c04499 </HostID>
    <MachineType> sun4u [ID 466748 kern.info] Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 360MHz) </MachineType>
    <CPU> UltraSPARC-IIi at 360 MHz </CPU>
    <Memory> RAM : 512 MB </Memory>
    <HostAdapter>
    <HA> kern.info] </HA>
    </HostAdapter>
    <Harddisks>
    <HD>
    <HD1> c0t0d0 ctrl kern.info] target 0 lun 0 </HD1>
    <HD2> ST38420A 8.2 GB </HD2>
    </HD>
    </Harddisks>
    <GraphicCard> m64B : PCI PGX 8-bit +Accel. </GraphicCard>
    <NetworkType> hme0 : Fast-Ethernet </NetworkType>
    <EthernetAddress> 09:00:30:C1:34:90 </EthernetAddress>
    <IPAddress> 149.51.23.140 </IPAddress>
    </Machine>
    </Start>
    Note that i can have more than 1 machines (meaning that i have to loop thru the file to be able to write to the DB)
    Cal u tellme what to do!
    Even better- do u have a piece of code that will help me understand and implement the database writing portion?
    I badly need help here.
    THANX

  • How to pass XML data between applications

    Hi,
    can any one tell me how to pass XML data between applications
    Thanks in advance
    Sudheer

    Steve,
    I tried the code in the http package in the Appendix A section of your book. Each time i try a POST I get a HTTP/1.1 400 Bad Request error from the server. I can successfully do a GET from URLs. I have pretty much copied your code verbatim. Any ideas?
    Thanks,
    Sunder
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    See the "Working with XML Messages" section starting on page 242 of my Building Oracle XML Applications. It covers how to Send and Receive XML messages over the web through HTTP GET and HTTP POST as well as specifically Example 6-30 that illustrates how to receive a posted XML message in a servlet and process it.
    Hope this helps.<HR></BLOCKQUOTE>
    null

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

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

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

  • How do i link itunes between two computers with different Apple ID's

    how do I link itunes between two computers with different Apple ID

    You need to set up two user accounts on the mac.  System Preferences>Users & Groups.  Then each user can set up apple IDs for itunes and icloud any way they want.

  • How to Parse XML data directly from context variables in webdynpro

    Hello,
       I have two requirements:
    1) I have a context variable which has string value.
       I want to write the this value into a flat file.
       How do I do this in WebDynpro.
       Any sample code for this.
    2) In Webdynpro, I want to parse and process the XML data directly from a string context variable which
       has the value in XML format.
       How do I achieve this. Any pointers or sample codes for this.
    Thanks and Regards,
    Anupama.

    Anupama,
    Here is some link which talks about unpacking xml and converting to HTML.
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/eb/3dfb402eb5f76fe10000000a1550b0/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/eb/3dfb402eb5f76fe10000000a1550b0/content.htm</a>
    I have done something like this in portal development and not in webdynpro.But in principle it should work very where.

  • How to merge all parts of a variable without losing xml tags?

    Hi
    In my Bpel process I have I invoke an operation whose output variable is a multi-part variable. Due to some requirements , I need to merge the data from all the parts (without removing the XML tags) and return them in a single part Bpel output variable. So I'm using the below expression in the copy rule:
    concat(concat(concat(concat(concat('<body>',bpws:getVariableData('Function_OutputVariable','body')),'</body>'),
    '<header>'),bpws:getVariableData('Function_OutputVariable','header')),'</header>')
    But the resultant value (the culprit is getVariableData) is deprived of all xml tags in the output parts. For example if my operation output variable is of 2 parts as ::
    <Function_OutputVariable>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="body">
    <Function_Response_body xmlns:oans="http://xmlns.oracle.com/apps/fnd/rep/ws" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Return>
    <InterfaceFunction>
    <FunctionId>1024976</FunctionId>
    </InterfaceFunction>
    </Return>
    </oans:Function_Response_body>
    </part>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="header">
    <Function_Response_header xmlns:oans="http://xmlns.oracle.com/apps/fnd/rep/ws" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    Blah
    </oans:Function_Response_header>
    </part>
    </Function_OutputVariable>
    My resultant expression becomes
    <body> 1024976 SERVICEBEAN:/oracle/apps/fnd/rep/ws/IntegrationRepositoryService:getInterfaceFunction INTERFACE get InterfaceFunction Gets a InterfaceFunction based on its primary key attributes. NONE RESP getInterfaceFunction 1 PUBLIC ACTIVE R2V0cyBhIEludGVyZmFjZUZ1bmN0aW9uIGJhc2VkIG9uIGl0cyBwcmltYXJ5IGtleSBhdHRy aWJ1dGVz S S 509 </body>
    <header> blah </header>
    How to avoid this problem? Please advice.
    thanks,
    kannan

    iPhoto Library Manager  is the only application available that can merge libraries and keep albums as well as keywords, comments, places and other meta data.    Keepsakes like books and slideshows will come across as albums.
    The following is from the iPLM help file:
    What can and can't be copied
    Due to technical limitations with iPhoto, not every type of item in an iPhoto library can be copied to another library. The table below summarized what can and can't be copied in each version of iPhoto, with more details explanations of each item below. This applies to copying albums and events between libraries via drag and drop, merging libraries, and rebuilding a library.
    iPhoto 6 or earlier
    iPhoto 7
    iPhoto 8
    iPhoto 9
    Photos with basic metadata (rating, keywords, date, description, title)
    Unsupported
    Yes
    Yes
    Yes
    Modified versions of photos paired with originals
    Unsupported
    Yes
    Yes
    Yes
    Individual photo edits (e.g. cropping, filters, color adjustments, etc.)
    Unsupported
    No
    Yes
    Yes
    Places data
    Unsupported
    n/a
    Yes
    Yes
    Faces data
    Unsupported
    n/a
    Yes
    Yes
    Regular albums
    Unsupported
    Yes
    Yes
    Yes
    Folder albums
    Unsupported
    Yes
    Yes
    Yes
    Smart albums
    Unsupported
    Yes
    Yes
    Yes
    Events
    Unsupported
    Yes
    Yes
    Yes
    Keepsake items (books, slideshows, etc.)
    Unsupported
    No
    No
    No
    MobileMe galleries
    Unsupported
    iPhoto auto-syncs
    iPhoto auto-syncs
    iPhoto auto-syncs
    Facebook/Flickr galleries
    Unsupported
    n/a
    No
    iPhoto auto-syncs
    OT

  • How to read XML Data stored as Clob

    Hi
    I am new to clob & XML types...
    An XML data has been inserted into a Clob field in a Oracle(9.2.0.8.0) Table
    CREATE TABLE TEMP
    SNO NUMBER(5),
    STR_VAL LONG,
    CREATED_DT DATE DEFAULT sysdate,
    COL2 CLOB,
    COL3 SYS.XMLTYPE
    SELECT dbms_lob.getlength(col2) from temp
    ->24754
    SQL> select col2 from temp;
    COL2
    &lt;DataSet1&gt;
    &lt;TAGSDATATABLE&gt;
    &lt;TAG_NAME&gt;KST20001&lt;/TAG_NA
    If i use the above stmt it shows only pice of data
    how can i get the actual data from this column.
    could anyone help to get the data.
    Regards
    Prakash
    Edited by: user12957183 on Aug 25, 2010 12:25 AM

    Insert data in to XMLTYPE table from clob variable:
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2  my_clob CLOB := '<DataSet1><TAGSDATATABLE><TAG_NAME>KST20001</TAG_NAME>
      3  </TAGSDATATABLE><TAGSDATATABLE><TAG_NAME>KST20002</TAG_NAME></TAGSDATATABLE>
      4  <TAGSDATATABLE><TAG_NAME>KST20003</TAG_NAME></TAGSDATATABLE>
      5  <TAGSDATATABLE>
      6  <TAG_NAME>KST20004</TAG_NAME>
      7  </TAGSDATATABLE>
      8  <TAGSDATATABLE>
      9  <TAG_NAME>KST20005</TAG_NAME>
    10  </TAGSDATATABLE>
    11  <TAGSDATATABLE>
    12  <TAG_NAME>KST20006</TAG_NAME>
    13  </TAGSDATATABLE>
    14  <TAGSDATATABLE>
    15  <TAG_NAME>KST20007</TAG_NAME>
    16  </TAGSDATATABLE>
    17  <TAGSDATATABLE>
    18  <TAG_NAME>KST20008</TAG_NAME>
    19  </TAGSDATATABLE>
    20  <TAGSDATATABLE>
    21  <TAG_NAME>KST20009</TAG_NAME>
    22  </TAGSDATATABLE>
    23  <TAGSDATATABLE>
    24  <TAG_NAME>KST20010</TAG_NAME>
    25  </TAGSDATATABLE>
    26  <TAGSDATATABLE>
    27  <TAG_NAME>KST20009</TAG_NAME>
    28  </TAGSDATATABLE>
    29  </DataSet1>';
    31  BEGIN
    33  INSERT INTO my_tab1 VALUES(XMLTYPE(my_clob));
    34* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> desc my_tab1;
    Name                                                                                                                  
    TABLE of XMLTYPE
    SQL>
    -- For larger data:
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2  my_clob CLOB := '<DataSet1>
      3  <TAGSDATATABLE>
      4  <TAG_NAME>KST20001</TAG_NAME>
      5  </TAGSDATATABLE>
      6  <TAGSDATATABLE>
      7  <TAG_NAME>KST20002</TAG_NAME>
      8  </TAGSDATATABLE>
      9  <TAGSDATATABLE>
    10  <TAG_NAME>KST20003</TAG_NAME>
    11  </TAGSDATATABLE>
    12  <TAGSDATATABLE>
    13  <TAG_NAME>KST20004</TAG_NAME>
    14  </TAGSDATATABLE>
    15  <TAGSDATATABLE>
    16  <TAG_NAME>KST20005</TAG_NAME>
    17  </TAGSDATATABLE>
    18  <TAGSDATATABLE>
    19  <TAG_NAME>KST20006</TAG_NAME>
    20  </TAGSDATATABLE>
    21  <TAGSDATATABLE>
    22  <TAG_NAME>KST20007</TAG_NAME>
    23  </TAGSDATATABLE>
    24  <TAGSDATATABLE>
    25  <TAG_NAME>KST20008</TAG_NAME>
    26  </TAGSDATATABLE>
    27  <TAGSDATATABLE>
    28  <TAG_NAME>KST20009</TAG_NAME>
    29  </TAGSDATATABLE>
    30  <TAGSDATATABLE>
    31  <TAG_NAME>KST20010</TAG_NAME>
    32  </TAGSDATATABLE>
    33  <TAGSDATATABLE>
    34  <TAG_NAME>KST20009</TAG_NAME>
    35  </TAGSDATATABLE>
    36  <TAGSDATATABLE>
    37  <TAG_NAME>KST20009</TAG_NAME>
    38  </TAGSDATATABLE>
    39  <TAGSDATATABLE>
    40  <TAG_NAME>KST20009</TAG_NAME>
    41  </TAGSDATATABLE>
    42  <TAGSDATATABLE>
    43  <TAG_NAME>KST20009</TAG_NAME>
    44  </TAGSDATATABLE>
    45  <TAGSDATATABLE>
    46  <TAG_NAME>KST20010</TAG_NAME>
    47  </TAGSDATATABLE>
    48  <TAGSDATATABLE>
    49  <TAG_NAME>KST20009</TAG_NAME>
    50  </TAGSDATATABLE>
    51  <TAGSDATATABLE>
    52  <TAG_NAME>KST20009</TAG_NAME>
    53  </TAGSDATATABLE>
    54  <TAGSDATATABLE>
    55  <TAG_NAME>KST20009</TAG_NAME>
    56  </TAGSDATATABLE>
    57  <TAGSDATATABLE>
    58  <TAG_NAME>KST20009</TAG_NAME>
    59  </TAGSDATATABLE>
    60  <TAGSDATATABLE>
    61  <TAG_NAME>KST20010</TAG_NAME>
    62  </TAGSDATATABLE>
    63  <TAGSDATATABLE>
    64  <TAG_NAME>KST20009</TAG_NAME>
    65  </TAGSDATATABLE>
    66  <TAGSDATATABLE>
    67  <TAG_NAME>KST20009</TAG_NAME>
    68  </TAGSDATATABLE>
    69  <TAGSDATATABLE>
    70  <TAG_NAME>KST20009</TAG_NAME>
    71  </TAGSDATATABLE>
    72  <TAGSDATATABLE>
    73  <TAG_NAME>KST20009</TAG_NAME>
    74  </TAGSDATATABLE>
    75  <TAGSDATATABLE>
    76  <TAG_NAME>KST20010</TAG_NAME>
    77  </TAGSDATATABLE>
    78  <TAGSDATATABLE>
    79  <TAG_NAME>KST20009</TAG_NAME>
    80  </TAGSDATATABLE>
    81  <TAGSDATATABLE>
    82  <TAG_NAME>KST20009</TAG_NAME>
    83  </TAGSDATATABLE>
    84  <TAGSDATATABLE>
    85  <TAG_NAME>KST20009</TAG_NAME>
    86  </TAGSDATATABLE>
    87  <TAGSDATATABLE>
    88  <TAG_NAME>KST20009</TAG_NAME>
    89  </TAGSDATATABLE>
    90  <TAGSDATATABLE>
    91  <TAG_NAME>KST20010</TAG_NAME>
    92  </TAGSDATATABLE>
    93  <TAGSDATATABLE>
    94  <TAG_NAME>KST20009</TAG_NAME>
    95  </TAGSDATATABLE>
    96  <TAGSDATATABLE>
    97  <TAG_NAME>KST20009</TAG_NAME>
    98  </TAGSDATATABLE>
    99  <TAGSDATATABLE>
    100  <TAG_NAME>KST20009</TAG_NAME>
    101  </TAGSDATATABLE>
    102  <TAGSDATATABLE>
    103  <TAG_NAME>KST20009</TAG_NAME>
    104  </TAGSDATATABLE>
    105  <TAGSDATATABLE>
    106  <TAG_NAME>KST20010</TAG_NAME>
    107  </TAGSDATATABLE>
    108  <TAGSDATATABLE>
    109  <TAG_NAME>KST20009</TAG_NAME>
    110  </TAGSDATATABLE>
    111  <TAGSDATATABLE>
    112  <TAG_NAME>KST20009</TAG_NAME>
    113  </TAGSDATATABLE>
    114  <TAGSDATATABLE>
    115  <TAG_NAME>KST20009</TAG_NAME>
    116  </TAGSDATATABLE>
    117  <TAGSDATATABLE>
    118  <TAG_NAME>KST20009</TAG_NAME>
    119  </TAGSDATATABLE>
    120  <TAGSDATATABLE>
    121  <TAG_NAME>KST20010</TAG_NAME>
    122  </TAGSDATATABLE>
    123  <TAGSDATATABLE>
    124  <TAG_NAME>KST20009</TAG_NAME>
    125  </TAGSDATATABLE>
    126  <TAGSDATATABLE>
    127  <TAG_NAME>KST20009</TAG_NAME>
    128  </TAGSDATATABLE>
    129  <TAGSDATATABLE>
    130  <TAG_NAME>KST20009</TAG_NAME>
    131  </TAGSDATATABLE>
    132  <TAGSDATATABLE>
    133  <TAG_NAME>KST20009</TAG_NAME>
    134  </TAGSDATATABLE>
    135  <TAGSDATATABLE>
    136  <TAG_NAME>KST20010</TAG_NAME>
    137  </TAGSDATATABLE>
    138  <TAGSDATATABLE>
    139  <TAG_NAME>KST20009</TAG_NAME>
    140  </TAGSDATATABLE>
    141  <TAGSDATATABLE>
    142  <TAG_NAME>KST20009</TAG_NAME>
    143  </TAGSDATATABLE>
    144  <TAGSDATATABLE>
    145  <TAG_NAME>KST20009</TAG_NAME>
    146  </TAGSDATATABLE>
    147  </DataSet1>';
    148  l_xmltype xmltype;
    149  BEGIN
    150  --l_xmltype := my_clob;
    151  INSERT INTO my_tab1 VALUES(XMLTYPE(my_clob));
    152* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> Edited by: AP on Aug 25, 2010 4:46 AM

  • How to read XML data stored in CLOB in Concurrent prog Output

    Hi All,
    I'm trying to Generate the XML Data as concurrent Program output. I have a PL/SQL package which generated the XML data by using SQL/XML functions. I'm storing the generated XML data in a CLOB variable. But when i try to read the data using fnd_file.put_line(fnd_file.OUTPUT,XML_Data) it doesn't display data more than 32767 bytes.
    Please help me out to understand what could be done to read the data in chunks. I have tried many logic's to print chunks of data but the output tags are either chopped off and errors out saying Tag not found.
    My logic is as below:
    v_handler:= DBMS_XMLGEN.newContext(v_xml_query);
    --Sets NULL handling options
    DBMS_XMLGen.SetNullHandling(v_handler, dbms_xmlgen.EMPTY_TAG ) ;
    --Set special character handling
    DBMS_XMLGEN.setConvertSpecialChars(v_handler, TRUE);
    -- Specified whether to use an XML attribute to indicate NULLness of particular entity in the XML document
    DBMS_XMLGen.useNullAttributeIndicator(v_handler,TRUE);
    -- set Checking invalid chars
    DBMS_XMLGEN.setCheckInvalidChars(v_handler, TRUE);
    -- get the xml data as required
    v_xml_data:= DBMS_XMLGEN.getXMLtype(v_handler);
    SELECT XMLROOT(v_xml_data.extract('/*'),VERSION '1.0').getClobVal() into v_new_xml_Data from dual;
    -- get the length of the xml generated
    v_clob_len := dbms_lob.getlength(v_new_xml_Data);
    FND_FILE.PUT_LINE(FND_FILE.LOG,'The Clob length is :'|| v_clob_len);
    -- logic to process string more than 32767 Processing by each character
    v_offset :=1;
    while (v_offset <= v_clob_len)
    LOOP
    v_char := dbms_lob.substr(v_new_xml_Data, 1, v_offset);
    IF (v_char = CHR(10))
    then
    fnd_file.new_line(fnd_file.output, 1);
    else
    fnd_file.put(fnd_file.output, v_char);
    end if;
    v_offset := v_offset + 1;
    END LOOP;
    FND_FILE.PUT_LINE(FND_FILE.LOG,'The offset is :'|| v_offset);
    FND_FILE.NEW_LINE(FND_FILE.OUTPUT, 1);
    THe above logic is for character by character which is a performance burden? Please let me know if there is any other work around for this

    Hi,
    Thanks for Replying. I have refered http://blog.oraclecontractors.com/?p=69 and then i added that piece of code. Basically, i'm trying to generate a report using XML publisher. To generate the XML data i'm writing a pl/sql package with SQl/XML functions. DBMS_XMLGEN would help me convert the XML Data as is. When the concurrent program runs this XML data will merge with RTF layout and generate required report. I'm able to generate the Report for data less then 32767 bytes. More than the limit i need to pass chunks of XML data to read as output. That's the reason i'm using fnd_file.output. But it reads only 32767 size at a time.
    WHen i use the given logic, it works perfectly fine, but it loops for each character, for example if you have 30,000 characters it loops the same, which is peformance burden.
    So i tried to write the logic of chunks but still i get the error that XML tag is not found or missing. I'm hoping this is very common issue, but after all my trails, i didn't find the right solution.
    the other logic i tried was :
    v_new_xml_data varchar2(32767)
    v_iterations := CEIL(v_clob_len/v_chunk_length); -- v_chunk_length is 32767 and v_clob_length is length of the XML data stored inthe clob variable
    For i in 0..v_iterations
    LOOP
    FND_FILE.put_line (fnd_file.log,'the loops v_pos :'||i||' and v_clob_length :'||v_clob_len);
    v_new_xml_data := DBMS_LOB.SUBSTR ( V_XML_DATA,v_chunk_length,(i*v_chunk_length)+1);
    FND_FILE.PUT_LINE (FND_FILE.OUTPUT,v_new_xml_data); -- read the output for every 32767 chunks
    FND_FILE.PUT_LINE(FND_FILE.LOG, 'Chunk length is :'||((i*v_chunk_length)+1));
    END LOOP;
    FND_FILE.put_line (fnd_file.log,'out of loop');
    FND_FILE.put_line (fnd_file.log,'length of new xml is '||v_clob_len);
    Please, let me know if you need Further clarifications on the same.

Maybe you are looking for

  • Office Web Apps Error after SP 2013 September 2014 CU

    Hello  Everyone, I have a single front end and single SQL server for my SharePoint 2013 deployment.  I also have Office Web Apps setup and running.  However after installing SP 1 and the latest September 2014 CU it appears our users are seeing the be

  • [solved] resolutions missing after update to nvidia 302.17-1

    hello all, when i updated to the new nvidia proprietary drivers (302.17-1) all my resolutions went away except my max (1920x1200). here is my xorg.conf in its current state  xorg.conf so far i have tried  Option "UseEDIDFreqs" "false" that didn't do

  • Play video behind apps with AirPlay to AppleTV

    When Yosemite was first spoken about by Apple, one of the stated "features" that excited me was that you would be able to stream video from your Mac in the background to AppleTV while still working on your normal apps in the foreground. You could wat

  • Infoset query creation

    Hi Expert I want to know how to create infoset query in SAP CRM i request you to kindly provide some basic steps to initialize this thanks in advance vinay

  • Email loading issues

    I have a Droid X2 and regularly when accessing an email or the email mail accounts, the phone says loading for a while then kicks me out of the app. I have tried rebooting, taking the battery out, etc. Nothing seems to work except letting it sit for