Add XML Tag to XML File (Idoc to XML File)

Hi there.
Just a question regarding the addition of a tag header in an XML file please?
Idoc - > XI -> file (XML File)
We have a need to add something like this below in bold to XML Tag Header in the inbound file:
<?xml version="1.0" encoding="UTF-8"?>
<?POSTEN SND="SE03220037090" SNDKVAL="1" REC="SE03220669500"
MSGTYPE="ORDERS"?>
Any ideas on how this can be managed would be apreciated please?
Thank you.
Mick.

Hi Carlos.
Thanks for your reply. I like what you are suggesting, however, I have no knowledge of Java and how to implement this Java addition to the mapping interface.
I would appreciate any hints you may have. The value that I am trying to add to the tag header is exactly as it is below(the value in bold) and it can in fact be fixed, i.e. I am not looking to dynamically determine the values in the additional tag but just add the value as it is below...
<?xml version="1.0" encoding="UTF-8"?>
<?POSTEN SND="SE03220037090" SNDKVAL="1" REC="SE03220669500"
MSGTYPE="ORDERS"?>
I would appreciate any input from you on that.
Thanks in advance Carlos.
Mick.

Similar Messages

  • Why some extra XML tags are created when viewed a XML in Adobe Illustrator with Esko plugin?

    We see some extra XML tags are created when viewing a XML in Adobe Illustrator with Esko plugin. Why these extra lines are created ?
    Screenshot of XML and XML viewed in AI below(the extra XML tags outlined in red):

    Hi Graffiti,
    Thanks so much for your resply.  I am happy to say that the problem has been fixed by my customer updating her version of Adobe Reader 9 to the latest version.  I had sent her a few suggestions on how to try to fix the problem including that one from info I had read on the forum etc.. and that was the solution that worked.  I am so relieved that I was able to fix the problem and to answer your question the blank pages were only graphics no text but they were the only pages that the graphics took up the whole page.  I thought that was strange and had her change a setting in preferences for printing large images a solution I read in the forum but it did not work.   

  • Splitting source xml tag value into parts in target xml

    Hi All,
    We have a requirement in our transformation as follows
    If you get String morethan 20 it should be split and assigned to target element.
    For example:
    There is one condition that the maximum lenght of the target element is 5.
    source xml:
    <test1>aassdfgghjkkll</test1>
    So the Target xml is should be like this
    <test2>aassd</test2>
    <test2>gghjk</test2>
    <test2>kll</test2>
    another example
    Source xml:
    <test1>qwert</test1>
    Target xmls
    <test2>qwert</test2>
    Thanks in Advance.
    Thanks and Regards,
    Nagaraju .D
    Edited by: user645787 on Feb 10, 2009 2:24 AM

    SQL> with Src_Data as (
      2    select XMLType('<test1>aassdfgghjkkll</test1>') as Src from dual union all
      3    select XMLType('<test1>qwert</test1>') as Src from dual
      4  )
      5  select XMLQuery(
      6      '
      7        for $s in 1 to (fn:string-length($Src) + 4) idiv 5
      8          let $substr := fn:substring($Src, ($s - 1) * 5 + 1, 5)
      9        return <test2>{$substr}</test2>
    10      '
    11      PASSING Src AS "Src"
    12      RETURNING CONTENT
    13    ).GetStringVal()
    14  from Src_Data
    15  ;
    XMLQUERY('FOR$SIN1TO(FN:STRING-LENGTH($SRC)+4)IDIV5LET$SUBSTR:=FN:SUBSTRING($SRC
    <test2>aassd</test2><test2>fgghj</test2><test2>kkll</test2>
    <test2>qwert</test2>Regards,
    Dima

  • Replace the XML Tags which are in binary format in 4.6C Version

    Hi Experts,
    I have an issue. I am working on 4.6 c version of sap. I have a requirement to send  ftp of an xml file. I created an internal table which has components of table type too ( For Line items ). After appending a record of sales order into the table I am using   SDIXML_DATA_TO_DOM ( To attach the to the document ) and SDIXML_DOM_TO_XML ( To convert the document contents into XML ( Binary Format ).
           CLASS cl_ixml DEFINITION LOAD.
          g_ixml = cl_ixml=>create( ).
          CHECK NOT g_ixml IS INITIAL.
          m_document = g_ixml->create_document( ).
          CHECK NOT m_document IS INITIAL.
          CALL FUNCTION 'SDIXML_DATA_TO_DOM'
            EXPORTING
              NAME               = 'xmldata'   " data in character format
              DATAOBJECT         = xmldata[]
           IMPORTING
             DATA_AS_DOM        = l_dom
           CHANGING
             DOCUMENT           = m_document
           EXCEPTIONS
             ILLEGAL_NAME       = 1
             OTHERS             = 2
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          CHECK NOT l_dom IS INITIAL.
          w_rc = m_document->append_child( new_child = l_dom ).
          IF w_rc IS INITIAL.
          WRITE 'OK'.
          ELSE.
          WRITE: 'ERR ='.
          ENDIF.
          CALL FUNCTION 'SDIXML_DOM_TO_XML'
            EXPORTING
              DOCUMENT            = m_document
            PRETTY_PRINT        = ' '
            IMPORTING
              XML_AS_STRING       = w_string
              SIZE                = w_size
            TABLES
              XML_AS_TABLE        = it_xml   " Final XML data ( with xml tags ( xml tags are the field names of internal table ) ) in bin
            EXCEPTIONS
              NO_DOCUMENT         = 1
              OTHERS              = 2
          IF SY-SUBRC = 0.
          WRITE 'OK'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ELSE.
          WRITE: 'ERR =',
          sy-subrc.
          ENDIF.
    So, it_xml has the binary format of XML data.
    Now the requirement is that I need to get rid of some XML tags in the final internal table XML data. Because by default, at the start of the the table row the <item> and </item> tags are inserted. This is automatically done in the Function module
    SDIXML_DOM_TO_XML.
    I want to find out the binary string of <item> and </item> and replace them by null binary string. I know how to replace the character strings but not for binary strings in 4.6 C.
    It is little bit urget. I would appreciate the quicker answer.

    Hi,
    check this program , I think this will help you
    TYPE-POOLS: ixml.
    TYPES: BEGIN OF xml_line,
    data(256) TYPE x,
    END OF xml_line.
    data : itab like catsdb occurs 100 with header line.
    data : file_location type STRING.
    data : file_name like sy-datum.
    data : file_create type STRING.
    file_name = sy-datum .
    file_location = 'C:\xml\'.
    concatenate file_location file_name into file_create.
    concatenate file_create '.XML' into file_create.
    DATA: l_xml_table TYPE TABLE OF xml_line,
    l_xml_size TYPE i,
    l_rc TYPE i.
    select * from catsdb into table itab.
    append itab .
    CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
    EXPORTING
    I_FIELD_SEPERATOR =
    I_LINE_HEADER =
    I_FILENAME =
    I_APPL_KEEP = ' '
    I_XML_DOC_NAME =
    IMPORTING
    PE_BIN_FILESIZE = l_xml_size
    TABLES
    i_tab_sap_data = itab
    CHANGING
    I_TAB_CONVERTED_DATA = l_xml_table
    EXCEPTIONS
    CONVERSION_FAILED = 1
    OTHERS = 24
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD cl_gui_frontend_services=>gui_download
    EXPORTING
    bin_filesize = l_xml_size
    filename = file_create
    filetype = 'BIN'
    CHANGING
    data_tab = l_xml_table
    EXCEPTIONS
    OTHERS = 24.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    write : 'INTERNAL TABLE DATA IS SUCCESSFULLY DOWNLOADED TO LOCATION', file_create .
    Thanks.

  • Automate flat IDOC to XML IDOC using one interface

    Hello all,
    We are currently going through a migration process where XI will be replacing a legacy system.  As part of our testing procedure, we are using historical data pairings from the legacy system and using an automated tool to compare if the interfaces we develop in XI match.  The catch is we need the data that we are comparing in XML format for the automated tool to be able to do the comparison, and unfortunately the legacy data is a flat format.  So now I would like to automate a way to convert this data to XML format.
    Specifically for IDOCs, I would like to have an interface which picks up the flat files, transforms them to XML, and then drops them back into another file directory in the XML format.  It would need to be able to pick up any kind of IDOC (given that XI has the metadata already imported), recognize what message type it is, then do the conversion.
    I have been reading on SDN and found that there is a standard tool to do the conversion, but it appears it can only handle one kind of IDOC at a time, and it appears it only picks up one specifically named file at a time.
    Has anybody tried to implement a scenario like this?  Any help is appreciated (A walkthrough would be the best!).
    Thanks in advance,
    Mike

    Mike,
    What version of PI will you be using? PI 7.11 can now auto-convert Flat File IDocs to XML IDoc and vice versa.
    Here is the documentation:
    http://help.sap.com/saphelp_nwpi711/helpdata/en/b5/bd93642dd3410f90ebea702399fac4/frameset.htm (flat to XML)
    http://help.sap.com/saphelp_nwpi711/helpdata/en/74/a45bc07e2043fb9b63295229178903/frameset.htm (XML to flat)
    I have not tried this personally, but seems like you might be able to use a "File to File" scenario with no mapping, and use the "IDOCFlatToXmlConvertor" Module in your File Adapter Comms Channel and it may just work, giving you files that are the IDoc XML version of the flat file it is reading. It looks like it does an RFC call to the back-end SAP system where the IDocs are originally from (or could be any system as long as you know the IDocs in there are identical), and reads the IDoc metadata (which has always included flat file field offsets for each IDoc Segment Field), and applies that either to convert from flat file IDoc to XML IDoc, or XML IDoc to flat file IDoc.
    It does mention that there is a limitation that there can only be one IDoc in the source flat file - could be a problem if you have many in one file, which is pretty typical.
    Regards,
    Brendan

  • Remove XML Tags with White space.

    Hi All, I have a scenario like the below code where I have empty spaces in few columns of my tables. I create XML of the data and send it. There is a lot of code such and I can't add ISNULL() on each and every column. Is there any simple one line code working
    with the XML so that I can remove the tags with only empty spaces. TIA.
    DECLARE @xml1 VARCHAR(max)
    DECLARE @xml2 VARCHAR(max)
    set @xml1 = (SELECT 1 AS Col11, ' ' AS Col21, 'ABC' AS Col31 FOR XML RAW, ELEMENTS)
    set @xml2 = (SELECT 2 AS Col12, ' ' AS Col22, 'ABC' AS Col32 FOR XML RAW, ELEMENTS)
    DECLARE @xml xml;
    SET @xml = Cast('<ROOT>' + ISNULL(@xml1, '') + ISNULL(@xml2, '') + '</ROOT>' as xml)
    SET @xml.modify('delete //*[not(node())]');
    -- Some Way to Remove the XML Tags with Empty space here.
    select @xml as XMLString
    /* Output of the Above script.
    <ROOT>
    <row>
    <Col11>1</Col11>
    <Col21> </Col21> -- This XML Tag with a white space should be removed
    <Col31>ABC</Col31>
    </row>
    <row>
    <Col12>2</Col12>
    <Col22> </Col22> -- This XML Tag with a white space should be removed
    <Col32>ABC</Col32>
    </row>
    </ROOT>
    Welcome to MSDN Forums.
    Feel free to ask your questions and Please Note to Vote all helpful topics and
    Mark all answering posts.
    You Value Community's efforts and Community values your faith.
    - Arun Kumar Allu

    It would have helped if there had been a trim() function in XQuery.
    With some trial and error and inventive thinking I came up with this:
    <span style="color:Blue">SET</span> @xml.modify(<span style="color:#A31515">'delete //*[. <= " "]'</span>);
    As they say: it seems to work. But I leave no warranties.
    Erland Sommarskog, SQL Server MVP, [email protected]
    Wow Erland  this
    seems to work, I need to test it against my data and update on this. Thanks again.
    Welcome to MSDN Forums.
    Feel free to ask your questions and Please Note to Vote all helpful topics and
    Mark all answering posts.
    You Value Community's efforts and Community values your faith.
    - Arun Kumar Allu

  • Search for, edit, and delete XML tag (Adobe InDesign Server CS5)

    Hi all,
    I'm working with Indesign Server CS5 and JavaScript, though having some trouble coming up with a solution to a problem...
    I need to build a JS script (called through SOAP) that will enable me to search an InDesign file for a given XML tag.
    Upon finding the XML tag, if the 'action' variable is set to delete, it should delete the tag and its contents.
    If the action is set to edit, it should change the contents of the tag to some user-specified content.
    The primary caveat is that the XML tag is variable, as is the XML structure of the InDesign file.
    Here's what I have in mind, in pseudocode:
    function findXMLTag(tag, action) {
         app.searchForTag(tag);
         if (tagIsFound) {
              if (action == "delete") {
                   tag.delete;
              } else if (action == "edit") {
                   tag.contents = "Updated content";
    Any help would be greatly appreciated!
    Thanks,
    Ben Kay

    'searchForTag' can be implemented as a recursive function.
    Recursion is defined like this: I thought, "I'll just search this forum for 'recursion'." The first post I found was one of my own, suggesting that the poster should search the forum for 'recursion'.
    Here is an example: find the XML Element [<email>]
    And another: Remove xml element using JS[CS3] (read carefully, as the OP got stuck on how to successfully remove an element and continue)
    And one, using XML Rules -- which I'm totally unfamiliar with, but may work for you: Changing Values in XML tags

  • Need help in extracting value from an xml tag.

    Hi ALL,
    Good Morning to all, i have problem in fetching a value from a xml tag. I have created a xml schema based on the schema i have created a xmltype table and inserted a value to the table. When i am trying to fetch a value from a particular tag i am unable to do so.. Kindly help me to solve this. Here by i am posting all the workings i have done...
    I am using the following client:
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 31 11:44:59 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ////////////////////////////////// XML Schema ///////////////////////
    begin
    dbms_xmlschema.registerSchema(
    'http://www.oradev.com/chipsxml.xsd',
    '<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oradev.com/chipsxml.xsd"
    xmlns:samp="http://www.oradev.com/chipsxml.xsd"
    version="1.0">
    <element name="Field1">
    <complexType>
    <sequence>
         <element name="UTI">
              <complexType>
              <sequence>
              <element name = "U01" type = "string"/>
              <element name = "U02" type = "string"/>
              <element name = "U03" type = "string"/>
              <element name = "U03a" type = "string"/>
              <element name = "U03b" type = "string"/>          
              <element name = "U03c" type = "string"/>          
              <element name = "U04" type = "string"/>                    
              <element name = "U05" type = "string"/>                    
              </sequence>
              </complexType>
         </element>
    </sequence>
    </complexType>
    </element>
    </schema>',
    TRUE, TRUE, FALSE, FALSE);
    end;
    ////////////////////////// Table which has multiple Column //////////////////////////
    CREATE TABLE chipsxmltable1 (
    id number, XMLDATA XmlType)
    XMLTYPE XMLDATA STORE AS OBJECT RELATIONAL
    XMLSCHEMA "http://www.oradev.com/chipsxml.xsd"
    ELEMENT "Field1";
    ///////////////////////////////// Insert Query in chipsxmltable //////////////////////////
    INSERT INTO chipsxmltable VALUES(
    xmltype.createxml('<?xml version="1.0"?>
    <samp:Field1 xmlns:samp="http://www.oradev.com/chipsxml.xsd" >
    <UTI>
    <U01>No</U01>
    <U02>Y</U02>
    <U03>Y</U03>
    <U03a>Y</U03a>
    <U03b>Y</U03b>
    <U03c>Y</U03c>     
    <U04>Y</U04>
    <U05>Y</U05>          
    </UTI>
    </samp:Field1>'));
    To show the data as a field with structure:
    1. Query:
    Select * from chipsxmltable1;
    Output:
    ID XMLDATA
    1 <?xml version="1.0"?>
    <samp:Field1 xmlns:samp="http://www.oradev.com/chipsxml.xsd">
    <UTI>
    <U01>No</U01>
    <U02>No</U02>
    <U03>Y</U03>
    <U03a>Y</U03a>
    <U03b>Y</U03b>
    <U03c>Y</U03c>
    <U04>Y</U04>
    <U05>Y</U05>
    </UTI>
    </samp:Field1>
    2. Query: (Both the query displays the same Output)
         SELECT X.xmldata.getClobVal() "XMLDATA" FROM chipsxmltable1 X;
         select extract(XMLDATA, '/Field1').getstringval() "XMLDATA" from chipsxmltable1 x;
    Output:
    XMLDATA
    <?xml version="1.0"?>
    <samp:Field1 xmlns:samp="http://www.oradev.com/chipsxml.xsd">
    <UTI>
    <U01>No</U01>
    <U02>No</U02>
    <U03>Y</U03>
    <U03a>Y</U03a>
    <U03b>Y</U03b>
    <U03c>Y</U03c>
    <U04>Y</U04>
    <U05>Y</U05>
    </UTI>
    </samp:Field1>
    To show the data as a single string without structure using "getstringval()":
    3. Query
         select extract(XMLDATA, '//text()').getstringval() "CHIPS - XML" from chipsxmltable1 x;
    OUtput:
    CHIPS - XML
    NoNoYYYYYY
    To show the data as a single string without structure using "getclobval()":
    4.Query
         select extract(XMLDATA, '//text()').getClobVal() "CHIPS - XML" from chipsxmltable1 x;
    Output:
    CHIPS - XML
    NoNoYYYYYY
    To show the data in a particular tag with/Without structure (Which is not working) using "EXTRACT" function:
    6.Query:
         select extract(XMLDATA, '/Field1/text()').getstringval() "XMLDATA" from chipsxmltable1 x;
         select extract(XMLDATA, '/Field1/UTI').getstringval() "XMLDATA" from chipsxmltable1 x;
         select extract(XMLDATA, '/Field1/UTI/U01').getstringval() "XMLDATA" from chipsxmltable1 x;
         select extract(XMLDATA, '/Field1/UTI/U01/text()').getstringval() "XMLDATA" from chipsxmltable1 x;
    Output:
    CHIPS - XML
    The above queries are not fetching the value.
    To show the data in a particular tag with/Without structure (Which is not working) using "EXTRACTVALUE" function:
    7. Query:
         select extractValue(XMLDATA, '/Field1/UTI') "XMLDATA" from chipsxmltable1 x;
         select extractValue(XMLDATA, '/Field1/UTI/U01') "XMLDATA" from chipsxmltable1 x;
    Output:
    X
    The above queries are not fetching the value.
    My question is:
    How to fetch values from xml tag when the value are inserted through xml schema?
    Apologies if the description is not clear. Kindly let me know if further details are needed. Many thanks for your help.
    Very best regards,
    Godwin Jebakumar C.V.

    Hi,
    You need to declare the namespace of each element used in the XPath expression, like this :
    SQL> select extractvalue( XMLDATA
      2                     , '/samp:Field1/UTI/U01'
      3                     , 'xmlns:samp="http://www.oradev.com/chipsxml.xsd"' ) "XMLDATA"
      4  from chipsxmltable1 x
      5  ;
    XMLDATA
    No
    SQL> select extract( XMLDATA
      2                , '/samp:Field1/UTI'
      3                , 'xmlns:samp="http://www.oradev.com/chipsxml.xsd"'
      4                ).getstringval() "XMLDATA"
      5  from chipsxmltable1 x
      6  ;
    XMLDATA
    <UTI>
      <U01>No</U01>
      <U02>Y</U02>
      <U03>Y</U03>
      <U03a>Y</U03a>
      <U03b>Y</U03b>
      <U03c>Y</U03c>
      <U04>Y</U04>
      <U05>Y</U05>
    </UTI>
    Please see EXTRACT and EXTRACTVALUE documentation :
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions051.htm#i1006712
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions052.htm#SQLRF06173
    BTW, "XMLDATA" is a pseudo-column used by Oracle. I don't know if it'll ever cause any conflict but maybe you should rename your column.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/pseudocolumns010.htm#SQLRF00256
    Regards.

  • Unknown PT XML tag 'gatewaylink

    Hi,
    I'm trying to use the gatewayLink tag within my code but it keeps returning 'unknown PT XML tag 'gatewaylink'. I have used the pt:URL tag before so i know that works on the current plumtree portal build we are using (5.04 and edk 2.2) and i have also tested pt:currenttime which also returns a correct value.
    I am using the tags directly in the html code:
    <pt:currentTime xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/'/>
    <pt:gatewaylink xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/' pt:fixurl="On" pt:objectID='10' pt:href="portlet.aspx">Click here</pt:gatewaylink>
    but receive this is in the source of the page:
    Apr 11, 2007 9:47:26 AM
    unknown PT XML tag 'gatewaylink Click here unknown PT XML tag 'gatewaylink
    (removed < - - - - > from arround each block of text either side of the click here as they do not show on the forum)
    i am trying to create a link to a specific portlet which will be accessible outside the standard portal interface but still gatewayed.
    can anyone help with this at all?
    Thanks
    Alex
    Edited by cannedfool at 04/11/2007 3:08 AM

    :-( let me just say,
    gatewayLink.

  • Alert Content for text without any XML tag

    Hi All,
    For the XML workflow,
    Need a alert content or select content for the text without any xml tag.
    Please help for my XML job request.
    Regards
    Siraj

    Hi All,
    New to XML, just learning stage only.
    Already I asked and got the coding through forum. It alert text frame ID only.
    But, guide me how to get the
    1. alert or select the contents.
    2. alert the page number or select text frame etc.
    Coding is below:
    #target InDesign
    #include "/Applications/Adobe InDesign CS6/Scripts/Xml Rules/glue code.jsx"
    main();
    exit();
    function main() {
              var myDoc = app.activeDocument;
              var myStories = myDoc.stories.everyItem().getElements();
              var idArray = new Array(0);
              var storyArray = new Array(0);
              // store all stories of the document in an array
              for(var j=0; j < myStories.length; j++) {
                        storyArray.push(myStories[j].id);
    // *** here start the XML-Rules ******************************//
              var elements = myDoc.xmlElements;
              var myRuleSet = new Array(
                        alleObj = new all(idArray)
              __processRuleSet(elements.item(0), myRuleSet);
    // *** here stop the XML-Rules *******************************//
              for (var i=0; i < idArray.length; i++) {
                        for (var k=0; k < storyArray.length; k++) {
                                  if (idArray[i] == storyArray[k]) {
                                            storyArray[k] = -1;
              for (var i=0; i < storyArray.length; i++) {
                        if (storyArray[i] > 0) {
                                  alert(storyArray[i]);
                        }          // if …
              }          // for()
    }          // main()
    // XML-Rule
    function all(idArray) {
              this.name = "all";
              this.xpath = "//*";
              this.apply = function(myElement, myRuleProcessor) {
                var storyId = myElement.parentStory.id;
                        var i=0, found = false;
                        while ((i < idArray.length) && (!found)) {
                                  if (idArray[i++] == storyId) found=true;
                        // store anly the number of the stories which are not stored up to now
                        if (!found) idArray.push(storyId);
                return true;
              }          // this.apply
    }          // all()
    Regards
    Siraj

  • How to Read XML tags....

    Hi guys...
    Can any one here tell me how to read the XML tag in PL/SQL.
    In table Enquiry there are following fields.
    Id          number
    Status          varchar2(5)
    Request          XML
    Reply          XML
    Error          varchar2(10)
    Now the following XML will be in request column from the requester.
    I have to get the,
    ->request which is in BODY tag,
    ->ID number which is in from tag (its the persons unique ID to check his BILL)
    Fetch the request from the database and updates it into the REPLY field with the same syntax.
    <message>
    <to> 123 </to>
    <from>789</from>
    <body> unbill </body>
    <messagenumber> 01 </messagenumber>
    </message>
    Can any one have the solution to this, how can I read the XML tags, process & again inserts as an XML.
    Thanks.

    Maybe something like this will be a pointer...
    SQL> CREATE TABLE t AS
      2  select 1 as id, 'C' as status, XMLTYPE('<message><to>123</to><from>789</from><body>unbill</body><messagenumber>01</messagenumber></message>') as request, XMLTYPE('<reply/>') as reply, 'NO ERROR' as error from dual
      3  ;
    Table created.
    SQL>
    SQL> SELECT * from t;
            ID S
    REQUEST
    REPLY
    ERROR
             1 C
    <message><to>123</to><from>789</from><body>unbill</body><messagenumber>01</messagenumber></message>
    <reply/>
    NO ERROR
    SQL>
    SQL> UPDATE t
      2  SET reply = updateXML(request,'/message/body/text()','bill')
      3  ;
    1 row updated.
    SQL>
    SQL> SELECT * from t;
            ID S
    REQUEST
    REPLY
    ERROR
             1 C
    <message><to>123</to><from>789</from><body>unbill</body><messagenumber>01</messagenumber></message>
    <message><to>123</to><from>789</from><body>bill</body><messagenumber>01</messagenumber></message>
    NO ERROR
    SQL>

  • Combing jstl/xml tags with jsf - can't pass parameter

    I'm using the jstl/xml tags to parse portions of an xml document. For some value of an attribute I want to render a search link, many of these links may be rendered on a page and I need to track which one has actually been selected using the id of the generating xml element.
    This is what I've tried, both using h:commandLink and a f:param and t:commandLink (tomahawk) and a t:updateActionListener.
    It doesn't seem to be possible to expose the resolved value of the xpath ="@id" in any way that either the tomahawk or core jsf tags can see.
    <x:when select="$control[@type='SEARCH']">
    <input type="text" id='<x:out select="@id"/>' disabled="true">
    <x:set var="selectedId" select="@id"/>
    <h:commandLink action="#{pack.search}" value="#{msg['actionPack.label.search']}" styleClass="linkNoUnderline">
    <f:param value="${selectedID}" name="selectedID"/>
    </h:commandLink>
    <%--<t:commandLink action="#{pack.search}" value="#{msg['actionPack.label.search']}" styleClass="linkNoUnderline">
    <t:updateActionListener property="#{pack.searchingId}" value="${searchId}"/>
    </t:commandLink>--%>
    </x:when>

    The JSF and JSTL tags don't really play well together.
    Particularly conditional and looping tags.
    My suggestion would be - if you're using JSF, don't use JSTL.
    You are right in that the JSF tags don't bother with the xpath expression.
    Would it be possible to shift the xml logic into an action/bean somewhere, and just present the jsp page with a list of relevant objects?
    If I understand you are trying to determine which link was clicked on a page? In the JSF action "pack.search"?
    What method of iterating are you using? an x:forEachLoop? A datatable?

  • IDOC to File, variable substitution on outbound message XML tag attributes

    My scenario is IDOC to FILE using XSL mappings.The target format is 2 XML tags (header, line) with the data stored in the attributes of each tag.
    EG. <header attr1=one attr2=two attr3=three><line attr1=one attr2=two /></header>
    The name of the file is dictated by an outbound attribute value in the header tag.
    Can I get access to it the attribute in the target message in the CC_FILE using variable substution. ?
    Currently I am not using content conversion as the XSL produces the file format needed, so I would pefer not to change the outbound message format/structure as this is going to an external party. I would prefer not to change the outbound format as this would need content conversion to strip the unwanted/information/processing node that is used for this purpose (file naming).
    The name is a calculation of fields in the IDOC and is not explicit dictated (business logic is applied in the mapping to get the file name), so I would prefer to use the attribute of the resulting XML to keep the "business logic" in the XSL..
    Things that cannot be changed.... 1. Must use XSL.for mapping. 2. Format cannot be changed of the outbound message. 3. Would prefer not to involved content conversion to keep formatting/node structure in the XSL mapping.
    I have seen some reference to this being possible on the forums but nothing solid from what Ive read.
    Something like var1 = payload:/Header/@attr1 in variable sub to get at the attribute
    Any comments ?
    Thanks in advance.
    One final piece of info. its on a PI 7.1 system.

    I think its best explained by my other thread Link:PI 7.1 Access to Dynamic Configuration through Java Class .
    Thanks for the link I have already implemented based on that link but the one crucial difference is that it is implemented using a static method with no reference to the actual object (payload) for Dynamic configuration. It seems that without the 7.0 API which isnt available in 7.1 by default XSL with java extentions is limited to static methods. If you could read the other thread it certainly is possible I'm mistaken.

  • Add name of file as XML tag

    I want to add the name of the document as an XML tag at the top level just below root, is this possible in javascript?

    yes it is
    function main() {
      var doc, root, xe, t;
      if ( !app.documents.length ) return;
      doc = app.activeDocument;
      root = doc.xmlElements[0];
      t = doc.xmlTags.itemByName ("doc");
      !t.isValid && t = doc.xmlTags.add("doc");
      xe = root.xmlElements.add(t );
      xe.contents = doc.name;
    main();
    HTH,
    Loic
    http://www.ozalto.com

  • Regarding receiver determination problem in IDOC-XI-XML file scenario

    Dear All ,
    In IDOC-XI-xml file scenario , I have configured SLD , IR . But in ID , after file adapter , reciever agreement configuration when I am doing receiver determination configuration I am not able to insert mapping program in configuration overview of receiver determination as I am not getting "New Specific" option in mapping .
    Can anybody suggest what could be the reason behind this .
    Thanks in Advance
    Prabhat

    Hi PRabhat,
    In RCVR determination, you need to select the party & service (as appropriate) save the obeject
    then refresh the configuration overview of recr det.
    then you can see the partner/service
    then you can open it & add the necessary objects.
    Regards
    Vishnu

Maybe you are looking for