Name Value pairs

Hi All,
I am trying to achieve the following using the graphical mapping tool.
Source:
rows..................0-unbounded
.....indicator1......1-1
.....indicator2......1-1
.....indicator3......1-1
Target:
Attributes...........0-unbounded
.....constant............1-1
.....field...................1-1
Sample Source xml:
<rows>
....<indicator1>Blue</indicator1>
....<indicator2>Large</indicator2>
....<indicator3>Hot</indicator3>
</rows>
In the target structure, I want to create name value pairs where constant1 is assigned constant 'Colour' and field1 is assigned indicator1.
My issue is that in the target structure, I also want to create new name value pairs for each of the values in the source. This is illustrated in the target document example below:
<Attributes>
......<constant>"Constant"</constant>
......<field>indicator1</field>
</Attributes>
<Attributes>
......<constant>"Constant"</constant>
......<field>indicator2</field>
</Attributes>
<Attributes>
......<constant>"Constant"</constant>
......<field>indicator3</field>
</Attributes>
An example would be (using the sample values above):
<Attributes>
......<constant>Color</constant>
......<field>Blue</field>
</Attributes>
<Attributes>
......<constant>Size</constant>
......<field>Large</field>
</Attributes>
<Attributes>
......<constant>Wash</constant>
......<field>Hot</field>
</Attributes>
Can this be achieved in the graphical mapping tool before I turn to xslt?
Please help!
Regards,
JS

Hi - I have marked as helpful answer but I fear that I did not make it clear in my original question...
The JDBC fragment below needs to be converted to the XML fragment... I am having difficulty doing this in the graphical interface.
Thank you for your helpful answer up to now.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Debtor_JDBC xmlns:ns0="urn:finance">
   <row>
      <NO_BUNDLE>1</NO_BUNDLE>
      <PROMPT_SHIP_TO>0</PROMPT_SHIP_TO>
   </row>
</ns0:Debtor_JDBC>
<?xml version="1.0" encoding="UTF-8"?>
<MASTER>
    <Debtors>
        <Attributes>
            <attributetype IsValueSet="1">1</attributetype>
            <name IsValueSet="1">No Bundle</name>
            <value IsValueSet="1">1</value>
        </Attributes>
        <Attributes>
            <attributetype IsValueSet="1">1</attributetype>
            <name IsValueSet="1">PromptForAddress</name>
            <value IsValueSet="1">0</value>
        </Attributes></Debtors>
</MASTER>

Similar Messages

  • HTTP adapter as receiver to POST name-value pairs - How to?

    Hi,
    Scenario: HTTP Sender <> XI <> HTTP receiver (Sync throughout; no BPM)
    In this scenario, a HTTP channel is configured to the target URL to post data.
    The message mapping results in a XML. HTTP posts the same XML to the target URL.
    However,the target URL expects data Posted as name-value pairs.
    eg. eid=45678&zip=11011&ename=Tom%20Lee
    How can we configure HTTP adapter channel to post XML data as
    name-value pairs (as in standard HTTP Form Post)?
    Any pointers?
    thanx,
    Pops

    Hi Udo,
    I currently have a solution (simpler than having a BP), but do not expect it to be the right way of doing.
    I am using Java Mapping to convert the XML structure into Name-Value pair. So the output of Mapping is a string like how HTTP post is expected. So the interface mapping having multiple mappings - firstly, the original Message mapping, and then the Java mapping to do the conversion. So, with a small extension, the solution is still kept simple.
    However, I thought the POST requirement to HTTP URLs would be a common requirement, and expected the HTTP adapter doing this conversion. So, I am still looking for a straight solution (without any custom extensions).
    Any one else faced this situation?
    Can't this be handled by HTTP Adapter?
    -- Pops V

  • Name-value pairs in SQL Tag

    Hi all,
    The problem in my code shown bellow is in "AND ? LIKE ?"
    since the name parameter cannot be ? in the name-value pairs
    But I really need the "name" param can be choosen by me :(
    Please help!! thks :)
    <sql:query var="plates" dataSource="${applicationScope.aod}">
    SELECT DISTINCT id, filename, project
    FROM xxxx
    WHERE project = ?
    AND ? LIKE ?
    <sql:param value="${param.project}"/>
    <sql:param value="${param.which}"/>
    <sql:param value="%${param.what}%"/>
    </sql:query>
    Cheers,
    George

    You would have to do it like this I think:
    <sql:query var="plates" dataSource="${applicationScope.aod}">
    SELECT DISTINCT id, filename, project
    FROM xxxx
    WHERE project = ?
    AND <c:out value="${param.which}"/> LIKE ?
    <sql:param value="${param.project}"/>
    <sql:param value="%${param.what}%"/>
    </sql:query>You then have to count on the param "which" generating correct SQL.

  • Name-value pairs in item editor

    I am setting up a datagrid that must have in some fields an itemEditor displaying a combobox with name/value pairs:
        <mx:DataGrid height="100%" width="100%" id="dgTaxa" editable="true">
                            <mx:columns>
                                <mx:DataGridColumn headerText="Codice" dataField="taxonCode" width="60"/>
                                <mx:DataGridColumn id="colFamily" headerText="Famiglia" dataField="family" width="80">
                                    <mx:itemEditor>
                                        <fx:Component>
                                            <mx:ComboBox width="80" labelField="familyId" dataProvider="{parentDocument.families}" >
                                            </mx:ComboBox>
                                        </fx:Component>
                                    </mx:itemEditor>
                                </mx:DataGridColumn>                           
                            </mx:columns>
                        </mx:DataGrid>
    This combobox has a dataprovider that it's this one:
    [Bindable]
    public var families:ArrayCollection = new ArrayCollection([
            { familyId:1, name:"cactacee"},
            { familyId:2, name:"liliacee"}
    My problem is that I want to show name as combobox labels, but get familyId as combobox values to send back to the webservice.
    Does anyone know how to help me?
    Thanks
    Paolo

    Thanks for the correct answer.
    I realized it's the right thing to be done.

  • Vertical Tables (name value pairs)

    I inherited the maintenance of a system built on Oracle. To make it 'configurable', the user data is stored in a single table as name value pairs. What I mean is, instead of creating a new table when the end user needs a new record type, all data is stored in a single table where one column is the record ID, one column is the attribute name, and another column is the value that is associated with that attribute.
    In other words, if I had a new record type that had two attributes, 'Name' and 'Age', instead of having a table that looks like this:
    Name Age
    Jim 10
    Joe 25
    John 45
    I have a table that looks like this:
    Record Attribute Value
    1 Name Jim
    1 Age 10
    2 Name Joe
    2 Age 25
    3 Name John
    3 Age 45
    This table can easily have several million records in it. As you can guess, the query statements are pretty tangled and run very slow.
    Does anyone have any clever ideas (aside from scrapping this approach and migrating to real tables) that can simplify this monster and improve its performance? Indexing helped the performance (it is now only awful instead of unusable), but it is still slow and a nightmare for us to maintain.
    Thanks,
    Ron

    Hi,
    But what do you enter in the value column in fixValues?
    Consider the input:
    <Pair>
    ........<Name>Vishal</Name>
    ........<Value>100</Value>
    </Pair>
    <Pair>
    ........<Name>Andy</Name>
    ........<Value>200</Value>
    </Pair>  and so on..
    Requirement is:
    If Name=Vishal, ABC(target field) should have corresponding Value(i.e 100 in this case)
    If Name=Andyl, XYZ(target field) should have corresponding Value(i.e 200 in this case)
    I did use fixValues, but always only ABC gets created properly. XYZ doesn't get created.

  • Convert name value pair to flat structure in Biztalk mapper

    Hi,
    I have an input xml file with name value pairs and have to access all the values in the same iteration to concatenate fname and lname and assign that to a fullname in the target schema.
    I am trying with logical eq functoid and value mapping flattening but i can't access both the fname and lname at the same time.
    Does any one have an idea on how to get this done?
    My input file is
    <?xml version="1.0" encoding="UTF-8"?>
    <InputData dateFormat="yyyyMMdd">
    <CharacteristicList>
        <characteristic>
          <name>fname</name>
          <value>hello</value>
        </characteristic>
        <characteristic>
          <name>lname</name>
          <value>world</value>
        </characteristic>
    </CharacteristicList>
    </InputData>
    And the output file is 
    <ns0:Root xmlns:ns0="http://test.Transforms.Schema1">
      <Test >
        <Fullname>Hello World</Fullname>
      </Test>
    </ns0:Root>
    Thanks
    Janardhan Reddy Bikka

    Hi Janardhan,
    All you need is Cumulative Concatenate functiod with logical & value mapping functiod as shown:
    Add a Logical-Equal functiod. Link name element as its first parameter. And add “fname” as second parameter.
    Add another Logical-Equal functiod. Link name element as its first parameter. And add “lname” as second parameter.
    Add a Logical-Or functiod. Link the Logical-Equal functiod from fname as its first parameter. And Link the Logical-Equal functiod from lname as its second parameter
    Add value mapping (not the flattening one) functiod and link Logical-Or functiod.
    Add Cumulative Concatenate functiod. Link value mapping functiod to Cumulative Concatenate functiod as its first parameter. And add “1” as the second parameter. This second parameter provides the scope.
    Connect Cumulative Concatenate functiod to the fullname parameter.
    Add a looping functiod and connect parent CharacteristicList in source and Test in destination.
    With this map, if I use the input instance(XML) file as you have shown, I would get output as below:
    <ns0:Root xmlns:ns0="http://test.Transforms.Schema1">
    <Test>
    <Fullname>helloworld</Fullname>
    </Test>
    </ns0:Root>
    if I use following input with more than one Characteristlist
    <?xml version="1.0" encoding="UTF-8"?>
    <InputData dateFormat="yyyyMMdd">
    <CharacteristicList>
    <characteristic>
    <name>fname</name>
    <value>hello</value>
    </characteristic>
    <characteristic>
    <name>lname</name>
    <value>world</value>
    </characteristic>
    </CharacteristicList>
    <CharacteristicList>
    <characteristic>
    <name>fname</name>
    <value>Ashwin</value>
    </characteristic>
    <characteristic>
    <name>lname</name>
    <value>Prabhu</value>
    </characteristic>
    </CharacteristicList>
    </InputData>
    I will get output as below:
    <ns0:Root xmlns:ns0="http://test.Transforms.Schema1">
      <Test>
        <Fullname>helloworld</Fullname>
      </Test>
      <Test>
        <Fullname>AshwinPrabhu</Fullname>
      </Test>
    </ns0:Root>
    FYI: I have shown another sample instance with more first name and lastname because, you'r requirement is to have names concatenated with in a CharacteristicList
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Translating a String (name value pair) to XML

    Hi Guys,
    I am trying to find an elegant way of translating a string containing name value pairs to XML within BPEL. The string looks as following:
    name=Bob
    dob = 28/09/1993
    This string has to be transformed to XML. Any of the two cases:
    either
    <root>
         <name>Bob</name>
         <dob>28/09/1993</dob>
    </root>
    or
    <root>
         <entry>
              <key>name</name>
              <value>BOB</value>
         </entry>
         <entry>
              <key>dob</name>
              <value>28/09/1993</value>
         </entry>
    </root>
    I am thinking of using embedded java for translation, but if there is any XPath function that can be used for that would be great. There is doTranslateFromNative but documentation is not descriptive enough and did not find anything on the web either.
    Thanks!

    Hi,
    Use substring-before(line,'=') and substring-after(line,'=') on each line in the string in an assign activity. Separate lines also with substring-before using a newline.
    Hope that helps.

  • Converting Name-Value pair to XML

    Hi,
    I have configured the proxy service to listen for "&" delimited HTTP post string. I have been able to tokenize the "&" delimited string and get the name-value pair as below:
    ============================================================
    <CUSTOMER>
    <param name="amp;STATE_NAME" value="abc_test" />
    <param name="amp;EMAIL_ADDRESS" value="[email protected]" />
    </CUSTOMER>
    =====================================================
    Now I want to convert this name-value pair into XML format to comply with the xml schema. Kindly suggest the way how can this be achieved?

    Hi Hisaak,
    Thanks for the pointer But I am not able to access the Name-Value pair to form the desired XML.
    The output of first action is below and assigned to "payload" variable.
    ================================================
    <query-params>
    <param name="Model1" value="model1_test"/>
    <param name="Option1" value="option1_test"/>
    <param name="Quantity1" value="quantity1_test"/>
    </query-params>
    =================================================
    In second assign action , I have used your given code and assigned to "Order" variable.
    =====================================================
    <Order>
    <Model1>{$payload//param[@name = Model1]/@value}</Model1>
    <Options1>{$payload//param[@name = Options1]/@value}</Options1>
    <Quantity1>{$payload//param[@name = Quantity1]/@value}</Quantity1>
    <Model2>{$payload//param[@name = Model2]/@value}</Model2>
    </Order>
    =====================================================
    But after testing , I got the following output:
    ================================
    <Order>
    <Model1/>
    <Options1/>
    <Quantity1/>
    <Model2/>
    </Order>
    ====================================
    The values didn't update. Let me know if I am missing anything.

  • Name-value pair

    Hi,
    The following data is encoded as a string of name value pairs separated by semi colons.
    ST 0.04398148148148148;AT 0.0625;SW 0.05555555555555555;TC 0.07523148148148148;GA 0.11921296296296297;AG 0.12037037037037036;CC 0.16203703703703703;CA 0.12615740740740738;AC 0.08680555555555555;AA 0.14699074074074076;
    I want to create ST,AT,TC .... as separate columns and store the values in those columns respectively. Can anyone tell me how can I extract the data into those columns from one single column. All the above data is stored in one single column - nucleotide.
    Thanks
    Suresh

    There is more than one way to slice a cabbage. Here is the pipelined function approach, if you're using Oracle 9i or higher.
    SQL> create or replace type nucleotide as object (code varchar2(4), amt number);
      2  /
    Type created.
    SQL> create or replace type nucleotide_nt as table of nucleotide
      2  /
    Type created.
    SQL> create table gene_data (nucleotide_text varchar2(4000))
      2  /
    Table created.
    SQL> insert into gene_data
      2  values ('ST 0.04398148148148148;AT 0.0625;SW 0.05555555555555555;'
      3  ||'TC 0.07523148148148148;GA 0.11921296296296297;AG 0.12037037037037036;'
      4  ||'CC 0.16203703703703703;CA 0.12615740740740738;AC 0.086805555'
      5  ||'55555555;AA 0.14699074074074076;')
      6  /
    1 row created.
    SQL>
    SQL> CREATE OR REPLACE FUNCTION split_nucleotides
      2      (p_string in varchar2)
      3      RETURN nucleotide_nt
      4      PIPELINED
      5  AS
      6      return_value nucleotide := nucleotide(null,null);
      7      remainder varchar2(4000);
      8      offset pls_integer;
      9  BEGIN
    10      remainder := p_string;
    11      LOOP
    12       return_value.code := substr(remainder, 1, instr(remainder, ' ')-1);
    13       remainder := substr(remainder, instr(remainder, ' ')+1);
    14       return_value.amt := to_number(substr(remainder, 1,instr(remainder, ';')-1 ));
    15       PIPE ROW (return_value);
    16   exit when instr(remainder, ' ') = 0;
    17       remainder := substr(remainder, instr(remainder, ';')+1);
    18     END LOOP;
    19     RETURN;
    20  END;
    21  /
    Function created.
    SQL>
    SQL> select * from table(select SPLIT_NUCLEOTIDES(nucleotide_text) from gene_data)
      2  /
    CODE        AMT
    ST   .043981481
    AT        .0625
    SW   .055555556
    TC   .075231481
    GA   .119212963
    AG    .12037037
    CC   .162037037
    CA   .126157407
    AC   .086805556
    AA   .146990741
    10 rows selected.
    SQL> Cheers, APC

  • What technology to use to store a huge list of name-value pairs?

    Hi:
    I have a list of name value pairs (the size of the list is ~500). I get the name from the request parameter, and depending on the value for that, I have to display images on my webpage.
    How should I go about this? Should I use a Hashtable to store the values or should I use an array or should I got for XML and some pattern matching or should I write to a text file and do some pattern matching?
    Please help.
    Thanks

    Did you mean huge (several million) or is 500 more like the number? For "huge" you use a database. For 500, if you want to access the value when you are given the name, you use a Map. Probably a HashMap would be best.

  • CF return name/value pairs???

    How can I get CF to return a name/value pair?
    (fwiw I'm working through Flash and PHP Bible but trying to substitute CF instead)

    Create a page abcd.cfm:
    <cfoutput>name1=1234</cfoutput>
    if you want to replace 1234 with a variable, it'd be something along the lines ...name1=#variablename#...
    Cheers
    Kai

  • Unrecognized name-value pair: log_set_config

    I am using BDB SQLITE and trying to configure in-memory logging and the contents of my DB_CONFIG file are
    add_data_dir ..
    log_set_config DB_LOG_IN_MEMORY on
    set_lg_bsize 1048576000
    set_lg_max 512000000
    set_cachesize 0 524288000 1
    #set_cache_max 0 524288000
    #set_open_flags DB_PRIVATE on
    I get the following error when trying to create a database
    unrecognized name-value pair: log_set_config
    ERROR: SQL logic error or missing database. ERRCODE: 1.
    Is there any issue with the way I have defined the paramater for DB_LOG_IN_MEMORY?
    Also can DB_PRIVATE parameter be used when using BDB SQLITE? I remember when I tried the last time it gave me error suggesting that the flag configuration was illegal.
    Please advice
    Edited by: user10942853 on Oct 22, 2010 8:13 AM

    user10942853 wrote:
    log_set_config DB_LOG_IN_MEMORY on
    Is there any issue with the way I have defined the paramater for DB_LOG_IN_MEMORY? The DB_LOG_IN_MEMORY flag documentation is available here: http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/envlog_set_config.html#log_set_config_DB_LOG_IN_MEMORY
    As you can see, there is no specification that you can use log_set_config in DB_CONFIG, I don't know where you took this from. What you can do, you can configure the DB_LOG_IN_MEMORY flag by using "set_flags db_log_inmemory" in the DB_CONFIG file.
    user10942853 wrote:
    Also can DB_PRIVATE parameter be used when using BDB SQLITE? I remember when I tried the last time it gave me error suggesting that the flag configuration was illegal.How did the exact message look like and what Oracle BDB release are you using?
    Thanks,
    Bogdan Coman

  • Need to retrive the name-value pair of concurrent request

    Hello All,
    I need to write a query that takes the concurrent request ID (executed concurrent request) as input and retrives the concurrent request parameter names and the values submitted to run that request.
    we have considered the following tables to acheive the result:
    fnd_descr_flex_col_usage_tl
    fnd_concurrent_requests
    fnd_concurrent_programs
    however unable to map the parameter name-value pairs properly.
    Thanks
    Krrish

    declangallagher .. I am sorry for not being very clear ...
    I am sorry for taking your time.But I appreciate your effort .and time ..
    I
    I have two servlets 1. result (existing) 2. preResult ( probable wrap around)
    The servlet
    1.result : takes in the Name and gets the result from the db ( Actually uses Castor and JDO ) to get the result
    and the GET is as follows
    http://128.173.99.68:8080/WebApplication/result?queryFor=Experiment&Name="john"
    where "queryFor" is for the name of the form and Name is the text in the VTL ( View)
    2.preResult is supposed to be a wrapper around the servlet "result" this takes in the ID from the user
    and is of the form
    http://128.173.99.68:8080/WebApplication/preResult?queryFor=Wrapper&ID="1234"
    There exists a DB mapping to ID and Name .
    So Instead of calling the result servlet ..I'll directly call the preResult servlet ...get the ID from the user ...
    and get the corresponding Name from the db
    ....here
    I wish to (If possible) tweak the "request" parameter
    change
    1.The queryFor value to Experiment
    2. add The Name="john"
    and send this to the result servlet so that it process it ...........

  • Remove a name/value pair from request

    Hi, guys:
    I am trying to programmatically remove a name/value pair from
    request in my jsp file. For example, if I have a path like
    the following:
    http://localhost:8080/mysampleweb/initpage?isHome=true
    If I want to remove "isHome=true" and produce the following
    path:
    http://localhost:8080/mysampleweb/initpage
    Is there a way to do it?
    regards,

    I think you can use respose.sendRedirect(request.getRequestURI())

  • Using JcomboBox name value pair

    Hi,
    I am designing a database system in Java using Swing for interfaces .. I have an issue with the ComboBox .. I was wondering if it is possible to have a name value pair for a combobox just like the html <select> tag .. becasue i am getting the data for the combobox from the database but I want it to display one column in the list and when chosen the value should be another field from the database.
    example: it should dispplay empFirstName .. nut when selected the value should be EmpID.
    Can someone hel me wtih this one ..
    thanks
    sandeep      

    You asked the same question in this thread:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=475554
    You were given answers and example code. If the answers and code are not what you need then you need to restate your question, to make your requirements clearer because you have been given the same answer three times.

Maybe you are looking for

  • How to print multiple sheets per page?

    Please advise how, if it is possible, to print multiple sheets per page with Acrobat 7.0 Pro.<br /><br />I have a PDF that's about 24" x 60". I'd like to make a "poor man's poster" by printing on several pages and taping them together -- sort of like

  • Problem running pform_report.jsp in Report Builder 9i

    I downloaded the .ZIP file from the Examples page on the otn site. I follow the instructions, but when I try opening up any of the files, it creates an error window "can not display window" and the whole program zapps out. was anyone successful in ru

  • List of invoices amount paid

    Hi, How can I see the list of invoices paid by a paymenlist batch. How can I see all batches. Is there a t-code for this. Thanks, Maikel

  • Backup failed because the network destination disk was ejected or disconnected unexpectedly!

    My time machine is stuck on 'Stopping backup'. The time machine widget gives the above reason: 'Backup failed because the network destination disk was ejected or disconnected unexpectedly!' Any idea what I can do to restore it? Many thanks John iMac

  • Keyboard glitch--number pad with SL

    One computer, two drives with two different OSX versions; one Leopard and one Snow Leopard. It keeps me from having all my eggs in one basket. One keyboard. The extended aluminum slab. Booting in SL causes the number pad's numbers to fail to work. Bo