XML element name contains (.) periods, how to access each element value?

Hi All,
This is the xml that needs to be processed.
<?xml version="1.0" encoding="ISO-8859-1"?>
<com.companyx>
<person>
<employee.data>
<employee.name>mrx</employee.name>
<employee.number>1001</employee.number>
</employee.data>
<employee.data>
<employee.name>mry</employee.name>
<employee.number>1002</employee.number>
</employee.data>
<employee.data>
<employee.name>mrz</employee.name>
<employee.number>1003</employee.number>
</employee.data>
<page>0</page>
</person>
</com.companyx>
Please tell me how to access the <employee.name> value of
the first <employee.data> element.
An early help is much appreciated.......
Thanks in Advance,
Vijay Karthik

Give this a try... should do the trick
trace(myXML.person["employee.data"][0]["employee.name"])

Similar Messages

  • How to access each row value for a database item

    On my form I have a database datablock that represents a table in my database.
    5 rows are shown with a scroll bar that can be viewed to show the rest.
    The user is able to change some of the Database Item values represented in this datablock for any row shown in the datablock.
    I need to validate the correctness of the users change before allowing the database datablock to update the table in the database.
    But a database item in a datablock will represent a value for every row in the table. So how do I access each row value for a database item separately. What is the PL/SQL syntax?
    thanks,
    michelle

    In my situation it was better to use the loop instead
    of a when validate trigger because...Well it was clearly not better to use a loop that doesn't work. I don't understand what you're not clear on about the item and record validation triggers. If you have a specific validation rule for a single field (such as a date that cannot be in the future), that would go in a When-Validate-Item trigger on the date item. If the user enters a future date, your code would display an error message and raise a failure. Raising a failure prevents the item from being marked as valid. Invalid items prevent the record from being inserted/updated. Sometimes you have a validation rule that requires looking at more than one item at a time, such as two items that must either both be NULL or NOT NULL. In that case, you could not use a When-Validate-Item trigger because you can't clear or populate both at once. So then you would use a When-Validate-Record at the block level and if one field is NULL and the other isn't, you would display an error message and raise a failure. Forms is very civil in this respect; we don't throw exceptions around here, but then I digress.

  • How to associate an xml from httpservice to datagrid if the xml element name contains periods in it

    Following is the xml from an http service, how to associate
    this xml to a data grid (employee name, number) since it contains
    periods(dots) in xml element name.
    An early help is appreciated.....
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <com.companyx>
    <person>
    <employee.data>
    <employee.name>mrx</employee.name>
    <employee.number>1001</employee.number>
    </employee.data>
    <employee.data>
    <employee.name>mry</employee.name>
    <employee.number>1002</employee.number>
    </employee.data>
    <employee.data>
    <employee.name>mrz</employee.name>
    <employee.number>1003</employee.number>
    </employee.data>
    <page>0</page>
    </person>
    </com.companyx>
    Thanks,
    Vijay Karthik

    HI
    GOOD
    IT IS POSSIBLE IN ABAP
    Extensible Markup Language (XML) is a simple, very flexible text format derived from SGML (ISO 8879). Originally designed to meet the challenges of large-scale electronic publishing, XML is also playing an increasingly important role in the exchange of a wide variety of data on the Web and elsewhere.
    XSD->
    XML Schemas express shared vocabularies and allow machines to carry out rules made by people. They provide a means for defining the structure, content and semantics of XML documents. in more detail.
    XDS->
    XDS can process data images from CCD-, imaging-plate, and multiwire-detectors in a variety of formats. Detector specific Input file templates greatly simplify the use of XDS; they are provided as part of the documentation.
    XDS runs under Unix or Linux on a single server or a grid of up to 99 machines of the same type managed by the MOSIX system; in addition, by using OpenMP, it can be executed in parallel on up to 32 processors at each node that share the same address space.
    http://www2.stylusstudio.com/SSDN/default.asp?action=9&fid=23&read=2926
    /people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping
    THANKS
    MRUTYUN

  • How to extract xml tag name contains dashes

     
    Hi, How to parse XML file to extract root tag contains dashes in Flex,for example
    XML Input is: <regular-body>Text of my post...</regular-body>
    expected output is : regular-body
    I appreciate any of your suggestions or inputs

    Do you want to get the name of the XML ELEMENT regular-body, or the value in the XML file "Text of my post...".
    If its the latter, then you could use the bracket/quote notation for extracting the value, like in the following example:
    image = xmlWeather[0]..parameters["conditions-icon"]["icon-link"][idx]
    I use this when parsing weather information from a 3rd party in which their XML is loaded with dashes.
    If you are looking to get the actual element name, not sure how to do that.  I would think that if you are using an XML file, you would have at least the high level element known.

  • How to access the element s in a hashMap with order

    Does anybody know how to access the elements in a hashMap with order.
    I know set is a collection that doesn't gaurantee the order so the iterator of keySet will not gaurantee the order.
    Is there any way to solve this?
    Thanks

    If you mean the order in which the key/value pairs where added to the
    map, have a look at the LinkedHashMap class. If you mean 'natural'
    order, you shouldn't be using a HashMap at all then; have a look at the
    TreeMap class instead.
    kind regards,
    Jos

  • 7 digit Value(1234567) how to move each digit value in each variable(v1..v7

    Hi,
    In Sap Script:
    7 digit Value(1234567) how to move each digit value in each variable( 7 variablesvar1,var2,var3,....var7).
    How it is possible in SAP Script..What is the Logic?
    Thanks and Regards,
    Prabhakar Dharmala
    like this
    Move 1 - var1, 2 - var2, 3 - var3 , 4 - var4, 5 - var5, 6 - var6, 7 - var7.
    Edited by: Prabhakar Dharmala on Mar 31, 2008 11:01 AM

    Hi,
    var = '1234567'.
    var1 = var1+0(1).
    var2 = var1+1(1).
    var3 = var1+2(1).
    var4 = var1+3(1).
    var5 = var1+4(1).
    var6 = var1+5(1).
    var7 = var1+6(1).
    Regards,
    V.Balaji
    Reward if Usefull...
    Edited by: Balaji V on Mar 31, 2008 7:59 AM

  • How to access an element using its name or id if it is not a class variable?

    I am trying to retrieve the element I added to my UI in a different  function. I am using actionscript 3. I know I can put the variable into a  class variable, so it can be access anywhere in the class, but I have  too many elements. Is there anyway I could access them without putting  them into class variable?
    Thanks.
    public class Test extends SkinnableContainer{
    // private var image:Image; <-- I try not to do this, too messy
    private function func1() {
        var image:Image = new Image();
        addElement(image);
    private function func2() {
        var image:Image = /* how to get the element from my UI without putting into class variable */

    Here is what works for me:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   creationComplete="init()"
                   minWidth="955" minHeight="600">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import spark.components.Image;
                private var  image:Image;
                private function init():void
                    image = new Image();
                    addElement(image);
                    trace(this["image"]);
            ]]>
        </fx:Script>   
    </s:Application>

  • Programmed Binding (Container IF) - how to access source container data

    Hi,
    I have created a programmed binding (container IF) using a function module based on SWA_BINDING_TEMPLATE.
    I want to access an element (Meldung) based on BUS2078 (QM notification) from my source container and then retrieve the material from this element.
    When the element is a simple element such as WfInitiator for example I cant retrieve the value using the get method on the source container but when it is a complex element such as a BOR object it does not work. How can I retrieve such data.
    Thanks for your help,
    Emmanuel

    I finally found the answer last week, here is how I have done :
        DATA : l_matnr TYPE matnr.
        DATA : l_string TYPE string.
        DATA: lcx_container TYPE REF TO cx_swf_cnt_container.
        DATA: b_meldung TYPE swf_bor_object.
        TRY.
            CALL METHOD source_container->get
              EXPORTING
                name  = 'Meldung'
              IMPORTING
                value = b_meldung.
            swf_get_property b_meldung 'Material' l_matnr.
          CATCH cx_swf_cnt_elem_not_found .
            l_string = 'cx_swf_cnt_elem_not_found'.
          CATCH cx_swf_cnt_elem_type_conflict .
            l_string = 'cx_swf_cnt_elem_type_conflict'.
          CATCH cx_swf_cnt_unit_type_conflict .
            l_string = 'cx_swf_cnt_unit_type_conflict'.
          CATCH cx_swf_cnt_container INTO lcx_container.
            l_string = lcx_container->t100_msg.
        ENDTRY.
    Emmanuel

  • How to access custom attribute value on the timecard at runtime

    I have created 2 attributes; Project and Task.
    Once a employee selects the Project from the Projects custom LOV I want the Task LOV to display only the tasks related to that particular project.
    How to access the PROJECT_ID during runtime which the user selects from Projects LOV?

    Hi
    I have added the below text in the ldt file.
    But its not working? Any suggestions?
    What may be going wrong?
    # CSR Project List
    BEGIN HXC_LAYOUT_COMPONENTS "XXCSR1 Payroll Timecard Layout - Project"
    OWNER = "CUSTOM"
    COMPONENT_VALUE = "XXCSRPROJECT"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "XXCSR_HXC_TIMECARD_PROJECT"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "211"
    COMPONENT_DEFINITION = "CHOICE_LIST"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT =
    "XXCSR1 Payroll Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS "XXCSR1 Payroll Timecard Layout - Project"
    OWNER = "CUSTOM"
    QUALIFIER_ATTRIBUTE_CATEGORY = "CHOICE_LIST"
    QUALIFIER_ATTRIBUTE1 = "Custom1VO"
    QUALIFIER_ATTRIBUTE4 = "N"
    QUALIFIER_ATTRIBUTE5 = "15"
    QUALIFIER_ATTRIBUTE6 =
    "XxcsrProjectId|Projects List|RESULT|N"
    QUALIFIER_ATTRIBUTE10 =
    "oracle.apps.hxc.selfservice.timecard.server.Custom1VO"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "Projects List"
    QUALIFIER_ATTRIBUTE27 = "Attribute1"
    QUALIFIER_ATTRIBUTE28 = "Projects List"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    # CSR Project List
    # CSR Task List
    BEGIN HXC_LAYOUT_COMPONENTS "XXCSR1 Payroll Timecard Layout - Task"
    OWNER = "CUSTOM"
    COMPONENT_VALUE = "XXCSRTASK"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "XXCSR_HXC_TIMECARD_TASK"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "212"
    COMPONENT_DEFINITION = "CHOICE_LIST"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT =
    "XXCSR1 Payroll Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS "XXCSR1 Payroll Timecard Layout - Task"
    OWNER = "CUSTOM"
    QUALIFIER_ATTRIBUTE_CATEGORY = "CHOICE_LIST"
    QUALIFIER_ATTRIBUTE1 = "Custom2VO"
    QUALIFIER_ATTRIBUTE4 = "N"
    QUALIFIER_ATTRIBUTE5 = "15"
    QUALIFIER_ATTRIBUTE10 =
    "oracle.apps.hxc.selfservice.timecard.server.Custom2VO"
    QUALIFIER_ATTRIBUTE14 =
    "HxcCuiTaskProjectId|PROJECT|Y"
    QUALIFIER_ATTRIBUTE15 =
    "pro_id = ::XxcsrProjectId"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "Projects List"
    QUALIFIER_ATTRIBUTE27 = "Attribute2"
    QUALIFIER_ATTRIBUTE28 = "Task List"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    # CSR Task List
    ###########################################################

  • How to write each element of a set to the excel sheet?

    I am trying to iterate through each element of the set and write each of them to an excel file? Can Somebody help me to achieve this?
    Code snippet is:
    Iterator<String> nameIterator = names.iterator();
        for(int size = 0;size<names.size();size++){       
      row = mdm_lastLoginDate.createRow(size);
      //cell = row.createCell(1);
      while(nameIterator.hasNext()){
      String setName = nameIterator.next();
      cell = row.createCell(1);
      cell.setCellValue(setName);
      System.out.println("setName:->"+setName);
      mdm_lastLoginDate.autoSizeColumn(size);
    above code prints each element in the console but not getting each value in the excel file. I am only getting the last value.
    Thanks & regards
    Amita

    As already communicated several times to you - please use the correct space for your posts.
    I'll move this thread again to Master Data Management (SAP MDM), however - and for the last time - please get familiar with The SCN Rules of Engagement and note that your account will be disabled if you repeatedly fail to follow them.
    --Vlado (SCN Moderator)

  • How to average each element in an array

    I have data from a Gage Card that I would like to average.  I am tuning a laser over a 50 mA range and for each 1mA increment in current, I am taking 100 scans.  Each scan consisting of about 200 points.  I cannot average more than 10 shots using the Gagecard so I would like to capture 100 scans, and average them to reduce noise.  Currently, I have my capture vi inside of a for loop which repeats 100 times and each scan writes to a file, but I would like ony 1 scan (the lower noise averaged one) per current increment.  
    How can I average each element of 100 arrays and output this to an array?
    Thanks for the help 

    It sounds like you want to average element 0 across 100 arrays and make that element 0 of the new averaged array.  Then average element 1 across 100 arrays and make that element 1 of the new array ...   ?????
    How are you working with your 100 1-D arrays now? 
    What you should do is make a 2-D array where one dimension is 100 (for the number of individual arrays) and the other dimension is how many elements are in those 100 1-D arrays.  Then you can use for loops with auto indexing to break the 2-D array down into each row or column, do the average of that array, and autoindex on the other side to build back up into the new 1-D array of averages.  You may need to to a transpose array going into your for loop in case the arrays are indexed in the wrong direction.
    Message Edited by Ravens Fan on 01-21-2008 04:26 PM
    Attachments:
    Example_BD.png ‏6 KB

  • How to Access the Return Value of a Function

    Hi,
    How do I access the return value when calling an Oracle function from .NET using Oracle.DataAccess.Client? The function returns an integer of 0, 1 or 99.
    Dim db_command_oracle As New OracleCommand()
    db_command_oracle.Connection = db_connection_oracle
    db_command_oracle.CommandType = CommandType.StoredProcedure
    db_command_oracle.CommandText = "swsarsi.import_appointments"
    Dim ret_value As New OracleParameter()
    ret_value.OracleDbType = OracleDbType.Int32
    ret_value.Direction = ParameterDirection.ReturnValue
    ret_value.Size = 2
    ret_value.OracleDbType = OracleDbType.Int32
    db_command_oracle.Parameters.Add(ret_value)
    Dim IN_student_id As New OracleParameter()
    IN_student_id.OracleDbType = OracleDbType.Varchar2
    IN_student_id.Direction = ParameterDirection.Input
    IN_student_id.Size = 10
    IN_student_id.Value = student_id
    db_command_oracle.Parameters.Add(IN_student_id)
    db_command_oracle.ExecuteNonQuery()
    messagebox.show(ret_value) ?????

    Your ODP.NET code looks correct. What error are you seeing?
    One thing that will definitely generate an error is that .NET message boxes require that strings be displayed. ret_value is a parameter object. You need to access its value and convert it to a string. At a minimum, you need to change that.

  • How to Access Radiobutton Check Value

    Hi all,
    I'm using Oracle 10g Forms Developer and I want to know how to access radio button check value, that means how to know that the current radio button is checked or not. Thanks in advance

    you assign each button the representing value in the properties.
    So you can just check if the radiogroup-item has the value you assigned the button, something like:
    IF :BLOCK.RADIOBUTTONITEM='A' THEN
    ...

  • How to access Flash elements panel in DW SC3?

    when I insert Image Viewer and every time I click on it the
    Flash elements panel shows up automatically.
    However if I close the panel group, I can no longer get the
    Flash elements panels when I click on the Viewer and I can't find
    any access or menu that opens this panel. The only way I found is
    to create a new viewer and undo. Does anyone know how is one
    suppose to access this panel after being closed?

    1.  First, minimize the file panel by clicking in the dark bar at the very top of the file panel (the one that has a little arrow on the right side), which will make the file panel tiny (no file names will be shown).  Unless you have previously removed assets and snippets by dragging their tabs out and closing them, the tiny file panel will be attached to the asset panel and snippets panel, so you will be minimizing all of these at once.
    2.  Next, drag the file panel to the level that has tabs saying, Code, Split, Design. 
    3.  Then drag the file panel to either the far left of the screen or far right of the screen, which will cause it to dock. 
    4.  Finally, click the tiny arrow on the top right of the dark bar of the file panel; this will expand the file panel again so that you can see your file names. It will also expand the assets panel and the snippets panel if they are attached.

  • How to access the element of one mxml to another mxml?

    Hi,
    I have a component named storylist as below in StoryList.mxml
    <mx:List id="storyList" width="100%" dataProvider="{this.currentDoc.stories}" height="100%" variableRowHeight="true" selectable="false" borderStyle="none"
    itemRenderer="com.xxx.yyy.core.views.renderers.StoryRenderer">
    </mx:List>
    I want to access the storylist in another mxml CoreCanvas.mxml
    private function onOpenFile (doc:IdmlDocument):void {
    logger.info("onOpenFile");
    this.editor.currentDoc = doc;
    this.editor.storyList.dataProvider = this.editor.currentDoc.stories;
    but when  i declared as a bindable variable in StoryList.mxml --> [Bindable] public varstoryList:IdmlStory = null;
    it gives an error
    Description Resource Path Location Type
    1151: A conflict exists with definition storyList in namespace internal. StoryList.mxml/WebEditorCore/src/com/xxx/yyy/core/views/editor line 10 Flex Problem
    how can i access storylist in the other mxml file?
    Message was edited by: Jochem van Dieten

    I'm a bit confused about this design approach.
    [Bindable] public var storyList:IdmlStory = null; 
    The reason why the above line fails to compile in StoryList.mxml is that a variable of the same name already exists. You have specified a List with an id of storyList. The translation process will yield:
    var storyList:List = new List();
    and then fill in the properties.

Maybe you are looking for

  • How to write data to an XML file present under application server

    frnds: can ne one tell me, how to write data in to a file, which is present under a application server Ex: i want to write a string data in to a file test.txt which is present under "http://localhost:8080/<some_webapp>/test.txt" Note:i have deploted

  • CFMail Attachment Issue (410 character limit)

    My company is in the process of upgrading from CF5 to CFMX7 (v7.0.2). While testing the new version our test environment, I've discovered an issue (that didn't exist in CF5) regarding email attachments. I've scoured the internet looking for users who

  • Memory usage exceed -Xmx option in Windows 2000.

    Hi , I run the java application with -Xms300M -Xmx600M option in Windows 2000. When I start the application, it's virtual memory size is 300M. (In Windows TaskManager choose the Processes Tab and select "Select Columns..." option in View menu. And ch

  • Download tab

    I have a logitech mouse that has an extra button. I have asigned this button to close the active window/software or a single firefox tab. However, when I try to usethis mouse option to close the Firefox Download Window it does not work. I would like

  • Unprintable characters on Mac & Windows

    A Java program writes a String to the screen. The String contains unprintable characters. On the Mac they don't print, which is what I want. On Windows the unprintable characters show up as [], which I don't want. Anyone have any ideas how to prevent