Getting Tag and value from the selected Xml element value

Hi All,
I have an xml file which i import to the Indesign CS3 .From the structure view , i drag and drop the root node on to the page. Now i select an xml value from the page. Now i need to get the element tag and value from the selected value.
For example
File Name : sample1.xml
<Root>
<employeeName> A</employeeName>
<employeeEmail>[email protected]</employeeEmail>
</Root>
Now i import this sample.xml in my indesign CS3 and from the structure view i drag the Root  tag and drop it on the page.Now the values of the element tag are displayed.
Now i select "[email protected]" from the page and i have a menu "Get Selected XML" on clicking which  i should get element tag with value.(i.e <employeeEmail>[email protected]</employeeEmail>)
How to go about it.?
Thanks
Sakthi

Hi Steve,
If you haven't already done so, I recommend posting this question in the LivCycle Forms forum.
Jared

Similar Messages

  • Urgent: How to exclude a particular value from the selection in the infopac

    How to exclude a particular value from the selection in the infopackage.
    Ex: not load for cost center 10000
    Thank you,
    sam

    Hi Sam,
    You cannot do this directly as exclusion, but you can include all other values, even as ranges and thus exclude the particular value, else you can also try to do this by writing a routine.
    Hope this helps...

  • Retrieve input values from the selection screen

    I have a requirement to retrieve the variable value or values inputed from the selection screen and label the worksheet tab to replace the tab name 'Sheet1' from the Excel. The only way to do this would be to write a macro to label the sheets but how would I retrieve the value(s) from the selection screen criteria? Is the value of the selection screen entered by the user stored in some table? How would I write the macro to retrieve this value?
    For example, I want to retrieve the company code entered from the selection screen and lets say the company code entered as 10; I would want to replace the worksheet from 'Sheet1' to '10' . Texts would be more recognizable.

    Use the option Layout->Display Text Elements->Variables from the BEx toolbar. This will display Variable screen user input on your workbook in a fixed location. Then you can use your macro to name the worksheet with the cell reference.
    Thanks
    Vineet

  • How to read values from the following XML?

    I have been using "extractValue" to get the values from a xmltype field and no problems until now.
    The xmltype now is like:
    <a>1</a>
    <b>2</b>
    <c>1221</c>
    <c>1412</c>
    <d>11111</d>
    <e>3333</e>
    I'm able to read values from 'a,b,d,e' but not from 'c'.
    Questions:
    1)- Is posible to read the values of field c?. How?
    2)- If is not posible to read the field values, Is posible to transfor the xmlfield to:
    Where I will be able to use xmltable columns and loop getting the values.
    <a>1</a>
    <b>2</b>
    <k>
    <c>1221</c>
    <c>1412</c>
    </k>
    <d>11111</d>
    <e>3333</e>
    Like always
    Thank you in advance for your help.
    Jose Galan

    SQL> with XML as
      2  (
      3   select xmltype(
      4  '<root>
      5    <a>1</a>
      6    <b>2</b>
      7    <c>1221</c>
      8    <c>1412</c>
      9    <d>11111</d>
    10    <e>3333</e>
    11  </root>'
    12  ) XMLDOC
    13    from dual
    14  )
    15  select a, b,c, d, e
    16    from XML,
    17         XMLTABLE
    18         (
    19            '/root'
    20            passing XMLDOC
    21            columns
    22            A number(5) path 'a',
    23            B number(5) path 'b',
    24            D number(5) path 'd',
    25            E number(5) path 'e',
    26            C_XML_FRAG xmltype path 'c'
    27         ),
    28         XMLTABLE
    29         (
    30           '/c'
    31           passing C_XML_FRAG
    32           columns
    33           C number(5) path '.'
    34         )
    35  /
             A          B          C          D          E
             1          2       1221      11111       3333
             1          2       1412      11111       3333
    SQL>

  • Any F.Module is there to get  'Month and day '  from the given input number

    Hi experts,
        I am working on Inventory withdrawl report and in the selection screen, If i enter the CHARG (Batch number) then  I need to display the posting date by default in the next selection input based on the Batch number.
    In the selection screen :
    Batch : 7111WF0211.
    Posting Date :  (I need to display by default based on batch number).
    My requirement is,  in the above Batch first digit '7' is the year.
    And  from 2nd to 4th digit. i.e., 111. I need to find out month and day from 111.
    I mean from  1 to 365 days, In which day and which month '111' will come ?
    Please send me the code or suitable Function Module. Your help will be appreciated.
    Thanks,
    Ranji.

    Use FM ADD_TIME_TO_DATE
    Do this
    days = batch+1(3).
    days = days - 1.
    Call Function 'ADD_TIME_TO_DATE'
    exporting
    i_idate = '01.01.2008'
    i_time = days
    i_iprkz = 'D'
    importing
    o_idate = date_p_d
    You will get the date in date_p_d.
    But what about Leap years? IS the first number the year?
    IF so pass in i_idate the first of january of that year so you get the correct day depending if it is a leap year or not
    Edited by: Ramiro Escamilla on Feb 26, 2008 9:56 PM

  • How can I get the Attribute Value in the existing XML Elements-Reg.

    Dear All,<br /><br />  I have the InDesign Document with xml Based, now I want to get the XML Elements name and XML Attributes for each Elements, using SDK Concepts. <br /><br />Example:<br /><br /> <chapter>  chapter1 </chapter> id = "ch001"<br /> <sec> Section ....</sec> id ="se001"<br /> <para> para ....</para> id="pa001"<br /><br />How can I get the XMLElements & XML Attributes in the InDesign-XML Structure.<br /><br />Please  any one can suggest me....<br /><br />Thanks & Regards<br />T.R.Harihara SudhaN

    Dear Dirk
    Many Thanks for the Suggestions, Now I search and study the XML concepts. Meanwhile, I need your suggestions for further Development in SDK -XML concepts.
    I am using the SnippetRunner -SDK file, their given some XML based programmes. [Create XML Elements, Elements + Attributes, XML Comments] and etc...
    Hope U will help me to Develop the SDK- XML Concepts.
    Thanks & Regards
    T.R.Harihara SuduhaN

  • Antenna - problem reading in a property value from the build.xml file

    Hi
    I have declared a property in build.xml file of my project like
    <property name="debug" value="true" />I want to read the value of this property in my source code like
    //#if debug == "true"
    //#endifAbove method doesnt work. I tried using method below but it didnt work as well
    //#if ${debug} == "true"
    //#endifCan anyone please help me how can i read this value?
    Thank you

    you can get your key bytes with byte [] keyBytes = mykey.getEncoded();
    and then write your byte array in a file.
    to get back your key :
    SecretKey myKey = new SecretKeySpec(keyBytes,"TripleDES");

  • How to get all the values in the Select-option.

    Hi,
    I got the select-option field so_week, for eg. If I give 200923 to 200926 (year and week)  in the selection screen and then I need to pass this value (200923) to the FM 'ZWEEK_GET_FIRST_DAY' to get the first day of the week.
    My question is how can i get all the values from the select option, (i.e) i need to get 200923, 200924,200925, 200926.
    Regards,
    Anbu.

    Hello,
    I will prefer Max's solution. But just for the sake of this req.
    i need to get 200923, 200924,200925, 200926
    i am proposing my soln:
    DATA: V_WEEK TYPE RSCALWEEK.
    SELECT-OPTIONS: S_WEEK FOR V_WEEK NO-EXTENSION OBLIGATORY.
    AT SELECTION-SCREEN.
      DATA:
      V_COUNT TYPE I,
      V_ADD   TYPE I,
      RT_WEEK TYPE RANGE OF RSCALWEEK,
      RS_WEEK LIKE LINE OF RT_WEEK.
      V_COUNT = ( S_WEEK-HIGH - S_WEEK-LOW ) + 1.
      DO V_COUNT TIMES.
        RS_WEEK-SIGN = 'I'.
        RS_WEEK-OPTION = 'EQ'.
        RS_WEEK-LOW = S_WEEK-LOW + V_ADD.
        APPEND RS_WEEK TO RT_WEEK. "RT_WEEK--> Will contain the week values
        CLEAR RS_WEEK.
        V_ADD = V_ADD + 1.
      ENDDO.
    @Max: I was stupid enough not to think of your solution. Need to leave office
    Cheers,
    Suhas

  • Get all tags and attributes from schema

    Mapping question
    I have a mapping requirement where the customer needs all the tags and attributes from the schema whether it has a value or not. The schema has almost 1500 tags and each of them has a attribute. We are mapping only about 50 of them, so the rest of them has to be blank. Actually about 700 of the attributes has fixed values like CHAR. Normally I would create a second mapping and use exists otherwise map a empty tag, but in this case the number of tags is high. Is there a easy way to create all the blank tags during runtime similar to using generate instance in test mode or generate sample file in xmlspy.
    The scenario is IDOC to SOAP with BPM customer is using a custom schema
    Thanks in advance
    Asif

    Any hint or suggestion with the use of java/xslt/abap mapping or any other way to avoid mapping each of these tags manually will be appreciated.
    thanks
    Asif

  • Determine previous date from the selection date

    Hi Guys,
    I need to get a previous date from the selection date mm/dd/yyyy
    Eg:
    Selection date is 02/28/2008
    Sol- -02/27/2008
    Selection date - 03/01/2008
    Sol- 02/29/2008
    Selection date - 04/02/2008
    Sol-04/01/2008
    If i do ofset -1 in query ....it goes -1 month. In Exit if i do Sys-datnum -1. It works but not in case for Feburary month. Since 2008 year has Feb (29 days) but for 2007 (28 days)
    Regards

    Hi,
    Problem is i have a 0Date restricted to a variable and if i do offset-1 to that variable it goes previous month not the date.
    I dont have 0CALDAY in my cube. Can i do in the UserExit.
    If i do sy-datum-1. Will it work?
    Because the FEb one is the main problem
    Regards

  • Exception in assigning XML elements value in Workshop

    Hi ,
    I tried creating a variable of type XML object(OrderREsponse). I have one MB Publisher control which sends in a variable of type OrderResponse. Before sending it , I try setting the individual XML elements value in it. So, for all the individual elemtns , I set accordinglly in both the formats.
    responseXML.addNewOrderResponse().setOrderNumber("N12121212");
    responseXML.getOrderResponse().setOrderNumber("N12121212");
    where responseXML is a variable of type OrderResponse document.
    This place while executing I'm getting an exception.
    Here is the exception I'm getting.
    <Jan 4, 2005 10:51:11 AM MST> <Warning> <WLW> <000000> <Id=top-level; Method=com.bea.wli.bpm.runtime.ProcessState.processNodeOrchestration()
    ; Failure=com.bea.wli.bpm.runtime.UnhandledProcessException: Unhandled process exception [ServiceException]>
    <Jan 4, 2005 10:51:12 AM MST> <Warning> <WLW> <000000> <A message was unable to be delivered from a WLW Message Queue. Attempting to deliver
    the onAsyncFailure event>
    Let me know if the approach is the right one... or how can i set the individual XML elements value from a XML variable.
    Thanks
    Ramesh

    Hi ,
    I tried creating a variable of type XML object(OrderREsponse). I have one MB Publisher control which sends in a variable of type OrderResponse. Before sending it , I try setting the individual XML elements value in it. So, for all the individual elemtns , I set accordinglly in both the formats.
    responseXML.addNewOrderResponse().setOrderNumber("N12121212");
    responseXML.getOrderResponse().setOrderNumber("N12121212");
    where responseXML is a variable of type OrderResponse document.
    This place while executing I'm getting an exception.
    Here is the exception I'm getting.
    <Jan 4, 2005 10:51:11 AM MST> <Warning> <WLW> <000000> <Id=top-level; Method=com.bea.wli.bpm.runtime.ProcessState.processNodeOrchestration()
    ; Failure=com.bea.wli.bpm.runtime.UnhandledProcessException: Unhandled process exception [ServiceException]>
    <Jan 4, 2005 10:51:12 AM MST> <Warning> <WLW> <000000> <A message was unable to be delivered from a WLW Message Queue. Attempting to deliver
    the onAsyncFailure event>
    Let me know if the approach is the right one... or how can i set the individual XML elements value from a XML variable.
    Thanks
    Ramesh

  • How to get the values from html:select? tag..?

    i tried with this, but its not working...
    <html:select styleClass="text" name="querydefs" property="shortcut"
                 onchange="retrieveOptions()" styleId="firstBox" indexed="true">
    <html:options collection="advanced.choices" property="shortcut" labelProperty="label" />
    </html:select>
                        <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>

    <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>This java script is not working at all..its not printing anything in document.write();
    This is code..
    <td class="rowcolor1" width="20%">
    <html:select styleClass="text" name="querydefs" property="shortcut"
                             onchange="retrieveSecondOptions()" styleId="firstBox"
                             indexed="true">
                             <html:options collection="advanced.choices" property="shortcut"
                                  labelProperty="label"  />
                        </html:select>i tried with this also. but no use..i'm not the getting the seleced option...
    function retrieveOptions(){
    firstBox = document.getElementById('firstBox');
                             if(firstBox.selectedIndex==0){
          return;
        selectedOption = firstBox.options[firstBox.selectedIndex].value;
    }actually , how to get the values from <html:select> ...?
    my idea is to know which value is selected from the combo box(<html:select> ) if that value is equal some string i have enable a hyperlink to open a popup window

  • Need help Take out the null values from the ResultSet and Create a XML file

    hi,
    I wrote something which connects to Database and gets the ResultSet. From that ResultSet I am creating
    a XML file. IN my program these are the main two classes Frame1 and ResultSetToXML. ResultSetToXML which
    takes ResultSet & Boolean value in its constructor. I am passing the ResultSet and Boolean value
    from Frame1 class. I am passing the boolean value to get the null values from the ResultSet and then add those
    null values to XML File. When i run the program it works alright and adds the null and not null values to
    the file. But when i pass the boolean value to take out the null values it would not take it out and adds
    the null and not null values.
    Please look at the code i am posing. I am showing step by step where its not adding the null values.
    Any help is always appreciated.
    Thanks in advance.
    ============================================================================
    Frame1 Class
    ============
    public class Frame1 extends JFrame{
    private JPanel contentPane;
    private XQuery xQuery1 = new XQuery();
    private XYLayout xYLayout1 = new XYLayout();
    public Document doc;
    private JButton jButton2 = new JButton();
    private Connection con;
    private Statement stmt;
    private ResultSetToXML rstx;
    //Construct the frame
    public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    //Component initialization
    private void jbInit() throws Exception {
    //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
    contentPane = (JPanel) this.getContentPane();
    xQuery1.setSql("");
    xQuery1.setUrl("jdbc:odbc:SCANODBC");
    xQuery1.setUserName("SYSDBA");
    xQuery1.setPassword("masterkey");
    xQuery1.setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
    contentPane.setLayout(xYLayout1);
    this.setSize(new Dimension(400, 300));
    this.setTitle("Frame Title");
    xQuery1.setSql("Select * from Pinfo where pid=2 or pid=4");
    jButton2.setText("Get XML from DB");
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    catch(java.lang.ClassNotFoundException ex) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(ex.getMessage());
    try {
    con = DriverManager.getConnection("jdbc:odbc:SCANODBC","SYSDBA", "masterkey");
    stmt = con.createStatement();
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    jButton2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    jButton2_actionPerformed(e);
    contentPane.add(jButton2, new XYConstraints(126, 113, -1, -1));
    //Overridden so we can exit when window is closed
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    System.exit(0);
    void jButton2_actionPerformed(ActionEvent e) {
    try{
    OutputStream out;
    XMLOutputter outputter;
    Element root;
    org.jdom.Document doc;
    root = new Element("PINFO");
    String query = "SELECT * FROM PINFO WHERE PID=2 OR PID=4";
    ResultSet rs = stmt.executeQuery(query);
    /*===========This is where i am passing the ResultSet and boolean=======
    ===========value to either add the null or not null values in the file======*/
    rstx = new ResultSetToXML(rs,true);
    } //end of try
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    ======================================================================================
    ResultSetToXML class
    ====================
    public class ResultSetToXML {
    private OutputStream out;
    private Element root;
    private XMLOutputter outputter;
    private Document doc;
    // Constructor
    public ResultSetToXML(ResultSet rs, boolean checkifnull){
    try{
    String tagname="";
    String tagvalue="";
    root = new Element("pinfo");
    while (rs.next()){
    Element users = new Element("Record");
    for(int i=1;i<=rs.getMetaData().getColumnCount(); ++i){
    tagname= rs.getMetaData().getColumnName(i);
    tagvalue=rs.getString(i);
    System.out.println(tagname);
    System.out.println(tagvalue);
    /*============if the boolean value is false it adds the null and not
    null value to the file =====================*/
    /*============else it checks if the value is null or the length is
    less than 0 and does the else clause in the if(checkifnull)===*/
    if(checkifnull){ 
    if((tagvalue == null) || tagvalue.length() < 0 ){
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    root.addContent(users);
    out=new FileOutputStream("c:/XMLFile.xml");
    doc = new Document(root);
    outputter = new XMLOutputter();
    outputter.output(doc,out);
    catch(IOException ioe){
    System.out.println(ioe);
    catch(SQLException sqle){

    Can someone please help me with this problem
    Thanks.

  • How to get the selected values from the shuttle

    Hi
    Please tell me how to get the selected option values from the shuttle leading list.
    Thanks

    you can also obtain the option values present in the leading and trailing lists using the
    following methods:
    public String[] getLeadingListOptionValues(OAPageContext pageContext, OAWebBean
    webBean)
    public String[] getTrailingListOptionValues(OAPageContext pageContext, OAWebBean
    webBean)For example, the following code sample returns an array of values in the trailing list, ordered according to the
    order in which they appear in the list:
    String[] trailingItems =
    shuttle.getTrailingListOptionValues(pageContext, shuttle);Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to get multiple values from the list

    I've a list of an item which I queried it from the database. I also created a button that will takes a selected items from the list when it was clicked. I used javabean to get the data from database.
    <%     // clicked on Select District Button
    Vector vselectedDistrict = new Vector();
    Vector vdistrictID = new Vector();
    String tmpSelectDistrict = "";
    tmpSelectDistrict = request.getParameter("bSelectDistrict");
    if(tmpSelectDistrict != null)
         // get multiple values from the list
         String[] selectedDistrict = request.getParameterValues("usrTDistrict");
         vselectedDistrict.clear();
         vdistrictID.clear();
         if((selectedDistrict != null) && (selectedDistrict.length != 0))
                             for(int i=0;i<selectedDistrict.length;i++)
                   vselectedDistrict.addElement(selectedDistrict);           
              vdistrictID = dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
              for(int i=0;i<vdistrictID.size();i++)
                   out.println("district = " + selectedDistrict[i]);                         out.println("district ID= " + vdistrictID.get(i).toString());
    %>
    // get vdistrict from the database here......
    <select name="usrTDistrict" size="5" multiple>
    <%     for(int i = 0; i< vdistrict.size(); i++)
    %>
         <option value="<%=vdistrict.get(i).toString()%>"><%=vdistrict.get(i).toString()%></option>
    <%
    %>          
    </select>
    <input type="submit" name="bSelectDistrict" value="Select District">
    Lets say the item that i selected from the list is 'Xplace' and I clicked on the Select District button,
    what I got is this error message:
    org.apache.jasper.JasperException: Unable to convert string 'Xplace' to class java.util.Vector for attribute usrTDistrict: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
    So where is going wrong and what the message means?. Any help very much appreciated. Thanks

    These are just guesses that might hopefully steer you in directions you haven't looked in yet.
    I presume you used triangle brackets (< >) to avoid having the Jive Forum think it was the "italics" tag?
    Are you certain this: dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
    expects a Vector as its second parameter? And returns a Vector?
    I don't believe you've shown how you use the javabean, or its code? Perhaps it should be rewritten to accept an array of strings instead of a Vector?

Maybe you are looking for

  • Custom Reports and Custom Fields

    When creating a custom report, it seems the only way to include custom fields and Extend CRM database fields is to include ALL of them in the Filter Criteria > Custom CRM Form Filter section. The business owner wants me to create a custom report that

  • I have an apple id, but it says my password is incorrect

    I have an apple id for my daughter. when I try to log in it asks for my PW which i can't remember. When i want to verify by email i do noyt get an email on one of my adresses en when i need to fill in her birthday it says that that is the wrong date?

  • Macbook Pro Stuck at Startup

    My Macbook Pro that isn't even a year old (got it last June) has recently broke down on me for some reason (still aludes me how). The problem is whenever I try to turn it on it is stuck on the grey startup screen with the Apple logo and spinning dial

  • New to Logic: How to clear noises in  old tape music

    Hello, I have old tape record (now no my iMac) which I need to clean from noises, which is normal on every old tapes. Which way is the best? Thank you for your help

  • G530 audio problem

    first i should say that i do not have any audio faults on my pc, i have 2 audio controllers in device manager  1-conexant high defin. smart audio 221  2- inel(R) high definition audio HDMI  BOTH installed ok and drivers status is ok. in the sound tab