Inconsistent results for adding child node in a JTree

I have a JTree where I add child nodes when a user clicks on the node or handle. When the user clicks on the node, through implementing TreeSelectionListener interface, I add a node, the tree expands, and I see the newly added node. However, when the user clicks on the handle, through implementing the TreeExpansionListener, the tree does not expand and I do not see the newly added node. The problem is repeatable by compiling the code below.
Why is there this difference? Aren't all the methods implemented through the TreeSelectionListener and TreeExpansionListener in the SWT thread?
public class TestFrame extends JFrame implements TreeSelectionListener, TreeExpansionListener {
     public TestFrame() {
          String[] alphabets = {
                    "a", "b", "c", "d", "e", "f", "g",
                    "h", "i", "j", "k", "l", "m", "n",
                    "o", "p", "q", "r", "s", "t", "u",
                    "v", "w", "x", "y", "z"
          DefaultMutableTreeNode top = new DefaultMutableTreeNode("CEDICT");
          for(int i=0; i < alphabets.length; i++) {
               DefaultMutableTreeNode node =
                    new DefaultMutableTreeNode(alphabets) {
                    public boolean isLeaf() { return false; }
               top.add(node);
          JTree tree = new JTree(top);
          tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
          tree.addTreeSelectionListener(this);
          tree.addTreeExpansionListener(this);
          tree.setShowsRootHandles(true);
          JScrollPane treePane = new JScrollPane(tree);
          treePane.setHorizontalScrollBarPolicy(
                    JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
          treePane.setVerticalScrollBarPolicy(
                    JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
          treePane.setSize(new Dimension(200,400));
          treePane.setPreferredSize(new Dimension(200,400));
          getContentPane().setLayout(new BorderLayout());
          getContentPane().add(treePane, BorderLayout.CENTER);
          Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
          int inset = 50;
setBounds(inset, inset,
screenSize.width - inset*2,
screenSize.height - inset*2);
          setLocationRelativeTo(null);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          pack();
          show();
     public static void main(String[] args) {
          SwingUtilities.invokeLater(new Runnable() {
               public void run() {
                    JFrame.setDefaultLookAndFeelDecorated(true);
                    TestFrame frame = new TestFrame();
     public void valueChanged(TreeSelectionEvent e) {
          JTree tree = (JTree)e.getSource();
          DefaultMutableTreeNode node =
               (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
          System.out.println(node);
          Date date = new Date();
          node.add(new DefaultMutableTreeNode(date.toString()));
     public void treeCollapsed(TreeExpansionEvent event) {
          JTree tree = (JTree)event.getSource();
          TreePath path = event.getPath();
          DefaultMutableTreeNode node =
               (DefaultMutableTreeNode) path.getLastPathComponent();
          System.out.println(node);
          Date date = new Date();
          node.add(new DefaultMutableTreeNode(date.toString()));
          tree.invalidate(); //does not help to show newly added child
     public void treeExpanded(TreeExpansionEvent event) {
          JTree tree = (JTree)event.getSource();
          TreePath path = event.getPath();
          DefaultMutableTreeNode node =
               (DefaultMutableTreeNode) path.getLastPathComponent();
          System.out.println(node);
          Date date = new Date();
          node.add(new DefaultMutableTreeNode(date.toString()));
          tree.invalidate(); //does not help to show newly added child

I couldn't figure out why inserting a node in the valueChanged(...) method works. In all three methods no listeners are notified about the change, so you would think all three would fail.
For a JTree using the DefaultTreeModel the nodesWereInserted(...) method needs to be called. For example, if I change your last three methods to this
public void valueChanged(TreeSelectionEvent e) {
   insertNode((JTree) e.getSource(),
              (MutableTreeNode) e.getPath().getLastPathComponent());
public void treeCollapsed(TreeExpansionEvent event) {
   insertNode((JTree) event.getSource(),
              (MutableTreeNode) event.getPath().getLastPathComponent());
public void treeExpanded(final TreeExpansionEvent event) {
   insertNode((JTree) event.getSource(),
              (MutableTreeNode) event.getPath().getLastPathComponent());
public void insertNode(JTree tree, MutableTreeNode parent) {
    Date date = new Date();
    MutableTreeNode child = new DefaultMutableTreeNode(date.toString());
    int index = parent.getChildCount();
    parent.insert(child,index);
    ((DefaultTreeModel) tree.getModel())
            .nodesWereInserted(parent,new int[]{index});
}then it works as you desire. You can (and should) of course use the DefaultTreeModel's own insert method.
DefaultTreeModel#insertNodeInto(MutableTreeNode,MutableTreeNode, int)

Similar Messages

  • Invoking BPEL partnerlink each for one child node

    Hi
    I have a requirement for invoking partnerlink (DB Adapter) for each child node of input message of BPEL service! E.g. I have to update or insert an employee! I received list of of employees in input message like below.
    <employee_list>
         <employee>
              <name> Ram </name>
              <Age> 21 </Age>
              <dept> IT </dept>
              <isNew>N</isNew>
         </employee>
         <employee>
              <name> Hari </name>
              <Age> 21 </Age>
              <dept> IT </dept>
              <isNew>Y</isNew>
         </employee>
    </employee_list>
    So the requirement is to call DB_Call partnerlink for each employee node in above!
    Is this possible in BPEL? If yes, how?
    Thanks In Advance
    Priyadarshi

    Yes you can, use a fo reach loop in bpel, loop for the count of employee, then have an if condition to check whether you want to update or insert for and use invoke node to call the appropriate operation.I hope you have gone through the upsert operation in database adpater which automatically supports insert or update. If a record is present it updates else inserts a new one.

  • Inconsistent results for SDO_RELATE

    Using SDO_VERSION = 10.2.0.2.0
    I am getting inconsistent results using SDO_RELATE. If I do the whole table (over 200,000 records), one particular record that I know of is skipped while if I pick a smaller range of records ie. 4 records in this case, the record is not skipped. The particular relationship with this record is "touch". Is there any limitation on table size or is this something else? Here is the example :
    -- The column is set to null
    SQL> update nad_als_fixed_stn_10G_HQ set insidecheck = null;
    231484 rows updated.
    -- SDO_RELATE on a few records which actually finds the correct relationship
    SQL> UPDATE nad_als_fixed_stn_10G_HQ C SET C.insidecheck = '1'
    2 WHERE EXISTS (SELECT 1 FROM MetroRegions A, nad_als_fixed_stn_10G_HQ B
    3 WHERE SDO_RELATE(B.location83r, A.geoloc, 'mask=anyinteract') = 'TRUE'
    4 AND C.lic_no = B.lic_no and C.lic_no between 4687157 and 4687223 )
    5 ;
    3 rows updated.
    -- Displays the correct relationship for that record (this is a "touch")
    SQL> select insidecheck from nad_als_fixed_stn_10G_HQ where lic_no = 4687161;
    Inside
    check
    1
    -- Reset the column to null
    SQL> update nad_als_fixed_stn_10G_HQ set insidecheck = null;
    231484 rows updated.
    -- SDO_RELATE on the complete table
    SQL> UPDATE nad_als_fixed_stn_10G_HQ C SET C.insidecheck = '1'
    2 WHERE EXISTS (SELECT 1 FROM MetroRegions A, nad_als_fixed_stn_10G_HQ B
    3 WHERE SDO_RELATE(B.location83r, A.geoloc, 'mask=anyinteract') = 'TRUE'
    4 AND C.lic_no = B.lic_no );
    48488 rows updated.
    -- This particular record which was located correctly earlier appears to be skipped
    SQL> select insidecheck from nad_als_fixed_stn_10G_HQ where lic_no = 4687161;
    Inside
    check
    SQL>
    François Sigouin

    Thanks but it did not solve the problem of inconsistent results. The response time for the first update is much improved though. When I added the hint on the second update (which is about 600 records), it never came back so I tested without it. Any other ideas ?
    François.
    TEST
    SQL> update nad_als_fixed_stn_10G_HQ set insidecheck = null;
    231484 rows updated.
    -- First update with hint, response time is improved but same results obtained
    SQL> UPDATE nad_als_fixed_stn_10G_HQ C SET C.insidecheck = '1'
    2 WHERE EXISTS (SELECT /*+ ORDERED */ 1 FROM MetroRegions A, nad_als_fixed_stn_10G_HQ B
    3 WHERE SDO_RELATE(B.location83r, A.geoloc, 'mask=anyinteract') = 'TRUE'
    4 AND C.lic_no = B.lic_no );
    48488 rows updated.
    SQL> select insidecheck from nad_als_fixed_stn_10G_HQ where lic_no = 4687161;
    Inside
    check
    SQL> update nad_als_fixed_stn_10G_HQ set insidecheck = null;
    231484 rows updated.
    --The second update has to be without the hint otherwise it does not come back.                                                                                                  
    SQL> UPDATE nad_als_fixed_stn_10G_HQ C SET C.insidecheck = '1'
    2 WHERE EXISTS (SELECT 1 FROM MetroRegions A, nad_als_fixed_stn_10G_HQ B
    3 WHERE SDO_RELATE(B.location83r, A.geoloc, 'mask=anyinteract') = 'TRUE'
    4 AND C.lic_no = B.lic_no and C.lic_no between 4687157 and 4687223 )
    5 ;
    3 rows updated.
    SQL> select insidecheck from nad_als_fixed_stn_10G_HQ where lic_no = 4687161;
    Inside
    check
    1

  • Error after adding Child node

    Hi Experts,
    I have created a Data object by importing as "BAPI Wrapper" . It had a Parent node and a child node. Now i added one more child node.
    But if i am activating this node it is giving below error.
    Object not adequately specifiedError
    Regards,
    Abhishek

    Hi Dhana,
    I have deleted the child node and added these attributes in header so now i can activate this header structure but when i tried to activate BA after mapping , then it says
    Invalid field mapping
    But i have counter checked everything is fine even when i checked my BA with "Error check" button it didn`t give any error. Any idea how to sort it out.
    Regards,
    Abhishek

  • Querying for first child node's value of a certain tag

    Hi,
    I am using the java parser 2 from Oracle. Given a XML document
    containing the following
    <course>
    <Name>Calculus</Name>
    <Dept>Math</Dept>
    <Instructor>
    <Name>Jim Green</Name>
    </Instructor>
    <Student>
    <Name>Jack</Name>
    <Name>Mary</Name>
    <Name>Paul</Name>
    </Student>
    </course>
    I want to efficiently obtain the value of first child node of
    <course> whose tag is <Name>.
    I could not find any mtd that can do that efficiently. The
    nearest match is the mtd getElementsByTag("Name") which
    traverses the entire tree under <course>.
    Any help appreciated !
    Thanks in advance
    Mak
    null

    Mak (guest) wrote:
    : Hi,
    : I am using the java parser 2 from Oracle. Given a XML document
    : containing the following
    : <course>
    : <Name>Calculus</Name>
    : <Dept>Math</Dept>
    : <Instructor>
    : <Name>Jim Green</Name>
    : </Instructor>
    : <Student>
    : <Name>Jack</Name>
    : <Name>Mary</Name>
    : <Name>Paul</Name>
    : </Student>
    : </course>
    : I want to efficiently obtain the value of first child node of
    : <course> whose tag is <Name>.
    : I could not find any mtd that can do that efficiently. The
    : nearest match is the mtd getElementsByTag("Name") which
    : traverses the entire tree under <course>.
    : Any help appreciated !
    : Thanks in advance
    : Mak
    Your best bet, if you do not need the entire tree, is to use the
    SAX interface to return the desired data. Since it is event
    driven it does not have to parser the while document.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Inconsistent results for zoom/pan operation:

    We have multiple MapViewer servers to test our application against. When running against one of those machines we get the following error occurring on the client.
    Exception occurred during event dispatching:
    java.lang.ExceptionInInitializerError: java.lang.ArrayIndexOutOfBoundsException
         at java.lang.System.arraycopy(Native Method)
         at oracle.sdovis.CoordArray.getAll(JSDOGeometry.java:2755)
         at oracle.sdovis.ProjAzEd.createBG(ProjAzEd.java:507)
         at oracle.sdovis.ProjAzEd.&lt;clinit&gt;(ProjAzEd.java:63)
         at oracle.lbs.mapclient.MapViewer.getUserPoint(MapViewer.java:1914)
         at oracle.lbs.mapclient.MapViewer.pan(MapViewer.java:1871)
         at com.ups.upi.delegates.BasicMapNavigationDelegate.pan(BasicMapNavigationDelegate.java:84)
         at com.ups.upi.client.BasicMapNavigationController.propertyChange(BasicMapNavigationController.java:237)
         at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
         at com.ups.upi.gui.ImagePanel$ImageMouseListener.mouseClicked(ImagePanel.java:317)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    This error occurs on the client during either a zoomIn, zoomOut or pan operation. However when running against other servers or our locally running MapViewer service then these operations are successful.
    We started seeing this problem after we updated all of our geometries and the associated metadata to an srid of 8307. As part of this we re-built all of our spatial indexes. In addition we disabled caching on the machine with the error as part of some other testing.
    We do not see any errors in the log that could help us debug this problem.
    MapViewer versions:
    SERVER WITH ERROR: Build: Ver9_0_4_B031104
    LOCALLY RUNNING: Build: Ver9_0_4_B030811
    SUCCESSFUL SERVER: Build: Ver9_0_4_B031104
    We re-cycled both servers after updating our geometry data and the results were the same before and after the recycle.
    Any help would be appreciated.
    Derek

    Hi, the cause of the error might be that the mvclient.jar used by your client is not the same version as the server in question. You can check the version of the mvclient.jar by executing the following command:
    jar tvf mvclient.jar
    and it should show a class named like Ver10_1_2_B041013.class, which shows the version number for the jar library.
    Your application should always use the mvclient.jar from the server that you are testing against.
    hope this helps.

  • How to make multiple repeating pages for XML child nodes

    I have a schema that has many levels, and I am trying to have some of the child data print on separate pages.
    <As>
    <A id=1>
    <Bs>
    <B id=1 name="B1">
    <Cs>
    <C id=1 name="B1C1" />
    <C id=2 name="B1C2" />
    <C id=3 name="B1C3" />
    </Cs>
    </B>
    <B id=2 name="B2">
    <Cs>
    <C id=1 name="B2C1" />
    <C id=2 name="B2C2" />
    <C id=3 name="B2C3" />
    </Cs>
    </B>
    <Bs>
    </A>
    <As>
    I want to place the data from A and B on page 1 (A is header fields and B is a table showing B1, B2 etc), and then per B, place data from C items on their own pages (repeat as necessary).
    So the page output would be:
    Page 1
    A:1 (header items)
    B table
    B1
    B2
    Page 2
    A:1 (header items)
    B id: 1
    C data for B1C1
    Page 3
    A:1 (header items)
    B id: 1
    C data for B1C2
    Page 4
    A:1 (header items)
    B id: 1
    C data for B1C3
    Page 5
    A:1 (header items)
    B id: 2
    C data for B2C1
    Page 6
    A:1 (header items)
    B id: 2
    C data for B2C2
    Page 7
    A:1 (header items)
    B id: 2
    C data for B2C3
    Page 8
    A:2 (header items)
    etc.
    I am hoping that with this quick sketch someone can tell me how to accomplish the placement of the C items.

    For the time being, I can only respond to Pages for iOS. OS X I'll need to check when I get home (or perhaps someone else will beat me to it). You may wish to post in the Pages for Mac forum for better exposure.
    In Pages for iOS you are limited to a single header and footer. There is no Section structure so no way to do different headers/Footers for different pages (as you can do in MS word for example). To modify the Header and insert the text you want: Tap the Tools icon (wrench in upper right), then Document Set up. Tap in the header field, then tap and hold to use the menu to insert pages numbers, then type the text you need.
    Quite possibly. Check the app store. Or you may be able to set this up in Pages for OS X and import it into Pages on the iPad. I'm not certain the sections will import however.
    Also consider using a different app, such as word for iOS or any of the numerous other word processing apps available.

  • Photo:getDevelopSettings() returning inconsistent results for new fields

    If you're using photo:getDevelopSettings(), see this report of an annoying bug with "new" develop fields such as "Contrast 2012" and "Blacks 2012":
    http://feedback.photoshop.com/photoshop_family/topics/sdk_photo_getdevelopsettings_returni ng_inconsistent_results_for_new_fields?rfm=1

    After several more iterations of testing, I discovered the problem is actually due to using the trinidad rendering kit. Part of my migration to 1.2 involved experimenting with the use of the trinidad components. I thought I had removed all the trinidad stuff from my application during testing of this date problem, but I discovered that I had left the following in:
    web-app library:    trinidad-1.2.10
    faces-config.xml entry:
        <default-render-kit-id>
                org.apache.myfaces.trinidad.core
        </default-render-kit-id>once these items were removed, the application worked as expected. So it looks like the problem is with the trinidad rendering kit/library.
    Edited by: emprice26 on Aug 11, 2009 6:02 PM

  • Help with xsl for multiple child node

    We have the following data.
    row          meID EI
    1          a a1
              a2
              a3
              a4
    2          b b1
              b2
    3          c c1
              c2
    I would like to use XSL to display the data in the fashion:
    <row=1>
    <meID>a</meID>
    <EI>a1</EI>
    <EI>a2</EI>
    <EI>a3</EI>
    <EI>a4</EI>
    </row>
    <row=2>
    <meID>b</meID>
    <EI>b1</EI>
    <EI>b2</EI>
    </row>
    <row=3>
    <meID>c</meID>
    <EI>c1</EI>
    <EI>c2</EI>
    </row>
    Currently, I am only able to get the XSL to lump all the EIs together:
    <row=1>
    <meID>a</meID>
    <EI>a1a2a3a4</EI>
    </row>
    What do I need to change in the XSL to make it display 4 rows of EI?
    Thanks.

    The data should look like:
    1_________a_________a1
    ____________________a2
    ____________________a3
    ____________________a4
    2_________b_________b1
    ____________________b2
    3_________c_________c1
    ____________________c2

  • How to assign ALV for parent node and child node that uses supply method.?

    HI Dear friends,
        I need to display header details ( VBAK ) and Item details ( VBAP ). I have created two node like HEADER_NODE inside this i have created ITEM_NODE for this item node i use supply function 'GET_ITEMS'  any way it is working only when crete two separate table and binding but when i come to work with ALV i am totally confused .. i have created two 'View Controller UI Elements'   when i try to map HEADER_NODE  it mapped properly but for ITEM_NODE it shows mapping already defined. return status message as 'Action Cancelled' . In result both ViewContainer shows only HEADER_NODE data only.
    How to achive ALV for  Parent, child node that uses supply function ? ?
    Thank you

    Delete Mapping is not enabled, that means there is no mapping done yet.
    I just tried what you are saying and the application works and i am able to map the header table and item table and also again i could map the tables any number of times.. i didn't get any such message, sorry i couldn't recreate the scenario. might be there is something wrong in the context.
    i just did it like this.
    Please also move this to Web DynPro Discussion, Hope that would be helpful.
    Message was edited by: Syed Ghulam Ali

  • Modifying child node instances in the foreach loop

    Dear All,
    I have implemented a custom BO with a child node. On executing an action on the root node, i want to loop through the associated child nodes and create an SAP standard BO instance for every child node instance.
    I then want to associate the ID of the standard BO created to a field in the child node.How do i modify the child node instance in this loop?
    Any pointers would be really appreciated.
    Thanks a lot for your help.
    - Kavya

    Hello Kavya,
    First you want to lopo over all child nodes
         ( var myChild in this.Child ) {
    Then you create the standard BO
         customer = Customer.Create();
    Now assign the InternalID to your Child ID
         myChild.ChildId = customer.InternalID;
    HTH,
        Horst

  • Inconsistent results while searching with TREX

    Hi all, iam getting inconsistent results for the same search terms. iam searching for content in a document.one user has read permission on this document and other doesn't. if search using user without read access no results are displayed. i logged in as a user who has read permission in a different window. search for the same content displays the document. and now if i search for the same content for the user who don't have read permission it's displaying the document. ideally it should not display. it would be very helpful if somebody can point what is the problem. thanks in advance.
    regards
    kranthi

    Hi Kranthi,
    could this be a browser caching or credentials per browser session issue?
    - Do you open the new Window with Ctrl-N?
    - Or do you start a completely new browser (click browser icon a second time)? Does it still happen in that case?
    - Does it also happen, if you completely close the browser in between and then re-open?
    - Does it still happen, if you delete the temporary internet files in between? And/or the cookies?
    Regards,
    Karsten

  • How can I remove child node from JTree???

    Hi,
    I would like to remove all the child node of my jtree. For instance I would like to remove the c, d, and e nodes. It's possible to remove all the child node or to remove by her name ("c", "d", and "e"). If yes what is the method that it permit to do.
    A-----
    |
    b-------c
    |
    |--------d
    |
    ---------e
    I use the model : DefaultMutableTreeNode
    Thanks

    There are a couple of ways it can be done. If your tree uses DefaultTreeModel as its TreeModel, you can use removeNodeFromParent(). This will remove the node from its parent and effectively remove its children, too. All nodes removed will be garbage-collected if there are no other references to them.
    If your tree model is not the default tree model, but still uses MutableTreeNode, you can use either remove() or removeFromParent() on the node itself, depending on whether you want to remove the node itself or one of its children.
    On the other hand, your tree may use a model that simply "mirrors" another data structure, in which case you would have to remove the node from the other data structure and have it reflected in the model.

  • Child node initialization.

    Hi all,
    i have a parent node and one child node.
    cardinality of both is "0...n". both are tables. now i want to bind a table to the child node but its dumping giving error as
    "Access via 'NULL' object reference not possible"..when i checked i found the child node is not getting initialized.
    how to initialize the child node  so tht i can use the method "bind_table" using node for tht child node table
    ...please help

    Well you likely need the parent node to have an element first.  However an important question needs to be answered first. What is the Singelton setting on the parent node?  This has a consider effect on how you populate the child node.

  • Delete a node containing a child node with specific value

    Hello,
    I wanted to know how to delete a node which contains specific value in one of its child node.
    Here is the xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <rows>
         <ROW>
              <part_num_ref ID="100124">1</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">2</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">3</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">4</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">5</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">6</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">7</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">8</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">9</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">10</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">11</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">12</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">13</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">14</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">15</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">16</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
         <ROW>
              <part_num_ref ID="100124">17</part_num_ref>
              <part_sht_nam_ref ID="100125">0</part_sht_nam_ref>
              <part_country ID="100026">0</part_country>
              <tot_cost__rtd ID="102281">0</tot_cost__rtd>
              <tot_cost__demo ID="102282">0</tot_cost__demo>
              <tot_cost__tra ID="102283">0</tot_cost__tra>
              <tot_cost__coor ID="102284">0</tot_cost__coor>
              <tot_cost__sprt ID="102285">0</tot_cost__sprt>
              <tot_cost__mng ID="102286">0</tot_cost__mng>
              <tot_cost__oth ID="102287">0</tot_cost__oth>
              <tot_cost ID="100135">0</tot_cost>
              <tot_rcpt ID="102016">0</tot_rcpt>
              <tot_grant ID="100136">0</tot_grant>
         </ROW>
    </rows>
    I would like to delete one of the node <ROW> which contains the value 1 for the child node <part_num_ref >
    Is it possible?
    Thanks in advance for your answers.
    Regards,
    Stessy Delcroix

    The following is a possibility on database version 10.2.x (what database version are you using?):
    Example from XMLDB Developers Guide 10.2
    Example 4-26 Deleting LineItem Element Number 222
    SELECT extract(OBJECT_VALUE,
                   '/PurchaseOrder/LineItems/LineItem[@ItemNumber="222"]')
      FROM purchaseorder
      WHERE existsNode(OBJECT_VALUE,
                       '/PurchaseOrder[Reference="AMCEWEN-20021009123336171PDT"]')
            = 1;
    EXTRACT(OBJECT_VALUE,'/PURCHASEORDER/LINEITEMS/LINEITEM[@ITEMNUMBER="222"]')
    <LineItem ItemNumber="222">
      <Description>The Harder They Come</Description>
      <Part Id="953562951413" UnitPrice="22.95" Quantity="1"/>
    </LineItem>
    1 row selected.
    UPDATE purchaseorder
      SET OBJECT_VALUE =
          deleteXML(OBJECT_VALUE,
                    '/PurchaseOrder/LineItems/LineItem[@ItemNumber="222"]')
      WHERE existsNode(OBJECT_VALUE,
                       '/PurchaseOrder[Reference="AMCEWEN-20021009123336171PDT"]')
            = 1;
    SELECT extract(OBJECT_VALUE,
                   '/PurchaseOrder/LineItems/LineItem[@ItemNumber="222"]')
      FROM purchaseorder
      WHERE existsNode(OBJECT_VALUE,
                       '/PurchaseOrder[Reference="AMCEWEN-20021009123336171PDT"]')
            = 1;
    EXTRACT(OBJECT_VALUE,'/PURCHASEORDER/LINEITEMS/LINEITEM[@ITEMNUMBER="222"]')
    1 row selected.

Maybe you are looking for

  • Contacts on client machine suffer from disk I/O errors

    Contacts are running slow if not at all on my client machines.  I check the logs and it is having trouble with accessing the files and or writing the files.  all other programs seem to work fine.  Mail hangs but I think it is because of the contacts

  • My dvd drive won't open so I can insert a disc.  It has opened in the past by pushing the button on my mac

    I can't insert any dvd's because my dvd drive won't open when I push the open key.  It has always worked in the past.  Any suggestions on how to fix this?

  • Limit QoS

    hi! how limit speed - for windows update? WSA hardware. i find: Set action for 5 applications of type: Software Updates but not avialable - speed limit, use global setting... Software Updates Set default action for application type: Software Updates

  • Can't install a clean Vista 64bit on Satellite P200-1I6

    Hello, i have Toshiba Satellite P200-1I6. I have Product recovery DVD which works, but I want to do a clean install of Vista 64bit OS but my toshiba won't but any Vista version - only Toshiba product recovery DVD. Does someone knows how to fix that?

  • Property Inspector is empty

    Using JDev 10.1.2.1.0 (Build 1913) on XP. When I view the Property Inspector, it's empty. Not just the values, but the entire window. The name of the selected object is in the title bar, and the 7 icons are present, but there is no information in the