Changing data in XML variable and appending tags in XML  document

Hi all,
I am new to weblogic Integrator . can any one help me concerning following problem
1. I get input XML message to my workflow which I stores in XML variable. after
some processing i want to change value of one tag in XML stored in XML variable.
How I can do thaat ?
2. I have some XML like
<root>
<child>
<a> </A>
</child>
<child>
</child>
</root>
and i want to append multiple such tag at run time . how i can do the same
in wli
Please let me know your suggestion
Kiran

For both cases I suggest you use XSLT.
Mike
"Kiran" <[email protected]> wrote in message
news:3c720cd2$[email protected]..
>
Hi all,
I am new to weblogic Integrator . can any one help me concerning followingproblem
1. I get input XML message to my workflow which I stores in XML variable.after
some processing i want to change value of one tag in XML stored in XMLvariable.
How I can do thaat ?
2. I have some XML like
<root>
<child>
<a> </A>
</child>
<child>
</child>
</root>
and i want to append multiple such tag at run time . how i can do thesame
in wli
Please let me know your suggestion
Kiran

Similar Messages

  • RH10 variable and build tag source file names

    I'm using RH10 and outputting to WebHelp. My company requires that I archive project source files to our CVS via Eclipse. I am not using RoboSource_Control and must use the company's development resources for archiving.
    Since archiving the initial project, I have been uploading only source files with modified dates.
    However, I have discovered that the files I thought were storing user variables and build tags are not the correct files to archive. Since I am uploading all files with a newer date and that's not working, I need to know the user variable source file name and the build tag source file name that stores the currently defined variables and build tags.
    I have already tried the WebHelp forum and was directed to this forum to pose the question because I'm looking for source file information instead of output file information.
    Thanks for your help!
    karen

    Yes, Eclipse does work that way. However, we do not use our development directory as the local Eclipse repository. I need to move changed files to the local repository (stores all source files in the project) so that Eclipse can upload changes to the server. Yes, this is planned redundancy.
    That said, it is not acceptable to spend the time copying all files in the large projects from the work folder to the local repository. I simply need to know which individual files to copy that include the currently defined variables and build tags. Note, we do not copy the SSL folder output files to our local source file repository, or other associated reference files that are not actually project source files.
    Can you find someone who knows which files I need?
    Thanks,
    karen

  • Hello, may I change data between iPad Air and other devices by cable connection (USB), (not using cloud) ?

    Hello, may I change data between iPad Air and other devices by cable connection (USB), (not using cloud) ?

    Do you mean you want to sync or transfer data using a cable? Between and iPad Air and what "other device"?

  • Appending tag to xml

    hi
    i have a xml, i m using SAX parser to parse it,I m able to parse But now I want to append the tag to each node
    THIS IS MY sample.xml
    <books>
    <book>
    <title>Advanced Java 2 How To Program</title>
    <author>Deitel and Deitel</author>
    </book>
    <book>
    <title>J2ME The Complete Reference</title>
    <author>James Keogh</author>
    </book>
    </books>
    I want to append the <code> tag so that my xml should look like this
    <books>
    <book>
    <code>10</code>
    <title>Advanced Java 2 How To Program</title>
    <author>Deitel and Deitel</author>
    </book>
    <book>
    <code>20</code>
    <title>J2ME The Complete Reference</title>
    <author>James Keogh</author>
    </book>
    </books>
    MY CODE IS->
    import org.xml.sax.*;
    import org.apache.xerces.parsers.SAXParser;
    import java.io.*;
    import java.net.*;
    public class SAXSample extends HandlerBase
         Locator locator;
         static public void main(String[] argv)
              try
                   if (argv.length != 1)
                   System.err.println("Usage: SAXSample filename");
                   System.exit(1);
                   SAXSample sample = new SAXSample();
                   Parser parser = new SAXParser();
                   parser.setDocumentHandler(sample);
                   parser.setErrorHandler(sample);
                   parser.parse(argv[0]);
              catch (Exception e)
              System.out.println(e.toString());
              }//main
    public void setDocumentLocator (Locator locator)
    System.out.println("SetDocumentLocator:");
    this.locator = locator;
    public void startDocument()
    System.out.println("StartDocument");
    public void endDocument() throws SAXException
    System.out.println("EndDocument");
    public void startElement(String name, AttributeList atts) throws SAXException
    System.out.println("StartElement:"+name);
    public void endElement(String name) throws SAXException
    System.out.println("EndElement:"+name);
    public void characters(char[] cbuf, int start, int len)
    System.out.print("Characters:");
    System.out.println(new String(cbuf,start,len));
    can any one help me
    thanx in advance

    Actually, from the example you posted, you want to add a whole <code> element, not just a <code> tag.
    But anyway, just parsing a document doesn't, and can't, modify the document in any way. You'll need to first change your logic to echo the input to a new document. Then, change your logic again so that after writing out the start tag for the <book> element, you write out the <code> element as well.

  • Deleting Message Type name and namespace tag from XML payload

    Hi Gurus,
    Need help. My payload looks like this
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns1:MT_O_sss xmlns:ns1="http://sap.com/xi/tm">
    - <Job>
       <Field name="xxxx" value="" />
      <Field name="xxx" value="" />
      <Field name="xxx" value="" />
       </Job>
      </ns1:MT_O_sss>
    But The soap webservice is expecting it in
    <?xml version="1.0" encoding="utf-8" ?>
    - <Job>
       <Field name="xxxx" value="" />
      <Field name="xxx" value="" />
      <Field name="xxx" value="" />
       </Job>
    I have to remove the message type name and namespace tag.
    So how can I achieve this. I am sending this payload using a Receiver Soap Adapter. Please help. I am kind of stuck.

    hi,
    you have to simply add one module in your communication channel
    that is XMLAnonymizerBean
    you can refer below for help:
    Remove namespace prefix or change XML encoding with the XMLAnonymizerBean
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm
    hope it helps.
    regards,
    ujjwal kumar

  • How can i initialize variables and append variable in bpelx:exec

    I want to know how to initialize variables in bpelx:exec.
    I try to use java embedded activities for dynamic sql query. But I meet some problems that cannot assign the data to tempVariable. because I don't initialize tempVariable. but I can't initial variables in java embedded actitvities. How can i initialize variables in bpelx:exec ?
    and I want to know to extend child Elment of tempVariables dynamically in bpelx:exec ?
    here is my source.
    <bpelx:exec name="callEmpDB" language="java" version="1.5">
    <![CDATA[
    String url = "jdbc:oracle:thin:@127.0.0.1:1521:wonchoi";
    String user = "scott";
    String passwd = "tiger";
    int index = 1;
    Connection conn = null;
    Statement stmt = null;
    ResultSet rs = null;
    Node node = null;
    try{                             
    conn = DriverManager.getConnection (url, user, passwd);
    stmt = conn.createStatement();
    String wherescript = "";
    Element empno = (Element)getVariableData("inputVariable","payload", "/client:selConnectDBProcessRequest/client:empno");
    Element ename = (Element)getVariableData("inputVariable","payload", "/client:selConnectDBProcessRequest/client:ename");
    Element job = (Element)getVariableData("inputVariable","payload", "/client:selConnectDBProcessRequest/client:job");
    Element deptno = (Element)getVariableData("inputVariable","payload", "/client:selConnectDBProcessRequest/client:deptno");
    String sql = "select empno, ename, job, mgr, hiredate, sal, comm, deptno from emp where 1 = 1 ";
    if(empno != null && empno.getTextContent() != null && !empno.getTextContent().equals("") )
    wherescript = wherescript + " and empno = " + empno.getTextContent() ;
    if(ename != null && ename.getTextContent() != null && !ename.getTextContent().equals("") )
    wherescript = wherescript + " and ename like '" + ename.getTextContent() +"' " ;
    if(job != null && job.getTextContent() != null && !job.getTextContent().equals("") )
    wherescript = wherescript + " and job = '" + job.getTextContent() +"' ";
    if(deptno != null && deptno.getTextContent() != null && !deptno.getTextContent().equals("") )
    wherescript = wherescript + " and deptno = " + deptno.getTextContent() ;
    sql = sql + wherescript;
    System.out.println("sql : "+sql);
    rs = stmt.executeQuery(sql) ;
    while (rs.next())
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:EMPNO", rs.getString("empno"));
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:ENAME", rs.getString("ename"));
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:JOB", rs.getString("job"));
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:MGR", (rs.getString("mgr")==null? "": rs.getString("mgr")));
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:HIREDATE", rs.getString("hiredate"));
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:SAL", rs.getString("sal"));
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:COMM", rs.getString("comm"));
    setVariableData("tempVariable", "payload", "/ns1:selEmpOutputCollection/child::*[position()="+index+"]/ns1:DEPTNO", rs.getString("deptno"));
    index++;
    }catch(SQLException sex){                          
    System.out.println("sql error");
    }catch(Exception ex){                             
    System.out.println("error");
    }finally{                             
    try{                      
    rs.close();
    stmt.close();
    conn.close();
    }catch(Exception ex){}
    }]]>
    </bpelx:exec>
    and here is tempVariable examples and schema.
    <tempVariable>
         <part name="payload">
              <selEmpOutputCollection>
                   <selEmpOutput>
                   <EMPNO/>
                   <ENAME/>
                   <JOB/>
                   <MGR/>
                   <HIREDATE/>
                   <SAL/>
                   <COMM/>
                   <DEPTNO/>
              </selEmpOutput>
              <selEmpOutputCollection>
         </part>
    </tempVariable>     
    <xsd:element name="selEmpOutputCollection" type="selEmpOutputCollection"/>
    <xsd:element name="selEmpOutput" type="selEmpOutput"/>
    <xsd:complexType name="selEmpOutputCollection">
    <xsd:sequence>
    <xsd:element name="selEmpOutput" type="selEmpOutput" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="selEmpOutput">
    <xsd:sequence>
    <xsd:element name="EMPNO" type="xsd:decimal" nillable="true"/>
    <xsd:element name="ENAME" type="xsd:string" nillable="true"/>
    <xsd:element name="JOB" type="xsd:string" nillable="true"/>
    <xsd:element name="MGR" type="xsd:decimal" nillable="true"/>
    <xsd:element name="HIREDATE" type="xsd:dateTime" nillable="true"/>
    <xsd:element name="SAL" type="xsd:decimal" nillable="true"/>
    <xsd:element name="COMM" type="xsd:decimal" nillable="true"/>
    <xsd:element name="DEPTNO" type="xsd:decimal" nillable="true"/>
    </xsd:sequence>
    </xsd:complexType>
    thanks

    My bpel project flow is as follows.
    First, I initalize the temp varialbe like this.
    <assign name="setInitialVar">
    <copy>
    <from>
    <ns1:selEmpOutput xmlns:ns1="http://lgesoa.lge.com/EmpSpec/types">
    <ns1:EMPNO/>
    <ns1:ENAME/>
    <ns1:JOB/>
    <ns1:MGR/>
    <ns1:HIREDATE/>
    <ns1:SAL/>
    <ns1:COMM/>
    <ns1:DEPTNO/>
    </ns1:selEmpOutput>
    </from>
    <to variable="tempVariable" part="payload"
    query="/ns1:selEmpOutputCollection/ns1:selEmpOutput"/>
    </copy>
    </assign>
    Second, get Data(ex. 10 Employee Information List) from DB for useing Java embedded activity.
    Third, assing employee info to tempVariable, then BPEL assign just only one Employee Information. and next data can't assign and the BPEL make an error.
    here is my error message..
    <2007-03-02 11:23:26,125> <ERROR> <default.collaxa.cube.engine> <BPELXExecLet::setVariableData>
    com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure}
    messageType: {null}
    parts: {{summary=oracle.xml.parser.v2.XMLElement@15f80b}}
         at com.collaxa.cube.xml.dom.DOMUtil.copy(DOMUtil.java:536)
         at com.collaxa.cube.engine.ext.BPELXExecLet.setVariableData(BPELXExecLet.java:721)
         at com.collaxa.cube.engine.ext.BPELXExecLet.setVariableData(BPELXExecLet.java:700)
         at bpel.selconnectdb.ExecLetBxExe4.execute(ExecLetBxExe4.java:160)
         at com.collaxa.cube.engine.ext.wmp.BPELXExecWMP.__executeStatements(BPELXExecWMP.java:49)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:195)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3271)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1697)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:184)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:269)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5244)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1083)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.createAndInvoke(CubeEngineBean.java:132)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.syncCreateAndInvoke(CubeEngineBean.java:161)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    I analyzed the problem. and I find the reason that is I just assing one XML flag to the temp variable. If i don't initalize the varaible like first step, BPEL make an error above error message.
    thanks
    Won.

  • Change Data Entry Template variable values using javascript

    Content ServerIs there a way to change the Data Entry Template's text/Integer variable values using javascript?

    I believe you're asking if you can change the value of a content item's property using Javascript (a content item is created from a data entry template, which defines the set of properties).
    Unfortunately there is not a way to permanently change it in the content item, since Javascript is executed client-side rather than on the server. However, if you're just interested in how the value is displayed in the published HTML, you could modify the presentation template to store the property value into a Javascript variable and then manipulate it to be displayed in whatever manner you wish.

  • Parse xml file and extract tags (not well formed)

    im writing an xml editor and i would like to extract tags from a string of xml. And the string doesnt have to be well formed xml.
    An example "</a><b asd="kjkj"></b>"
    Output
    end tag (a)
    start tag (b)
    end tag (b)
    Sax nor stax does the job since they want well formed document. and i dont want to write a parser myself.
    any suggestions

    im writing an xml editor and i would like to extract
    tags from a string of xml. And the string doesnt have
    to be well formed xml.Then you aren't writing an XML editor. And as you observe, existing parsers don't work for you because they are don't have the requirement to process garbage. Where did you get that requirement from, anyway?

  • Xml creation and copying information from multiple documents

    Hi
    I havent used java in at least a couple of years and im really rusty,
    i have a xml document that specifies the layout of a word document it has a specific table that needs to be filled,
    what i would like to do is design some code in java to
    (1)access a word document
    (2)copy some specific information from it and
    (3) paste this information into the xml sheet at appropriate locations so that i can populate the table,
    (4)i would also like for when there is more then one set of information for the table to be copied and pasted further down the word document so it can be populated, and this would continue till all elements from the origional document have been copied,
    i hope tha makes sense
    Its just i dont even know where to start

    Another approach, where you only need a subset of Flow A from various other documents, is to tag the source documents so that the subsets are uniquely identified by Condition Codes.
    In the documents that re-use the content, import the entire Flow A's from all the source documents, and switch off the conditions not of interest.
    I do this with domestic vs. export manuals, where the export manual body imports the entire Flow A of the domestic, and turns off the condition code for domestic-only content.
    Text inset caveats still apply.
    CC count could get unwieldy.

  • How to read XML file and write into another XML file

    Hi all, I am new to JAVAXML.
    My problem is I have to read one XML file and take some Nodes from that and write these nodes into another XML file...
    I solved, how to read XML file
    But I don't know how to Write nodes into another XML.
    Can anyone help in this???
    Thanks in advance..

    This was answered a bit ago. There was a thread called "XML Mergine" that started on Sept 14th. It has a lot of information about what it takes to copy nodes from one XML Document object into another.
    Dave Patterson

  • Comparing an excel file to and xml file and appending data to the xml file

    I have an xml file (mapsource) and an excel file. One of the columns in the excel file matches up with a node in the xml file. I want to be able to loop through both files and add a new node to the xml file where the one of the columns in the excel file matches a node in the xml file.
    I can create a query object out of the excel dosument using the cfspreadsheet tag.
    I'm able to use xmlparse to create a xml document object from the xml file.
    What I would like to do is add col_3 from the excel spreadsheet as a new node when col_2 is equal to gpx.wpt.name.xmltext of the xml object.
    Any help or direction would be very helpful!

    Hi,
    Thank you for your reply. But I have to attach an excel file from a particular path (C:\TEMP\TEST.XLS) and I have to send that excel file to the user inbox.That excel file has multiple sheets with data. Can you please provide me any code is available.
    Thanks and Regards
    venkat.

  • Scripting variables and custom tags

    Hello,
    I wonder how I could use a scripting variable in a custom tag? I have written a tag that formats number and dates, and would like to be able to do somethin like
    <% double x = 12,345; %>
    <x:write name="x" format="xyz" />
    Also I wonder how best to implement tags with parameters? I don't suppose it's possible to nest tags or scriplets in a way like <x:bla name="test" value="<%= 12345 %>" />? It seems tedious having to create an Object just to pass a Parameter.
    Many thanks in advance for any help!
    Bjoern

    I think I found the solution,
    pageContext.setAttribute(...,...)

  • How to read data from multiple files and append in columns in one file

    Hi Guys,
    I have a problem in appending data from files in different columns. I have attachement has file A and B which I am reading and not able to get data as in file Result.txt. Please comment on how can I do this
    Solved!
    Go to Solution.
    Attachments:
    Write to file.vi ‏13 KB
    A.txt.txt ‏1 KB
    B.txt.txt ‏1 KB

    You cannot append columns to an existing file. Since the data is arrange line-by-line as one long linear string in the file, you can only append rows. A new row needs to be interlaced into the original file, shifting everything else. If you want to append rows, you need to build the entire output structure in memory and then write all at once.
    (I also don't think you need to set the file positions, it will be remembered from the last write operation.)
    Unless the files are gigantic, here's what I would do:
    (Also note that some of your rows have an extra tab at the end. If this is normal, you need a little bit more code to strop out empty columns. I include cleaned up files in the attachment. I also would not call them A.txt.txt etc. A plain A.txt is probably sufficient.)
    EDIT: It seems Dennis's solution is similar )
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Write to fileMOD.zip ‏6 KB
    MergeColumns.png ‏6 KB

  • How to change value of instance variable and local variable at run time?

    As we can change value at run time using debug mode of Eclipse. I want to do this by using a standalone prgram from where I can change the value of a variable at runtime.
    Suppose I have a class, say employee like -
    class employee {
    public String name;
    employee(String name){
    this.name = name;
    public int showSalary(){
    int salary = 10000;
    return salary;
    public String showName()
    return name;
    i want to change the value of instance variable "name" and local variable "salary" from a stand alone program?
    My standalone program will not use employee class; i mean not creating any instance or extending it. This is being used by any other calss in project.
    Can someone tell me how to change these value?
    Please help
    Regards,
    Sujeet Sharma

    This is the tutorial You should interest in. According to 'name' field of the class, it's value can be change with reflection. I'm not sure if local variable ('salary') can be changed - rather not.

  • Reading a xml file and Extract content of xml tags

    Hi,
    I need a InDesign script to Extract content of xml tags by reading a local xml file. And stamping the content of xml on InDesign Text frame.
    My sample xml is as follows .
    <events type="array">
    <event> 
    <aktiv_jn>J</aktiv_jn> 
    <enetpulse_id>1712408</enetpulse_id>
    <event_id>65974</event_id>
    <hjemmehold>AZ Alkmaar</hjemmehold>
    <id>93</id>
    <kickoff>2014-08-17T12:30:00+01:00</kickoff>
    <land_id>140</land_id>
    <land_navn>Holland</land_navn>
    <liga_id>13684</liga_id>
    <liga_navn>Eredivisie</liga_navn>
    <livebetting_jn>J</livebetting_jn>
    <marked_id>2897740</marked_id>
    <marked_nummer>138</marked_nummer>
    <marked_tekst>AZ Alkmaar - Ajax</marked_tekst>
    <moderkamp_jn>J</moderkamp_jn>
    <ob_bet_type>MR</ob_bet_type>
    <odds_1>2.95</odds_1>
    <odds_2>2.25</odds_2>
    <odds_x>3.35</odds_x>
    <program_slut>2014-08-18T23:59:00+01:00</program_slut>
    <program_start>2014-08-15T00:00:00+01:00</program_start>
    <resultat>2</resultat>
    <spilstop_dato_tid>2014-08-17T12:30:00+01:00</spilstop_dato_tid>
    <sport_id>21</sport_id>
    <sport_navn>Fodbold</sport_navn>
    <taerskel nil="true"/>
    <udehold>Ajax</udehold>
    <udfald_1_id>9661951</udfald_1_id>
    <udfald_2_id>9661953</udfald_2_id>
    <udfald_x_id>9661952</udfald_x_id>
    </event>
    </events>
    And on my Indesign Page upon execution of script: I need text like,
    land_navn:     Holland
    odds_1:     2.95
    odds_2:     2.25
    odds_x:     3.35

    Hi,
    Try:

Maybe you are looking for

  • The Web Dynpro Application 'Appl' has expired.

    Hallo altogether, i am a newbie in this area. I maked a simple Web Dynpro with two views, only for navigation test and without data transport. Everybody view consist of two elements: one TXV_Field and one BTN_Element. V_ONE: TXV_ONE with a text "View

  • Windows 8.1 Keyboard Making a Clicking Noise and Not Writting

    My computer was working fine, But when I tried to write a message back to a friend on facebook, Every time I made a Key Stroke I would hear a clicking sound come from my computer and nothing would be typed on my computer, I have tried everything I co

  • Can't download lightroom 5 on OS X 10.9.4

    Hi, I've been trying to download Lightroom 5 but can't click the download button in Chrome. Also tried Safari and Firefox but they both give an error saying can't open the specified address. It's not my software version either. Getting pretty despera

  • Undo/Redo help please...

    I want to include undo/redo capabilities in my app. All the examples and code that I've seen deals with text. Can undo/redo handle undoing the move of an object(from one side of screen to the other), undoing the adding of a label or panel to a frame,

  • Cannot connect to update center

    I can't connect to JSC2 Update 1 Update center, even though i've setup the proxy setting and proxy port.. Last week I can connect to the Update center, it's prompt a username and password, but now I can't connect. Is there any log file for updating J