Deleting Nodes from XML Tree (JTree)

I have created a XML Tree(extended from JTree) using XNodes ( extended from DefaultMutableTreeNode)
After some insertions, i need to delete certain nodes from the XML Tree.. but after deletion, XNode will be null.
subroutine is as follows...
appreciates any advice
Thanx
private XNode RemoveExtraNode( XNode xNode ){
int child;
String nodeType;
XNode childNode=null;
if ( (child=xNode.getChildCount() ) > 0){
for(int i=0;i<child;i++){
childNode=(XNode)xNode.getChildAt(i);          
     nodeType = childNode.getType();
     if(nodeType.equals("DTD") )
     childNode.removeFromParent();
}//end for (int i=1;i<child;i++)
}//endif((child=xNode.getChildCount())!=0)
return xNode;     
}//RemoveExtraNode

Hi IKEDA
Thanx for the reply.
I have tried xNode.remove(childNode) b4 and it still return a null JTree.
Anyway fyi i discover i can delete last child of xNode and return the correct java tree. therefore to delete a node of my choice i simply insert its next sibling nodes in its place and delete that particular node when it becomes the last child.

Similar Messages

  • Copy node from XML tree problem

    I am trying to copy an XML node 9whic hmay have child nodes) from one tree to another with the code
    nodes = dataDoc.getElementsByTagName("text");
                   currentElement = (Element) nodes.item(0);
                   textNode.appendChild(nodes.item(0).cloneNode(true));
    gives the error
    org.apache.crimson.tree.DomEx: WRONG_DOCUMENT_ERR: That node doesn't belong in this document.
         at org.apache.crimson.tree.ParentNode.checkDocument(ParentNode.java:250)
         at org.apache.crimson.tree.ParentNode.appendChild(ParentNode.java:333)
    What am I doing wrong?
    Regards,
    MArk

    What am I doing wrong?Failing to use the Document.importNode() method.

  • How to delete a perticular node from xml file using java code

    Hii All,
    Now i am trying to delete a perticular node from xml file.Like...
    XML file:
    <Licence>
    <SERVER>
    <was id="1">1</was>
    <was id="2">2</was>
    </SERVER>
    </LICENCE>
    I am working in messaging service using JABBER framework with whiteboard facility.
    Here Some commands i have created to add,modify,delete nodes from xml file.They Are
    1.If u want to add a new node then.
    create Licence.SERVER <ss id="3">ddd</ss> lic.xml
    (here u want to add a new node called "ss" under Licence.SERVER.
    And lic.xml is tyhe xml file name where it was saved.
    2.If u want to delete a node(Suppose <was id="1">),then the command should be
    delete Licence.SERVER.was:id='"1" lic.xml
    A problem arises that here it find two was attributes.And it delete the last was attribute,not the requested node.
    PLEASE HELP ME IN SOLVING THIS CODE..
    ------------------------------------

    Looks like you clicked on "Post" before you pasted in the code you were talking about.

  • Can't remove a node from a tree

    I am using the custom tree dataDescriptor provided in Flex live
    doc. It works for creating the tree and add notes, however when I
    try to remove a node from the tree it cant work. Does anyone have
    any idea?
    This is the code for MyCustomeTreeDataDescriptor.as
    package
    import mx.collections.ArrayCollection;
    import mx.collections.CursorBookmark;
    import mx.collections.ICollectionView;
    import mx.collections.IViewCursor;
    import mx.events.CollectionEvent;
    import mx.events.CollectionEventKind;
    import mx.controls.treeClasses.*;
    public class MyCustomTreeDataDescriptor implements
    ITreeDataDescriptor
    // The getChildren method requires the node to be an Object
    // with a children field.
    // If the field contains an ArrayCollection, it returns the
    field
    // Otherwise, it wraps the field in an ArrayCollection.
    public function getChildren(node:Object,
    model:Object=null):ICollectionView
    try
    if (node is Object) {
    if(node.children is ArrayCollection){
    return node.children;
    }else{
    return new ArrayCollection(node.children);
    catch (e:Error) {
    trace("[Descriptor] exception checking for getChildren");
    return null;
    // The isBranch method simply returns true if the node is an
    // Object with a children field.
    // It does not support empty branches, but does support null
    children
    // fields.
    public function isBranch(node:Object,
    model:Object=null):Boolean {
    try {
    if (node is Object) {
    if (node.children != null) {
    return true;
    catch (e:Error) {
    trace("[Descriptor] exception checking for isBranch");
    return false;
    // The hasChildren method Returns true if the node actually
    has children.
    public function hasChildren(node:Object,
    model:Object=null):Boolean {
    if (node == null)
    return false;
    var children:ICollectionView = getChildren(node, model);
    try {
    if (children.length > 0)
    return true;
    catch (e:Error) {
    return false;
    // The getData method simply returns the node as an Object.
    public function getData(node:Object,
    model:Object=null):Object {
    try {
    return node;
    catch (e:Error) {
    return null;
    // The addChildAt method does the following:
    // If the parent parameter is null or undefined, inserts
    // the child parameter as the first child of the model
    parameter.
    // If the parent parameter is an Object and has a children
    field,
    // adds the child parameter to it at the index parameter
    location.
    // It does not add a child to a terminal node if it does not
    have
    // a children field.
    public function addChildAt(parent:Object, child:Object,
    index:int,
    model:Object=null):Boolean {
    var event:CollectionEvent = new
    CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
    event.kind = CollectionEventKind.ADD;
    event.items = [child];
    event.location = index;
    if (!parent) {
    var iterator:IViewCursor = model.createCursor();
    iterator.seek(CursorBookmark.FIRST, index);
    iterator.insert(child);
    else if (parent is Object) {
    if (parent.children != null) {
    if(parent.children is ArrayCollection) {
    parent.children.addItemAt(child, index);
    if (model){
    model.dispatchEvent(event);
    model.itemUpdated(parent);
    return true;
    else {
    parent.children.splice(index, 0, child);
    if (model)
    model.dispatchEvent(event);
    return true;
    return false;
    // The removeChildAt method does the following:
    // If the parent parameter is null or undefined, removes
    // the child at the specified index in the model.
    // If the parent parameter is an Object and has a children
    field,
    // removes the child at the index parameter location in the
    parent.
    public function removeChildAt(parent:Object, child:Object,
    index:int, model:Object=null):Boolean
    var event:CollectionEvent = new
    CollectionEvent(CollectionEvent.COLLECTION_CHANGE);
    event.kind = CollectionEventKind.REMOVE;
    event.items = [child];
    event.location = index;
    //handle top level where there is no parent
    if (!parent)
    var iterator:IViewCursor = model.createCursor();
    iterator.seek(CursorBookmark.FIRST, index);
    iterator.remove();
    if (model)
    model.dispatchEvent(event);
    return true;
    else if (parent is Object)
    if (parent.children != undefined)
    parent.children.splice(index, 1);
    if (model)
    model.dispatchEvent(event);
    return true;
    return false;
    This is my tree definition:
    <mx:Tree width="143" top="0" bottom="0" left="0"
    height="100%"
    id="publicCaseTree"
    dataDescriptor="{new MyCustomTreeDataDescriptor()}"
    dataProvider="{ac}"
    defaultLeafIcon="@Embed('assets/caseIcon.png')"
    change="publicTreeChanged(event)"
    dragEnabled="true"
    dragMoveEnabled="false"/>
    This is how I remove the selected node from the tree. When
    Delete button is clicked, the doDeleteCase function is
    exectuted.
    public function publicTreeChanged(event:Event):void {
    selectedNode =
    publicCaseTree.dataDescriptor.getData(Tree(event.target).selectedItem,
    ac);
    public function doDeleteCase(event:Event):void{
    publicCaseTree.dataDescriptor.removeChildAt(publicCaseTree.firstVisibleItem,
    selectedNode, 0, ac);
    Any help would be appreciated.Thanks.

    Finally I removed nodes from tree, but not sure I did in the
    right way. Anybody encounter the same problem, please
    discuss.

  • Help needed in deleting nodes from RAC database

    Our DB is 10g RAC database and the servers are Window 2003 server. Initially the database was configured to have 4 nodes. For some reason we stopped the instances in the first two nodes and the current database is running on node3 and node4. I queried the v$thread view and it shows 3 records. Thread 2 is closed and disabled. Thread 3 is open and public and thread 4 is open and private. Now we need to disconnect nodes 1 and 2 from RAC db and cluster ware (We use Oracle cluster ware) and plan to use those two servers for other purposes. Although I read through the Oracle doc regarding deleting node from RAC “11 Adding and Deleting Nodes and Instances on Windows-Based Systems” and wrote down the steps we need to take but I am still not comfortable in doing it since it is production env and we don’t have any dev env to practice those steps. So I would like to borrow your experiences and your lessons learned while you were doing those. Please share your thoughts and insights with us.
    Thank you so much for your help,
    Shirley

    what's your full version? I can warn about specific issues in 10.1.0.3 and 10.2.0.1 - for example, in some cases (depending on how the listener was configured), it will be impossible to delete the listener for the deleted node. Known bug.
    To avoid many many known bugs, you may want to upgrade to at least 10.2.0.2 before removing a node (from my experience, this is the first stable RAC version).
    In any case, deleting a node is a rather delicate process. I really really recommend practicing. Take any pc/laptop, install VMWARE, define two virtual machines, install RAC and remove one node. It will take you an extra day or two, and could save your production.

  • 3750x Stack UTIL-3-TREE: Data structure error--attempt to remove an unthreaded node from a tree

    A Cisco Stack 3750X switch report the following error message:
    %UTIL-3-TREE: Data structure error--attempt to remove an unthreaded node from a tree.
    every minute +-20 sec
    Cisco IOS Software, C3750E Software (C3750E-IPBASEK9-M), Version 15.0(2)SE4, RELEASE SOFTWARE (fc1)
    analog bug: https://tools.cisco.com/bugsearch/bug/CSCsz93221

    WS-C3750G-24PS-E C3750-IPBASEK9-M version 12.2(53)SE2
    After implementing 802.1x with Avaya IP phones
    %UTIL-3-TREE: Data structure error--attempt to remove an unthreaded node from a tree
    Port then fails authentication and goes into vl-err-dis

  • Update or delete table from XML

    Is it possible to update or delete table's row from XML file?
    Thanks
    Prasanta De

    Hi Steve,
    Thanks for your reply but I could not find any example from the documentation for update-request or delete-request. I need your help in this regards.
    1. I have emp table with many rows and the simple structure like this
    DEPTNO NUMBER(2)
    EMPNO NUMBER(2)
    EMPNAME VARCHAR2(20)
    EMPSAL NUMBER(8,2)
    Key is defined on deptno and empno
    2. I have a xml file like this
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <DEPTNO>1</DEPTNO>
    <EMPNO>11</EMPNO>
    <EMPSAL>1111.11</EMPSAL>
    </ROW>
    <ROW num="2">
    <DEPTNO>1</DEPTNO>
    <EMPNO>12</EMPNO>
    <EMPSAL>2222.22</EMPSAL>
    </ROW>
    <ROW num="3">
    <DEPTNO>1</DEPTNO>
    <EMPNO>13</EMPNO>
    <EMPSAL>3333.33</EMPSAL>
    </ROW>
    </ROWSET>
    3. I want that xsql servlet will read this xml file and update EMPSAL column depending upon the value of DEPTNO and EMPNO from xml file.
    Please let me know how I should use update-request in xsql page.
    Thanks
    Prasanta De
    null

  • Program to add node /  delete node in the tree control via abap object

    Hi all,
    i am new to abap objects.
    Can anyone help me out to give program about add node , delete node at
    a particular point in tree hierarchy.
    folder1                     -- level 1
    subfolder1          -- level 2
    *********subfolder1   -- level 3
    *********subfolder2  -- level 3
    subfolder2          -- level 2
    folder2                     -- level 1
    if i select level3 and click on ADD button .....i get a facility to add new node
    at level 3 and and same thing can happen at level1 and level2 ............ if i select
    and folder at level3 and click on delete button ....it should delete that folder...
    if you do not have such program ........then guide me how to achieve this target via object oriented because i have to split the screen also and have to show some alve display in that.
    just guide me how to add and delete node at a particular level in tree structure....
    thanks in advance........

    Hello Ravi,
    Try this demo program:
    <b>BCALV_TREE_01</b>
    <b>BCALV_TREE_DEMO</b>
    BCALV_TREE_SIMPLE_DEMO
    Also try:
    BCALV_TREE_02
    BCALV_TREE_03
    BCALV_TREE_04
    BCALV_TREE_05
    BCALV_TREE_06
    regards,
    Beejal
    **reward if this helps

  • Remove node from XML with E4X

    How do i do it? I've tried "delete node;" or even node =
    null;

    Ok, i found a solution to it...
    The problem was first of all mostly that i was trying to do
    it dynamically, without really telling the name of the child that i
    would like to remove.
    So, if it was only this that needed to be done:
    delete xml.hello;
    and the xml looks like
    <xml>
    <hello>something</hello>
    </xml>
    it would work. But now i tried to remove a node without
    knowing the name of it.
    but it works when i did like this:
    var node : XML = XML( checkbox.data.node );
    var nodeParent : XML = node.parent();
    delete nodeParent[node.name()][node.childIndex()];
    And it works!
    I don't know if it's the best way, but it works and i'm
    happy...

  • Using Java, How can I Update, Add, Delete nodes in XML Files.

    Hi,
    I want to store the student record (like Name, Age, school name, total mark etc.,) as nodes in the XMLfile. Also I should able to Update, Add, Delete any nodes (student record) in the XML file. How can I achieve this...using Java
    I am able to read the content of the xml file using xml-parser. But my problem is
    updating the xml file.
    pls suggest some solutions or links with " example source code"
    Thanks :-)

    There are 2 kinds of XML parsers : SAX and DOM. DOM seems to suit your need. You can use JAXP APIs to add, delete or change nodes or attributes.
    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/TOC.html provides contents that would satisfy most of the needs.
    To save a DOM modified XML file use java IO APIs to write to the same file from which it was read using a Document object ( doc.getNodeValue() ).

  • Delete elements from XML file using DOM and java

    Hi
    I want now is to remove element from my XML file
    for example
    i have following xml
    <?xml version="1.0" encoding="UTF-8"?>
    <printing>
    <firstLineTexts>
              <firstLineText />
              <firstLineText>|line11</firstLineText>
              <firstLineText>|line12</firstLineText>
    </firstLineTexts>
    </printing>how do i remove all elements fireLineText
    my final output should be
    <?xml version="1.0" encoding="UTF-8"?>
    <printing>
    <firstLineTexts>
    </firstLineTexts>
    </printing>How do i do it using DOM,
    I can create instance of DOM and write it using TransformerFactory
    Ashish

    Hi
    I am trying the following code,
    but it is not working
                    NodeList nScene = doc.getElementsByTagName("firstLineTexts");
              NodeList nScene1 = nScene.item(0).getChildNodes();
              for (int i = 0; i < nScene1.getLength(); i++)
                   Node n = nScene1.item(i);
                        nScene.item(0).removeChild(n);
              }

  • Using assign-activity:Append to append child nodes in XML-tree within loop

    I would like to produce an XML looking something like this (just an example):
    &lt;Customer&gt;
    &lt;Name&gt;Tom&lt;/Name&gt;
    &lt;Invoices&gt;
    &lt;Invoice&gt;
    &lt;InvoiceData&gt;.....&lt;/InvoiceData&gt;
    &lt;/Invoice&gt;
    &lt;Invoice&gt;
    &lt;InvoiceData&gt;.....&lt;/InvoiceData&gt;
    &lt;/Invoice&gt;
    &lt;/Invoices&gt;
    &lt;/Customer&gt;
    For different reasons (composite PK's in DB etc) I have to first get the Customer-data, and then get each Invoice for that customer.
    Then I have to loop the Invoices and append each Invoice-node to the XML, ending up with the whole thing when the loop is finished.
    This should be pretty simple (I guess), and I have tried different variations of the Append (assign activity), but everytime I end up with only the last Invoice-node.
    I can see in the Flow-window of the BPEL Console that it is not the same Invoice-node I'm appending within the loop-iterations, so that can not be the case in any way.
    In other words it seems to copy instead of appending.
    What is wrong ?
    Is this a bug in the Append function ?
    Any suggestions to other approaches that might work ? (I have to use the loop to get 1 and 1 Invoice-node though, and in that way put the whole XML together in some way)
    Edited by: user1694182 on 09.okt.2008 05:08

    Thank you for your answer.
    After taking your "debugging"-suggestions at hand and running some tests, I can now see that it gets appended in some way, but not correctly.
    1st LOOP ROUND:
    <installation>
    <measurePoints>
    <measurePoint><measurePointId>308</measurePointId>...</measurePoint>
    </mesurePoints>
    </installation>
    Correct so far.
    2nd LOOP ROUND:
    <installation>
    <measurePoints>
    <measurePoint><measurePointId>322</measurePointId>...</measurePoint>
    <measurePoint><measurePointId>322</measurePointId>...</measurePoint>
    </mesurePoints>
    </installation>
    So now it appends the new measurepoint, but overwrites the 1st as well... Strange..
    3rd LOOP ROUND (last round):
    <installation>
    <measurePoints>
    <measurePoint><measurePointId>382</measurePointId>...</measurePoint>
    <measurePoint><measurePointId>382</measurePointId>...</measurePoint>
    </mesurePoints>
    </installation>
    So suddenly the same Append doesn't append, but overwrites the 2 I had with the new measurepoint...Strange...
    WHAT I DO IN MORE DETAIL:
    1: Assign(copy) the whole XML in the 1st loop round. (Copy - FROM: submitInstallation_InputVariable - TO: Powel_InstallationServiceInput)
    2: Within each loop round I collect the whole XML with just 1 measurePoint (TransformActivity - FROM: DBAdapter-output - TO: submitInstallation_InputVariable).
    3: Within each loop round I then append the new measurePoint (collected in step 2) to the measurePoints-node. (Append - FROM: submitInstallation_InputVariable - TO: Powel_InstallationServiceInput)
    PS! I can see in the BPEL Console that it is a new measurePoint that gets collected in step 2, and just 1 node.
    Help/tips on this is very appreciated ! :-)
    Edited by: user1694182 on 14.okt.2008 00:57

  • How to retrieve a child node's immediate parent node from a tree table?

    Hello
    Hi,
    I have a category_subcategories table, and I would like to know how to construct a sql and sub-sql for retrieving a child node's immediate parent node.
    Here is my first part of the sql, it only returns the node "Flash"'s parent and its grand-parents:
    SELECT parent.category_name, node.lft, node.rgt
    FROM category_subcategories AS node,
    category_subcategories AS parent
    WHERE node.lft > parent.lft AND node.lft < parent.rgt
    AND node.category_name = 'FLASH'
    ORDER BY parent.lft;
    | name |
    | ELECTRONICS |
    | PORTABLE ELECTRONICS |
    | MP3 PLAYERS | |
    how can I modify this query so that it returns Flash' parent - 'MP3 Players'?
    Thanks a lot
    Sam

    Hi,
    This is an Oracle forum. If you're not iusing Oracle, make that clear. Always say what version of your softwate you're using, whether it's Oracle or anything else.
    Whenever you have a question, post a little sample data (CREATE TABLE and INSERT statements), and the results you want from that data. Explain how you get those results from that data.
    It looks like you're using the Nested Sets technique for modeling a tree. To get the parents of given nodes, do something like this:
    SELECT        parent.category_name
    ,       node.lft
    ,       node.rgt
    FROM        category_subcategories      node     -- Can't use AS with table alias in Oracle
    ,       category_subcategories      parent
    WHERE        parent.lft      IN (
                        SELECT     MAX (lft)
                        FROM     category_subcategories
                        WHERE     lft     < node.lft
                        AND     rgt     > node.rgt
    AND        node.category_name          = 'FLASH'
    ORDER BY  parent.lft; This should work in Oracle 8.1 and up. (I can't actually test it unless you post CREATE TABLE and INSERT statements for some sample data). You may need to modify the syntax a little for your database.
    785102 wrote:
    Hello,
    I tried to implement the solution as follow:
    mysql> select parent.*
    -> from category_subcategories as parent
    -> having parent.lft =
    -> (select max(parent.lft) from
    -> (SELECT parent.category_name, parent.lft, parent.rgt
    -> FROM category_subcategories AS node,
    -> category_subcategories AS parent
    -> WHERE node.lft > parent.lft AND node.lft < parent.rgt
    -> AND node.category_name = 'Sofa'
    -> ORDER BY parent.lft
    -> )
    -> );
    ERROR 1248 (42000): Every derived table must have its own alias
    mysql>
    But I got an error.
    What is wrong with it?What does the error message say?
    Apparantly, in your system (unlike Oracle), every sub-query must have a name. Try something like this:
    select      parent.*
    from      category_subcategories as parent
    having      parent.lft = (
                   select      max(parent.lft)
                   from     (
                             SELECT        parent.category_name
                             ,       parent.lft
                             ,       parent.rgt
                             FROM        category_subcategories      AS node,
                                    category_subcategories      AS parent
                             WHERE        node.lft      > parent.lft
                             AND        node.lft      < parent.rgt
                             AND        node.category_name = 'Sofa'
                             ORDER BY  parent.lft     -- Is this a waste of effort?
                        )  AS got_name_lft_and_rgt
                  )     AS got_lft
    ;What is the purpose of having the inner sub-query, the one I called got_name_lft_and_rgt?
    Also, in Oracle, an ORDER BY clause in a sub-query doesn;t guarantee that any super-queries will keep that order. Why do you have an ORDER BY clause in the sub-query, and not in the main query?

  • Retrieve / Search specific Node from XML File

    Hello,
    i have a question about reading (searching) XML File within PL SQL:
    There is a XML file with following structure:
    <root>
      <Hnode1 attr1="value1" />
      <Hnode2 attr1="value1" />
         <node1_of_Hnode2 id="10" personname="Steven"/>
         <node2_of_Hnode2 id="20" personname="Christian"/>
         <node3_of_Hnode2 id="30" personname="Arnold"/>
      <Hnode2/>
    <root/>How it is possible to filter a node by one of its attribute value. For example:
    I know the id of a person - lets say id =20. In this case i would like to get the whole node (in this case node2_of_Hnode2) to get the personname => "Christian".
    Just like a SELECT statement (WHERE ID = 20)
    Is there a possibility the get this by one command or should it be looped over all Rows of the Document?. Can you please provide an example for me.
    Thank you in advice!

    Database version is 10.Sorry, that's not a version.
    For example :
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE     10.2.0.5.0     Production
    TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    How to use the extraction of values?
    1.Better in Select statement; assigning directli in a variable or using xmlquery function?.PL/SQL or SQL calls to XMLType methods such as extract() or getStringVal() should be equivalent (putting aside the context switch).
    However, none of them is the correct way to retrieve a scalar value from a given node.
    You must use extractValue() function instead (SQL only) for release < 11.2 and XMLCast/XMLQuery starting with 11.2.
    One more Question:
    I have seen a lot of options to handle with XML Files.
    So in my case only querying data in XML Files is relevant.
    I have seen many APIs called XMLDOM, DMBS_XMLDOM, XMLTYPE...
    When to use these APIS. Can you give me some input on that please?That's a broad topic.
    A relevant answer will depend on your requirement.
    - Do you have to process large files, and if so how large?
    - Is performance/memory management a concern for you?
    - Do you want to extract single values, or process the XML content as relational data?
    If you have any specific test case to show us, please post in the {forum:id=34} forum, and make sure you include all the necessary details (see the FAQ).
    Edited by: odie_63 on 23 févr. 2012 11:35

  • Read Xml Child node from XML Blob

    Hi Gurus,
    Greetings
    I am working in oracle 10g /Solaris platform.
    I have table with columns namely id varcha2,pmt blob.
    PMT stores xml file.
    <Products xmlns:source="http://apache.org/cocoon/source/1.0" DocStatus="approved" DocTimeStamp="2013-04-18T06:52:14" DocType="PMT" DocVersion="xUCDM_product_external_1_3.xsd">
    <Product Country="DE" IsAccessory="false" IsLocalized="true" IsMaster="false" Locale="de_DE" lastModified="2013-04-18T00:08:11" masterLastModified="2013-02-25T14:46:40">
    <Assets>
      <Asset code="46PFL8008S_12" description="User manual" extension="pdf" extent="3359201" lastModified="2013-04-18" locale="de_DE" number="001" type="DFU">http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_dfu_deu.pdf</Asset>
      <Asset code="46PFL8008S_12" description="Leaflet" extension="pdf" extent="970750" lastModified="2013-04-18" locale="de_DE" number="001" type="PSS">http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_pss_deu.pdf</Asset>
      <Asset code="46PFL8008S_12" description="Quick start guide" extension="pdf" extent="911832" lastModified="2013-04-18" locale="de_DE" number="001" type="QSG">http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_qsg_deu.zip</Asset>
      <Asset code="46PFL8008S_12" description="Front product photograph - highres 2196x1795" extension="jpg" extent="1989253" lastModified="2013-04-18" locale="global" number="001" type="_FP">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-_FP-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 1 - highres 2196x1795" extension="jpg" extent="603474" lastModified="2013-04-18" locale="global" number="001" type="A1P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A1P-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 2 - highres 2196x1795" extension="jpg" extent="407701" lastModified="2013-04-18" locale="global" number="001" type="A2P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A2P-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 3 - highres 2196x1795" extension="jpg" extent="174261" lastModified="2013-04-18" locale="global" number="001" type="A3P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A3P-global-001</Asset>
      <Asset code="46PFL8008S_12" description="Alternative product photograph 4 - highres 2196x1795" extension="jpg" extent="109712" lastModified="2013-04-18" locale="global" number="001" type="A4P">http://images.abc.com/is/image/abcConsumer/46PFL8008S_12-A4P-global-001</Asset>
       </Assets>
    </Product>
      </Products>');
      I want the extract the ids from the table where pmt contains the child node (asset) contains .zip
    for example http://download.p4c.abc.com/files/4/46pfl8008s_12/46pfl8008s_12_qsg_deu.zip
    Then, I tried like this...
      select r.* from
       (SELECT xmltype(pmt) object_value
                     FROM PRODUCT_TR_PMT
                     XMLTABLE
                                     'for $Product  in $TEST/Products/Product/Assets/Asset
                                         return <RESULT>
                                                   $Product                     
                                                </RESULT>'
                                     passing OBJECT_VALUE as "TEST"   
                                     columns Asset path 'Asset' 
                                 ) r;
    ORA-02263: need to specify the datatype for this column
      Could you kindly help.
    Thanks
    Raj

    Blob storage we (db folks) dont have any control its from application standard design.
    If necessary, i can create function blob to clob.
    Kindly help me in extracting child node which contains zip.
       select r.* from
       (SELECT xmltype(pmt) object_value
                     FROM PRODUCT_TR_PMT
                     XMLTABLE
                                     'for $Product  in $TEST/Products/Product/Assets/Asset
                                         return <RESULT>
                                                   $Product                     
                                                </RESULT>'
                                     passing OBJECT_VALUE as "TEST"   
                                     columns Asset varchar2(255) path 'Asset' 
                                 ) r;
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'XMLTYPE'Thanks
    Raj

Maybe you are looking for

  • How to configure the .ini file with applet

    hai i am using native methods in that methods they use some ip addresses. when i am using that native methods in applet run the applet using appletviewer tool it works fine but when i am open that applet using html page browser not configure that .in

  • Payment cards authorization error

    hai everybody can u please tell is there any field related to STATE in customer master data in standard please help me out thank you

  • How to bring loan balances in FI

    Dear Experts, We have uploaded employee data (loan, advances etc) in HR but not flowing in FI. How to bring those balances in FI Can you please suggest me, Regards, Rao

  • Data miss match

    HI sdn Gurus,can anybody share with me some real time issues related to data miss match in support project.i am in need of it.i just want to know that what are the issue did comes related to data miss match in production & support environment.

  • Migrating from Cognos ReportNet to OBI EE

    Hi all. Has anyone done a migration from Cognos ReportNet to OBI EE? I'm tiring to determine what task need to be performed, what can be leveraged from ReportNet as it pertains to reports and models, etc. Any feedback and/or real world experience wou