How to delete a node based on some attribute value

Hi,
I want to delete one node from xml file.
My XML file is given below::::
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<config>
<employeeDetails>
<employee id = "1" name = "aa" salary = "1000" />
<employee id = "2" name = "bb" salary = "2000" />
<employee id = "3" name = "cc" salary = "3000" />
<employee id = "4" name = "dd" salary = "4000" />
</employeeDetails>
</config>
Lets say i want to delete the row whose id = "2" means whole employee node of id 2, but i don't know how to delete?
Please somebody help me its very very urgent.

madforjava wrote:
Please somebody help me its very very urgent.Is someone going to die if you don't get answered within a couple of minutes?

Similar Messages

  • How to delete the data based on concurrent request Id

    Hi
    from account receivable to gl i am posted a cheque through concurrent program.
    right now my problem is I want to delete that data in database tables based on concurrent request id.
    how to delete that data based on concurent request id, Please give me some suggessions

    What is the application version ? what exactly you want to achieve ?
    Direct deletion is not recommended in oracle application database.
    regards,

  • How to Delete the node from cluster when the machine crashed?

    In an three nodes Rac of 11g r2,How to delete the node from cluster when the machine crashed?
    There is now way to repair the machine and have to add a new one.
    What is step to follow up?

    hi
    IF YOU WANT TO DELETE RAC1 NODE
    check $./olsnodes
    1) delete the instance using dbca from any active nodes
    crs_stat -t
    srvctl stop asm -n rac1
    2) delete listener
    3) delete oracle_home from oracle user
    $ORACLE_HOME/bin/runInstaller -updatenodelist ORACLE_HOME=<db_home> "CLUSTER_NODES={RAC1}
    4)delete asm home
    $ORACLE_HOME/bin/runInstaller -updatenodelist ORACLE_HOME=<asm_home> "CLUSTER_NODES={RAC1}
    5) update cluster node
    $ORACLE_HOME/bin/runInstaller -updatenodelist ORACLE_HOME=<db_home> "CLUSTER_NODES={active nodes like rac2,rac3}
    6) update ASm home
    $ORACLE_HOME/bin/runInstaller -updatenodelist ORACLE_HOME=<asm_home> "CLUSTER_NODES={active nodes like rac2,rac3}
    cd $ORA_CRS_HOME
    cd crs/opmn/conf
    check for
    $cat ons.config
    remoteport=6200
    cd crs_home/bin
    $./racgons remove_config rac1:6200
    $ go to crs home
    and $ORA_CRS_HOME/crs/install/rootdelete.sh
    $ORA_CRS_HOME/crs/install/rootdeletenode.sh
    check for ./olsnodes

  • How to handle vendor discounts based on the qty / value procured.

    Hello
           How to handle vendor discounts based on the qty / value procured.
    a.       Scenario: you have entered into a contract with vendor that you will buy goods worth Rs 10000/- and if you buy goods worth more than 100000 the vendor says he will give a discount of Rs 5000/- @ the end of the year.  
    i)                    How to handle this sceneriou2019s with SAu2019s
    ii)                   What does STD SAP offer.
    Regards
    Sapman man

    Hi,
    For the discucount condition type, you have to maintain scales.
    Take Condition type -  Discount Value ( RB00)
    Discount Value ( RB00) - Means Fixed discount. For this condition type, you have to maintain Scale basis as Value scale 'B' in the condition type customization.
    Transcation : M/06
    Select your condition type RB00 and click on the details icon.
    In the Scales block, you have to maintain and save.Calculation type = Fixed amount
    Scale basis = Value scale 'B'
    For this condition type, you have to maintain scales in the inforecord.
    Transcation : ME12
    Select this condition type, click on the Scales icon. There you have to maintain like
    From : 10,0000            Rate: 5000.
    It means, if the document value is reached 10,0000 then discount is 5000rs. If the value islessthen the 10,0000 then no discount.
    Regards
    KRK

  • How to clear the node which has multiple attributes

    Hello ,
               how to clear the node which has multiple attributes.
    I've tried this using the method SET_STATIC_ATTRIBUTES_NULL but it's not working.
    Thanks,
    Sandhya.

    Hello,
    I suggest you to create an internal table or structure clear it and the bind it to the context node.
    Another possibility is to try to invalidate the node (method INVALIDATE of interface IF_WD_CONTEXT_NODE).
    Regards.

  • How to blink TreeView Nodes based on condition c#

    suppose i am populating my tree view with data from database and i want to blink those nodes which has a specific data. now guide me with code how can i efficiently blink multiple tree view nodes  based on condition in winform application.

    Hi Mou_kolkata,
    >> anyone can give me small working code for tree node blinking
    Thank Armin for the details about blinking TreeView Nodes.
    For a simple demo to blink TreeView nodes, you could refer the link below:
    # Treeview control - How to make a node blink?
    https://social.msdn.microsoft.com/Forums/en-US/64e7a4d7-3098-4370-990f-390cb3a640a1/treeview-control-how-to-make-a-node-blink
    If you have issues when you blink Treeview nodes, please feel free to post a new thread in this forum, then you would get more help.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Delete parent node based on its child node value in XML

    I have an xml like this:
    <UPLOAD_REQUEST>
         <CUSTOMER_DETAIL>
         <NAME>Smith</NAME>
         <AGE>20</AGE>
         <GENDER>M</GENDER>
         </CUSTOMER_DETAIL>
         <CUSTOMER_DETAIL>
         <NAME>Nikita</NAME>
         <AGE>35</AGE>
         <GENDER>F</GENDER>
         </CUSTOMER_DETAIL>
    </UPLOAD_REQUEST>
    I want to delete CUSTOMER_DETAIL node where name = 'nikita' from xml. Also note that there is no identification number for CUSTOMER_DETAIL node.
    I was trying to do it like this:
    UPDATE request_xml
    SET request= deleteXML(request, '/UPLOAD_REQUEST/CUSTOMER_DETAIL')
    WHERE extractvalue(request, '/UPLOAD_REQUEST/CUSTOMER_DETAIL/NAME') = 'Nikita';
    It gives error "*EXTRACTVALUE returns value of only one node*"
    Final output should be
    <UPLOAD_REQUEST>
         <CUSTOMER_DETAIL>
         <NAME>Smith</NAME>
         <AGE>20</AGE>
         <GENDER>M</GENDER>
         </CUSTOMER_DETAIL>
    </UPLOAD_REQUEST>
    Can anyone please help me how to do this?
    Edited by: user10446917 on May 6, 2011 3:38 AM

    Add a predicate in the XPath expression :
    UPDATE request_xml
    SET request = deleteXML(request, '/UPLOAD_REQUEST/CUSTOMER_DETAIL[NAME="Nikita"]')
    ;

  • How to delete SMTP node in scot

    Dear friends,
    In my Prd system when i ma trying to create SMTP thne message come as Node SMTP is already exist. How can i create new node by name of SMTP. or how can i delete SMTP node is any background job for same?
    But when i am trying by using another name as smtps then it is proceed but i am not undersand how can i do it.
    and also is scot is client dependent or independent.
    Thanks,
    Regards,
    Sachin Jadhav

    Hi Sachin,
    The SMTP node which you see in SCOT comes with SAPconnect only.
    You can not delete it. Nor you can add any more.
    Refer below link.
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/b0/f8ef3aabdfb20de10000000a11402f/frameset.htm">SMTP node</a>
    But I don't understand why do you want to delete it.
    --Shamish
    Message was edited by:
            Shamish Lele

  • How to delete a node from a node network

    How do I delete a node from a node network?
    <P>
    <OL>
    <LI>Follow the instructions on page 30 of the Calendar Server (CS) 3.x Admin Guide,
    and page 62 of the CS 4.0 Admin Guide "Deleting (excluding) a Node from the
    Network".
    <LI>Shut down the Directory Server.
    <LI>Backup the LDAP directory to an LDIF file.
    <LI>Edit this LDIF file and delete references to the
    6 calendar reserved users for the node to be deleted.
    <LI>Restore the LDAP directory with this changed LDIF file.
    <LI>Run unidbfix -export -n all
    <LI>Edit the resulting remotenodes.ini
    files and delete all
    references to the node to be deleted.
    <LI>Run unidbfix -import -n all
    <LI>Start the Directory Server.
    <LI>Start the Calendar Server.
    <P>
    Note: This next step is for Calendar Server 3.x * ONLY *
    <P>
    <LI>Run unireqdump -delete
    to delete all requests to the node
    to be deleted.
    </OL>

    Divya wrote:
    Hi,
    I'm using forms6i.
    I want to delete unselected nodes from a tree
    How can it be done??
    ThanksIf you mean empty branches as unselected nodes,
    set Allow Empty Branches property to 'No' in the Trees property.

  • How to set radiobutton values based on some input values?

    LCD 8.0
    I have a table with 5 rows - each row has a checkbox in it.
    The user can select 0 - 5 checkboxes. Based on the number of selected checkboxes, I need to dynamically 'press' a radiobutton (out of 5) to show the corresponding Risk level - If 2 checkboxes are checked, I need to press radiobutton #2, if 3 checkboxes the 3rd radiobutton, etc..
    I can get the 1st one to work, but can't seem to be able to change it to any other radiobutton after the first.
    What I do is sum the # of checkboxes checked, and try to set the raw.Value of the radiobutton = 1.
    >var orgcnt = sum( PDF_CONTAINER.ConceptPage1.RisksPositioned.ORGRISKS.DATA[*].RISK_IND )
    >if ( orgcnt == 1 ) then >PDF_CONTAINER.IdeaSheetPage2.RiskAssesSubform.RiskTable.RISK_*****1.cell3.RadioButtonLis t.NoRisk.rawValue = 1
    >endif
    >if ( orgcnt == 2 ) then >PDF_CONTAINER.IdeaSheetPage2.RiskAssesSubform.RiskTable.RISK_*****1.cell3.RadioButtonLis t.MinorRisk.rawValue = 1
    >endif
    If I select 1 Checkbox, the first radiobutton IS pressed, however, when I select a 2nd checkbox, the 2nd radiobutton is NOT pressed and also blanks out the 1st radiobutton.
    any ideas?
    thanks,
    rp.

    Paul,
    thanks for your input.
    However, I'm not trying to change radiobuttons in Row2 - I'm trying to change a set of 6 radiobuttons in my Row1.Cell3
    I will always and only have two rows in my table. This first row is named
    PDF_CONTAINER.IdeaSheetPage2.RiskAssesSubform.RiskTable.
    b RISK_*****1
    and the second row is named
    PDF_CONTAINER.IdeaSheetPage2.RiskAssesSubform.RiskTable.
    b RISK_*****2
    In Cell3 of each of those rows, I have a Radiobutton group with 6 radiobuttons (named NoRisk, MinorRisk, SmallRisk, ModerateRisk, VeryRisky, CriticalRisk).
    What I'm trying to do is "press" one of those radiobuttons based on some other variable's value.
    Here's a sample bit of code that checks if my variable = 3, then "press" the 3rd radiobutton
    ] if ( orgcnt == 3 ) then
    PDF_CONTAINER.IdeaSheetPage2.RiskAssesSubform.RiskTable.RISK_*****1.cell3.RadioButtonList .SmallRisk.rawValue = 1
    endif
    But, I'm not getting a radiobutton pressed.
    EDIT: by the way, i'm sure my summed value is coming back because I placed it in a message box & see the correct number.

  • Delete in database based on multiselect list values

    Hi,
    I have a selectlist in Apex and a function in the database to do some delete based on the selected value from the select list.
    FUNCTION delete_batch (v_batch VARCHAR2) RETURN VARCHAR2
    IS
    BEGIN
    IF v_batch like 'M%'
    THEN
       RETURN ('A monthrun cannot be deleted');
    ELSE
       DELETE FROM so_disco_pa
       WHERE  batch = v_batch
       DELETE FROM so_batch_pa
       WHERE  batch = v_batch
       COMMIT;
       RETURN ('Batch '||v_batch||' has been deleted');
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
        RETURN ('Batch could not be deleted');
    END delete_batch;The package function is called when the delete button is clicked with following process:
    BEGIN
    DECLARE
    x   varchar2(100);
    BEGIN
    x := pa_control.delete_batch (:P3_BATCH);
    :F105_MESSAGE := x;
    END;
    END;Now I want to change the selectlist to a multiselect list so that multiple batches can be deleted.
    How do I change my procedure and process to delete batches based on the selected values?
    Thanks,
    Diana

    I got this so far, but only the first batch selected in the list is being deleted. The other selected batch values are not deleted.
    Some help please.
    FUNCTION delete_batch (v_batch VARCHAR2) RETURN varchar2
    IS
    T Apex_application_global.vc_arr2;
    BEGIN
    T := apex_util.string_to_table(v_batch);
    For I in 1..t.count loop
    IF  t(i) like 'M%'
    THEN
       RETURN ('A monthrun cannot be deleted');
    ELSE
       DELETE FROM so_disco_pa
       WHERE  batch = t(i)
       DELETE FROM so_batch_pa
       WHERE  batch = t(i)
       COMMIT;
       RETURN ('Batch '||v_batch||' has been deleted');
    END IF;
    end loop;
    EXCEPTION
    WHEN OTHERS THEN
        RETURN ('Batch could not be deleted');
    END delete_batch;

  • How to use SQL import to set the attribute value based on another?

    Hello all,
    I want to set an attribute of a dimension based on another attribute (if matches). Let's say I have a dimension PRODUCT. And I have defined two user defined attributes MANAGER and ISVISIBLE.
    Now within a PERMIT_READ program I want to set the ISIVISIBLE to true where the MANAGER Value is selected from a table.
    Something like
    <define a cursor c1 to select all the Manager values>
    sql import c1 into -
    :MATCHSKIPERR PRODUCT_MANAGER then <PRODUCT_ISVISIBLE (PRODUCT MANAGER) = true>
    <etc>
    Obviously the above is not correct. But I am stuck as to how this can be done? Can some one on this forum please help me with correct syntax/ approach please?
    Thanks a lot.
    Pxsheth
    This statement assigns true to the isvisible attribute for every gc_dim_bu dimension (selected as part of cursor c1).
    SO FAR SO GOOD.. NOW -
    If I want to change the above so that the attribute value gets assigned based on another attribute for the dimension (say a flag). i.e.
    Set the isvisible to true where attribute flag has a certain value. How do I code this in OLAP DML?

    There are a number of ways to do this. If you want to use an attribute that has been defined within AWM as an attribute of Product then simply using the mapping tool to populate the attribute as part of the normal dimension load procedure.
    Alternatively you could create an attribute at the DML level, and assuming you are not using surrogate keys, you can then define a cursor to read the relational table to populate your attribute. Something like this:
    sql declare MKT_BASKET cursor for -
    select PRODUCT_ID, PROD_MGR , PROD_VISIBLE -
    from PRODUCT_DIM
    if SQLCODE ne 0
    then goto ERROR
    sql open MY_CURSOR
    sql fetch MY-CURSOR loop into :append PRODUCT, :PRODUCT_MANAGER, :PRODUCT_ISVISIBLE
    sql close MY_CURSOR
    sql cleanup
    update
    commit
    If you want to create a complex PERMIT function using OLAP DML then personally I would create a formula and assign a program of type BOOLEAN and have the program return a YES or NO depending on the outcome of your test. Then your PERMIT_READ still references a dimension object. For example:
    DEFINE PROD.ISVISIBLE BOOLEAN FORMULA <PRODUCT>
    EQ PRG.ISVISIBLE(PRODUCT)
    DEFINE PRG.ISVISBLE PROGRAM BOOLEAN
    The program will then return Yes or No depending on the processing you need to do.
    Hope this helps
    Keith Laker
    Data Warehouse Solution Architect
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • How to increase the salary based on the percentage value

    Hi All,
    Could you please let me know which API need to be used to implement the hike in salary based on the percentage value. And what all the parameters to be used.
    Appreciate your help...
    Thanks...

    Dear All,
    Any luck on this please?
    thanks..

  • Select XML Node by a specific attribute value

    I am newbie for LifeCyle.
    This might be an easy question, but it really got me here.
    I am trying bind xml data into a Drop-Down List. The databinding is working fine, but I would like to have more specific node selected from the xml file by using a attribute value.
    for example Code in AS 3.0
    root.node.(@id=="1").subNode
    How could i do the same thing in LifeCycle Designer 8.0
    Thank you in advance!!!

    there's no native method for this, maybe you should create some functions for this. just like
    private function setAttribute(node:XML, name:String, value:String, index:int = -1):void
        var attrs:XMLList = node.attributes().copy(),
            l:int = attrs.length();
        if(index == -1 || index > l - 1)
            node.@[name] = value;
        else
            delete node.@*;
            var idx:int = 0;
            for (var i:int = 0; i < l + 1; i++)
                if(i == index)
                    node.@[name] = value;
                else
                    var attr:XML = attrs[idx];
                    node.@[attr.name()] = attr.toString();
                    idx++;
    and use it like this:
    setAttribute(myNode, "otherAttribute", "abc", 0);

  • How to handle & or when part of an attribute value

    In my xml file, i have &(ampersand) or > as part of the attribute value.As a result i get SAXParserExeption. Is there a way to handle this error other than writing & as & in the xml file.
    <p>
    Thanks.

    Dear DrClap,
    Thanks for the solution, but i have been using it already. I would like some other alternative. Is there some kind of Handler to deal with such issues or do we write some code to handle it..If so, could someone please help me out with this..
    Thanks.

Maybe you are looking for

  • Submit in report in Background job.

    Hi, In a report trasaction MCBE is submitted. When this report is executed in back ground there is no spool list generated but in job log a selection version ID is shown. As a result submit ....exporting list to memory is failing. Is there any way to

  • How to create a certificate using keytool / terminal?

    I have problems with creating certificates using the terminal. I use the instructions below and typed in all the required information. When it asks me to type "yes" and confirm, the whole process just starts from the beginning over and over and I hav

  • No Cover flow for Search History in Safari 6.1

    Just upgraded to Safari 6.1 and can't search my history using the visual (coverflow) method anymore? I use that all the time here at work. Please tell me there's a way to get it working again, because looking at a page full of URLs does NOT help!

  • Intermittant problems with Flash Player 7 and 8

    Good morning, While "stress testing" a recent Captivate 2 generated quiz lesson, one of our testers noticed some odd behavior. (Granted, most students will not do the following actions, but I thought I'd mention it anyway.) First let me add that we u

  • Every time I send a message, I get a message from myself

    I have a ITunes account that I share with a friend, and i don't know what happeNed but now every time I send a message I receive it on my phone