Order of elements - how to get position of child ?

Hi,
I would like to check, if the name of the second element of root is "youngestSon". Is it possible to query this with xpath (I use xquery with xpath-expressions, in fact I already know the name of the element but want to get sure with an exist-statement, that the element's position is 2) ?
<parent>
<oldestSon>A</oldestSon>
<youngestSon>B</youngestSon>
</parent>
Note, that the child element names are different. What I dont need is the second son in the following example (therefor I could use /parent/son[position()==2] )
<parent>
<son>A</son>
<son>B</son>
</parent>
Thank you for any help!
Jule

(XPATH / XQUERY PROBLEM)

Similar Messages

  • How to get Position from EmployeeInfo in DIAPI

    I am using DIAPI(JCO) for SAP B1. According to one or my reuirement i am in need of Position from the EmployeesInfo. But there  seems no option or method for getting position from that. Can anyone guide me how to get that from EmployeesInfo ? Any help is appreciated..

    Looking at the DI API properties vs. DB fields mapping documentation in the SAP Business One developer area (https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c5f5dbcc-0a01-0010-5d82-f25f2bee715e)
    it seems that this field is not exposed (yet).
    I.e. you could only run a SQL statement to get this information.
    Sorry,
    Frank

  • How to get position of a ring in a tree control?

    Ok, this is probably a stupid question, but how does one get the position of a ring inside of a tree control?  I have a tree with two columns, with rings in the second column.  I can set the position using SetTreeCellRingValueFromIndex(), but how does one get the position after the user has modified the control?  I found the functions GetTreeCellRingIndexFromValue() and GetTreeCellRingValueFromIndex() but I haven't found a way to get either the Index or the Value of the ring (what I'm looking for is the index, but if I can obtain the value I can go from there).  Thanks in advance!
    Solved!
    Go to Solution.

    Hi,
    You can use GetTableCellVal function to get the value of the ring.
    There is not special "ring" function for that. Maybe that's what you were searching for
    From the value you can get to the index using the functions you are already aware of.
    Hope this helps,
    S. Eren BALCI
    www.aselsan.com.tr

  • How to get position texts

    Hi,
    I am retreiving positions texts for the positions existing in infotype it0001 using table T528T.  But the table T528T only display the position text for the first 25 characters. Could any one tell me how can i get the complete text for the position, please suggest if any function module exists.

    Hi Phani,
    Use RH_OBJECT_TEXT function module with PLVAR = 01, OTYPE = S (position), OBJID = position ID, BEGDA = sy-datum, ENDDA = sy-datum.
    Use returning field DISPLAY_TEXT.
    Regards,
    Dilek

  • How to get position of cursor on screen ??

    Hi all,
    I am trying to get the coordinates of mouse cursor on the screen ( which might be outside the java application's window ) from my java application. I tryed to use SystemEventQueue, but it gives me the events only when the cursor is inside the java application's window. Is it not possible using pure Java ? If some body can give me some hints or share their experience, I will really appreciate it.
    Thanks in advance.
    Viju.

    Not possible with pure java - would have to use a c/c++ dll and JNI and what is known as a "MouseHook" in the windows API.

  • How to Get the Parent - Child Relationship

    Hi ,
    In my application having 100 tables with parent - child releation ship without using casecade constraints
    i want to delete the parent with child and sub child records
    Example
    Table - 1
    parent1
    child 2
    Table - 2
    Child 1 - Parent 1
    Parent 2
    Table - 3
    Child 1 - Parent 2
    Parent 3
    Table - 4
    Child 1 - Parent 3
    How to delete the parent table ? Is it any scripts available ?
    Regards
    Sudhakar P.

    Hi,
    1) Firstly identify the parent tables using
    SELECT a.table_name, 0
    FROM user_tables a, user_tab_columns b
    WHERE a.table_name = b.table_name
    store these in one table say ID_table
    2) Identify dependent tables and sore in table say table_dependency using
    SELECT LEVEL, parenttable, parentcol, childtable, childcol
    FROM (SELECT UNIQUE parenttable, parentcol, childtable,
    b.column_name childcol
    FROM (SELECT p.table_name parenttable,
    k.column_name parentcol,
    k.POSITION pos,
    c.table_name childtable,
    c.constraint_name CONSTRAINT
    FROM all_constraints p,
    all_constraints c,
    all_cons_columns k
    WHERE p.constraint_name =
    c.r_constraint_name
    AND c.r_constraint_name =
    k.constraint_name
    AND p.constraint_type IN ('P', 'U')
    AND c.constraint_type = 'R'
    AND p.table_name != c.table_name
    ORDER BY p.table_name,
    c.constraint_name,
    k.POSITION) a,
    all_cons_columns b
    WHERE a.CONSTRAINT = b.constraint_name
    AND a.pos = b.POSITION)     
    3)Now using these details find tables without cascade rule as below
    SELECT *
    FROM table_dependency
    WHERE child_table IN (
    SELECT DISTINCT table_name
    FROM user_constraints
    WHERE constraint_type = 'R'
    AND delete_rule <> 'CASCADE'
    AND table_name IN (SELECT child_table
    FROM table_dependency)
    AND r_constraint_name IN (
    SELECT constraint_name
    FROM user_constraints
    WHERE table_name IN (
    SELECT table_name
    FROM id_table
    UNION
    SELECT child_table
    FROM table_dependency))
    AND table_name NOT IN (
    SELECT table_name
    FROM id_table));

  • How to get only direct child node by tag name

    Hi,
    I am using the method
    getElementsByTagName("")....
    This works except the problem is my XML schema/file has some recursive tags,
    I have a <question> element which can have an <answer> or another <question>.
    When parsing the XML file I want to be able to get a list of sub questions for a given question, but only if it is a direct child of that question.
    So if i have:
    <question>
      <text>q1</text>
      <question>
        <text>q2</text>
        <question>
          <text>q3</text>
        </question>
      </question>
    </question>If I'm dealing with the "q1" question I want only "q2" but not "q3". Whereas getElementsByTagName will take both q2 and q3. How can I achieve this.
    Thanks

    You want only children and not other descendants? Then getChildNodes() and getFirstChild() and methods with similar names look like a good start.

  • How to get rid of error message for the material?

    Hi everybody,there is a material which is showing an error message whenevr try to create a sales order, i've checked the material master...there is no check in X-plant Mtrl or X-dist chan or any flag for deletion...but still the red error message comes up while creating a sales order...how to get rid of this error?

    this means material is blocked for procurment
    three kinds of block can be there
    01 Blocked for procment/whse
    02 Blocked for task list/BOM
    03 Blocked for Purchasing
    GOTO MM42 give material n plant data
    Select BESIC VIEW
    there is a field called as material block remove the blocking reason
    Hope this will help
    Edited by: WISH on Mar 24, 2008 6:33 AM

  • How to get the required result in BI publisher?

    Hi All,
    QuoteROW
       QuoteItemROW
        SA   -- abc   
        PROD --xyzitem
        NR     -- 100
        MR     -- 150
                 QuoteItemROW
                       SA   -- abc   
                       PROD --xyz
                       NR     -- 100
                       MR     -- 150
                  QuoteItemROW
                       SA   -- abc   
                       PROD --xyz
                       NR     -- 100
                       MR     -- 150
      QuoteItemROW
        SA   -- abc   
        PROD --xyzitem
        NR     -- 100
        MR     -- 150
                  QuoteItemROW
                      SA   -- abc   
                      PROD --xyz
                      NR     -- 100
                      MR     -- 150
                   QuoteItemROW
                      SA   -- abc   
                      PROD --xyz
                      NR     -- 100
                      MR     -- 150
        QuoteItemROW
      SA   -- abc   
      PROD --klmitem
      NR     -- 100
      MR     -- 150
                  QuoteItemROW
                     SA   -- abc   
                      PROD --xyz
                      NR     -- 100
                      MR     -- 150
                  QuoteItemROW
                      SA   -- abc   
                      PROD --klm
                      NR     -- 100
                      MR     -- 150
    I have to grp on SA, PROD, NR, MR
    My Result should be a table
    SA ---abc
    PROD               NR           MR                 count
    xyzitem               100         150                    2
        xyz                  100         150                   4
    klmitem               100          150                   1
         xyz                 100          150                  1
         klm                 100          150                  1
    Please let me know how to get cnt on child record.
    Regards,
    Sam

    Hi Alex, thank you for your reply.
    Yes that is the hierarchy,
    QuoteItemROW -------------------------------------> this is the main POFS (master)
        SA  -- abc 
        PROD --xyzitem
        NR    -- 100
        MR    -- 150
        QTY  --  1
                QuoteItemROW ----------------------------this is POES under POFS (child)
                      SA  -- abc 
                      PROD --xyz
                      NR    -- 100
                      MR    -- 150
                      QTY  ---- 1
    and required a group on SA, then PROD, NR and MR. Basically wanted to display QTY count/sum.
    xyz is repeating (in red color) because first xyz is under group of xyzitem and another xyz is under another group of klmitem.
    SA ---abc
    PROD              NR          MR                QTY
    xyzitem              100        150                    2
       xyz                  100        150                  4
    klmitem              100          150                  1
       xyz                100          150                  1
        klm                100          150                  1
    Regards,
    Sam

  • Photoshop elements 10 will not migrate to my new macbook pro/retina display.  There is no CD/DVD player on this machine.  Any suggestions on how to get Elements onto my machine?  Yes, I have the disk(s).

    Photoshop elements 10 will not migrate to my new macbook pro/retina display.  There is no CD/DVD player on this machine.  Any suggestions on how to get Elements onto my machine?  Yes, I have the disk(s).  Am I going to have to buy an external CD/DVD player to load this one program:(

    I have ordered a USB3 BluRay/DVD/CD player/burner and will use that both with my iMac ( in which the Superdrive seems to be failing ) and the MBPro Retina I just bought .

  • How to get the order for these decoration​s?

    hello,
    I want to programatically resize all the controls, indicators and decorations on the front panel.
    I am getting the references of all the controls and indicators and able to resize them, as each n every control and indicator has a tabbing order set to it.
    I am also getting the references of all the decoration used on the front panel but not able to get the order.
    how to get the order for these decorations?

    The order of the decorations is the same as the back to front order. So you
    can change it by bringing decorations to front, or sending them to the back.
    It has been suggested many times that decorations should have labels as well
    as controls, but at the moment there is no way to tell which reference
    belongs to which decoration (besides position and order).
    Regards,
    Wiebe.

  • How to get Cost element for a component in co03 cost analysis report

    Hi,
    I'm using table COSP to find the quantity for a production order component.  However, I need to identify the cost element first to get the unique data.  In CO03 cost analysis report, there is cost element for the component.  Does anyone know how to get it ?
    Thanks.

    CSKA stores the basic info about the cost element
    There is no data in CSKB.
    I'm trying to use different tables to get the cost element.
    AUFK, AFKO, AFPO, RESB, ...but no luck...

  • How to get change log for z-fields in VBAk(Sales order)

    Hi All,
    Please help me in this.
    My requirement is get the change log for z-fields in sales order.
    In the sales order header level we have one tab Additioanl data.
    In this we have z-fields, if we change any of the field value, it is accepting the same and updating in data base as well.
    But it is not appearing in change log<. I.e. Environment->changes.
    How to get the change log for the z-fields.
    In data element level enable the check box of change document.
    Please help me in this.
    Thanks in advance
    Jaya,G

    Hi Jaya,
    For this you need to do some coding. Here is a link which tells you, step by step procedure how to activate Change log for the Z tables.
    THe Object that you need to use for Sales Document   is VERKBELEG
    [https://wiki.sdn.sap.com/wiki/display/ABAP/Maintaining%20Change%20Log%20for%20Database%20Tables]
    Hope this helps..
    This is Primarily a Technical Consultant Job. Take his help before you make any changes.
    Thnks
    Srini

  • How to get the values of all elements and sub elements from  following xml

    how to get the values of all elements and sub elements from following xml...
    <?xml version="1.0" encoding="UTF-8" ?>
    <List_AML_Finacle xmlns="http://3i-infotech.com/Cust_AML_Finacle.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://3i-infotech.com/Cust_AML_Finacle.xsd List_AML_Finacle.xsd">
    <TransactionID>TransactionID</TransactionID>
    <Match>
    <Src_Matched_Field>Src_Matched_Field</Src_Matched_Field>
    <List_Matched_Field>
    <FSFM_Matches>
    <NUMBER>NUMBER</NUMBER>
    <TERROR>TERROR</TERROR>
    <TU>TU</TU>
    <NAMEU>NAMEU</NAMEU>
    <DESCRIPT>DESCRIPT</DESCRIPT>
    <KODCR>KODCR</KODCR>
    <KODCN>KODCN</KODCN>
    <AMR>AMR</AMR>
    <ADDRESS>ADDRESS</ADDRESS>
    <SD>SD</SD>
    <RG>RG</RG>
    <ND>ND</ND>
    <VD>VD</VD>
    <GR>GR</GR>
    <YR>YR</YR>
    <MR>MR</MR>
    <CB_DATE>CB_DATE</CB_DATE>
    <CE_DATE>CE_DATE</CE_DATE>
    <DIRECTOR>DIRECTOR</DIRECTOR>
    <FOUNDER>FOUNDER</FOUNDER>
    <TERRTYPE>TERRTYPE</TERRTYPE>
    </FSFM_Matches>
    <OfacMatchDetails>
    <UID>UID</UID>
    <TITLE>TITLE</TITLE>
    <SDNTYPE>SDNTYPE</SDNTYPE>
    <REMARKS>REMARKS</REMARKS>
    <ID_UID>ID_UID</ID_UID>
    <IDTYPE>IDTYPE</IDTYPE>
    <IDNUMBER>IDNUMBER</IDNUMBER>
    <IDCOUNTRY>IDCOUNTRY</IDCOUNTRY>
    <ISSUEDATE>ISSUEDATE</ISSUEDATE>
    <EXPIRATIONDATE>EXPIRATIONDATE</EXPIRATIONDATE>
    <ADDRESS1>ADDRESS1</ADDRESS1>
    <ADDRESS2>ADDRESS2</ADDRESS2>
    <ADDRESS3>ADDRESS3</ADDRESS3>
    <CITY>CITY</CITY>
    <STATEORPROVINCE>STATEORPROVINCE</STATEORPROVINCE>
    <POSTALCODE>POSTALCODE</POSTALCODE>
    <COUNTRY>COUNTRY</COUNTRY>
    </OfacMatchDetails>
    </List_Matched_Field>
    </Match>
    </List_AML_Finacle>

    avoid multi post
    http://forum.java.sun.com/thread.jspa?threadID=5249519

  • How to get Changed fields in Sales order to create a report

    Dear Gurus,
    How to get the log from sales order for the change of particular field.
    In my scenario, If an user remove the delivery block from sales order I want to capture the date on which this delivery block
    is removed and by whom (User)?
    I know that I can get the log of change but can I get in the form of field updates because further I want to use that date and user name to create a report.
    I hope u got my query. Please reply soon that I can create a report.
    Thanks in advance.
    regards,
    Sanjay

    Hi
    You can use the table CDPOS for tracking the changes at the Table level with the Sales order number
    or Else you can also use AUT10 transaction to track the logs/chanages with START DATE, END DATE and the Transaction code in your case it is VA02
    Please check and revert back
    regards,
    santosh

Maybe you are looking for

  • I need to know how you would publish a new site into an existing site

    Okay I have a new Dreamweaver website that I just created for my brother in-laws law firm and want to publish in onto an ftp server but the sever already has the existing site published onto it and before I have it pulled down I would like to publish

  • Can't Get The EAX Consol To Work/App

    I have just managed to get the latest drivers installed for the SB Audiology 2 and I am now trying to install the EAX Consol tools. I.E. The Speaker Settings, Mixer, etc. However the files I have downloaded from the site give me the following error:

  • Sample example of service callout

    can anybody send me the link of service callout example in osb 11g

  • CRM 2011& Office 2013 Excel Export

    Hi Forum, we are currently using a crm 2011 server (ru17) and have some clients with Windows 8.1 and Office 2013 with outlook addin (RU 17). For these clients we get in to trouble by exporting contacts or accounts as dynamic pivot spreadsheet. If the

  • Why did all my messages delete when i restarted my phone

    I was on facetime and I wasn't receiving any of my messages so I went to my message app and i seen all the unread messages but they were blank and all i could see was the name of who sent it. So i restarted my phone and all my messages were gone !