XML nodes, and elements... Oh my...

The data I've entered my web service return are in the following structure


  
    74
    Testmark Corporation
  
  
    739
    Testing Services
  
  
    753
    E. Tester
  
  
    292
    Test Name 1
  

Now. all I want to do is to translate these data, so first of all because I can't use a string in a flow since it is the analysis for the uses of document, I save the file to the phone, not a big deal, double works, what ever, now on the problem, trying to analyze this list I have the following code :

try
{
  DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
  DocumentBuilder builder = factory.newDocumentBuilder();
  InputStream inputStream = (InputStream)Connector.openInputStream(_xmlFileName);
  Document document = builder.parse( inputStream );
  Element rootElement = document.getDocumentElement();
  rootElement.normalize();
  NodeList list=rootElement.getElementsByTagName("SearchResults");
  if(list.getLength()>0)
  {
    results=new KeyValuePair[list.getLength()];
    for(int i=0;i0)
        {
            Node CID = childNodes.item(1); // for some reason this is always 1 and not 0
        Node CME = childNodes.item(2); // this does not exist no matter what I try
        String cid = (CID.getNodeValue()==null)?CID.getNodeName():CID.getNodeValue();
        String cname = (CME.getNodeValue()==null)?CME.getNodeName():CME.getNodeValue();
        KeyValuePair kp = new KeyValuePair(cid, cname);
        log("---------------------------------------");
        log("CID: " + cid);
        log("CME: " + cname);
        log("---------------------------------------");
        results[i]=kp;
        }
        }
    }
    log("Total Results: " + list.getLength());
    log("Items to list: " + results.length);
  }
}
catch(Exception ex)
{
  log(ex.toString());
}

Now, what have discovered is that comes from the name of node by ONLY for CID, no GUY and I can not get the value of the node, copy the following code for the child nodes should only have a count for 2 for child nodes, but there the same indictment as the parent which is 4 which is how many are in the file What on earth am I overlooking?

You can try something like this:

Tags: BlackBerry Developers

Similar Questions

  • Hidden nodes and elements of block diagram

    Hi all

    I have this bizarre situation where having a terribly huge program, strange things happening. The main loop which is a massive, while the loop has been resized a few times in the past and now, the conditional element "stop to true.

    the while loop is nowhere to be found but hidden away. All I can see are the dotted lines that connects the stop button to it. Extend the while loop to reach it seems to do nothing as long as it continues to be somewhere there. the while loop seems to be already reached their limit and cannot be expanded more. I tried the block diagram cleanup but its useless because it is another problem in the huge program, it does not cleaning for a reason any and she would have uncovered more problems. If anyone has an idea out there, please let me know. Thank you!

    Another way to get a tune-up of hidden node is executed Analizer VI and the report will have a list of hidden objects...  Just double-click the warning and the node will focus!  then use the arrow keys to bring it back in the display.

  • Clone several nodes and appl_top shared using the XML file backup

    Can I use work save file of application context to repeat the clones and avoid to perform following steps:

    -Configure the node C (run '"perl adclonectx.pl sharedappltop contextfile = < context of Applications for the existing node file >' and ' perl-I < AU_TOP > / perl txkSOHM.pl"orders ")

    If I work the previous clone XML, I would be able to use the same XMl file for re - clone without implement shared appltop and add a node step. Please, share your ideas.

    ma_apps wrote:
    Can I use work save file of application context to repeat the clones and avoid to perform following steps:

    -Configure the node C (run '"perl adclonectx.pl sharedappltop contextfile =' and 'perl - I /Perl txkSOHM.pl"orders)

    If I work the previous clone XML, I would be able to use the same XMl file for re - clone without implement shared appltop and add a node step. Please, share your ideas.

    You should be able to use it. However, according to the Oracle docs support is to clone the main node and add more nodes by cloning the context files.

    Cloning Oracle Applications Release 11i with rapid Clone [ID 230672.1]
    Sharing the Application Tier file system in Oracle Applications Release 11i [ID 233428.1]

    Cloning Oracle Applications V12 with rapid Clone [ID 406982.1]
    Share Application-level file system in Oracle E-Business Suite Release 12 [384248.1 ID]

    Thank you
    Hussein

  • No idea how to loop and add the value to the attribute of the xml node?

    I work on a lot of flattening of project using a watched folder.

    I have a process parent to locate the directory and call a sub-process to flatten PDF files.

    I want to write the directory failed to XML.

    If there are several directory failed locations and if I want to add it to the node, he doesn't let me do.

    If I set the Xpath location like/process_data/outputXML/flattenDirectoryRequestMessage/failureFileLocation[x]/@path it gives me invalid character exception. I use 'x' for looping and incrementing.

    If I do not use the [x]. The directory is overwritten.

    No idea how loop and add all the directories failed to attribute of the xml node?

    I understand that you can not browse the xml code to assign the value at each node. Rather you can assign only one time to the node.

    I realized that it is not possible to do it this way. Then concatenate it as strings, and then attach to the xml once.

  • How to extract data from an arbitrary xml file and export it to a CSV friendly?

    Hallo,
    I am facing big problems in the use of XML files. I have a
    application that generates XML files with clusters containing arrays
    and scalars as in the example pasted below. My task is to
    Read it and export the data into a CSV document readable by a human.
    Since I do not know the actual content of the cluster, I need some sort
    Smart VI through the XML looking for berries
    and other data structures for export properly in the CSV file
    format (columns with headers).
    Thank you



    3


    6


    0



    1



    2



    3



    4



    5




    3.14159265358979



    Ciao

    Rather than to get the

    node, you can just go directly to the node since ' one that really interests you. Basically what it means to determine the elements of table how much you have, and it depends on if you have 1 or 2 knots . The rest is just of the child nodes and the next siblings. See attachment as a starting point. The attached XML file is a table 2D (change the .xml extension).

    Notes on the example:

    • I did not close properly references, so it's something you need to do.
    • It is limited to tables 1 d or 2D.
    • I suggest using a control path of the file to specify the input XML file and path of the file/folder control to specify the location of the output file.

  • Impossible to analyze the xml.aspx contained in the main.js.Iam get the following error"could not obtain XML document, and the connection has failed: status 500

    Impossible to analyze the xml.aspx contained in the main.js.Iam get the following error"could not obtain XML document, and the connection has failed: status 500

    My main.js resembles

    xmlDataSource var = {}
     
    URL: 'dcds. - symbianxml.aspx", etc. (sample).
     
    init: function() {}
    URL, successful reminder, the reminder of failure
    This.Connect (this.) (URL, this.responseHandler, this.failureHandler);
    },
     
    /**
    * Analyzes the XML document in an array of JS objects
    @param xmlDoc XML Document
    * @returns {table} array of objects of the device
    */
    parseResponse: {function (xmlDoc)}
        
    var chElements = xmlDoc.getElementsByTagName ("channel");
       
    channels of var = [];
      
    Console.log (chElements.Length);
      
    for (var i = 0; i)< chelements.length;="">
        
    var channel = {};
       
    for (var j = 0; j)< chelements[i].childnodes.length;="">
        
    var node = Sublst.ChildNodes(1).ChildNodes(0) chElements [i] [j];
                
    If (node.nodeType! = 1) {//not an element node}
    continue;
    }
           
    Channel [node. TagName] = node.textContent;
    }
       
    Channels.push (Channel);
    }
    Console.log (Channels.Length);
    return the strings;
    },
     
    /**
    Manages the response and displays the data from device web app
    @param xmlDoc
    */
    responseHandler: {function (xmlDoc)}
      
    var channel = this.parseResponse (xmlDoc);
    var markup = "";
       
    for (i = 0; i< channels.length;="">
       
    markup += this.generateHTMLMarkup (i, channels [i]);
    }
    document.getElementById("accordian").innerHTML = mark-up;
    },
     
    /**
    Generates HTML tags to insert in to the DOM Web App.
    * @index i, index of the device
    @param device, device object
    */
    /*
    generateHTMLMarkup: function (i, channel) {}
      
    var str ="";
    "Str += '.


    ' onclick =-"mwl.setGroupTarget ('#accordian ',' #items_" + i + "', 'ui-show ',' ui - hide');" + ".
    "mwl.setGroupTarget ('#accordian ',' item_title_ #" + i + "', 'ui-open', 'ui-farm'); Returns false; \ » > » ;
    "" Str += "" + channel ['name'] + ' ";
    "Str += '.
    ";
    "Str += '.
    ";
    "Str += '.
    "+" id: "+ channel ['id'] +" ' "
    ";
    "Str += '.
    "+" type: "+ channel ['type'] +" ' "
    ";
    "Str += '.
    "+" language: "+ channel ['language'] +" ' "
    ";
    "Str += '.
    «+ "bandwidth:" + "fast" channel + "»»
    ";
    "Str += '.
    "+" cellnapid: "+ channel ["cellnapid"] +". "
    ";
    "Str += '.
    «+ ' link: '+'start the video »»
    ";
    "Str += '.
    ";
    return str;
    },*/
    generateHTMLMarkup: function (i, channel) {}
       
    var str ="";
    "Str += '.
    ";
    str +=  "" +
    "" + channel ['name'] + ""+""
    ";
    "Str += '.
    «+ ' link: '+'start the video »»
    ";
         
    return str;

    },
     
    failureHandler: {function (reason)}
    document.getElementById("accordian").innerHTML = "could not get XML document.
    '+ reason;
    },
     
    /**
    Retrieves a resource XML in the given URL using XMLHttpRequest.
    @param url URL of the XML resource to retrieve
    @param called successCb, in the XML resourece is recovered successfully. Retrieved XML document is passed as an argument.
    @param failCb called, if something goes wrong. Reasons, in text format, is passed as an argument.
    */

    Connect: {function (url, successCb, failCb)
      
    var XMLHTTP = new XMLHttpRequest();
      
    XMLHTTP. Open ("GET", url, true);

    xmlhttp.setRequestHeader("Accept","text/xml,application/xml");
    xmlhttp.setRequestHeader ("Cache-Control", "non-cache");
    xmlhttp.setRequestHeader ("Pragma", "non-cache" "");
      
    var that = this;
    XMLHTTP.onreadystatechange = function() {}
       
    If (xmlhttp.readyState == 4) {}
        
    If (XMLHTTP. Status == 200) {}
         
    {if (!) XMLHTTP.responseXML)}
    try {}
    If server has not responded with good an XML MIME type.
    var domParser = new DOMParser();
    var xmlDoc = domParser.parseFromString(xmlhttp.responseText,"text/xml");
           
    successCb.call (that, xmlDoc);
           
    } catch (e) {}
    failCb.call (, "answer was not in an XML format.");
    }
              
    } else {}
    successCb.call (that, xmlhttp.responseXML);
    }
    } else {}
    failCb.call (this, "connection failed: status"+ xmlhttp.status ");
    }
    }
    };
    XMLHTTP. Send();
    }
    };

    Please see the content in main.js is fully analyzed.

    Forward for the solution to my request all members of the community...

  • Find the empty XML node on a table with 15 M lines

    I have a query that runs to always seek to empty xml node.

    CREATE TABLE TEST_TAB (ID number, doc XMLTYPE);

    SELECT COUNT (1)

    OF test_tab

    WHERE ((XMLEXISTS (declare default element namespace "http://oracle.com/»;)))  * / EmployeeNode / text () [not (empty (.))]'

    PASSAGE DOC)));

    Are there specific oracle or operator XML text that is more effective to check null values or a specific type of text/xml index that is best suited looking for nulls in the whole of nodes?

    Thank you

    Kevin

    In the meantime, here's a test on a similar scenario.

    It seems that the structured XMLIndex gives the best response time. The obvious drawback is that she is very specific and cannot be used to solve other queries.

    SQL > drop table test_tab is serving;

    Deleted table.

    SQL > create table test_tab like

    2. select id, cast (level as number)

    3, xmlparse (document

    4'http://xmlns.example.org ">"

    5         || -case when mod (level 5) = 0 then end level

    6         || '' correct

    (7) doc

    8 double

    9 connect by level<= 100000="">

    Table created.

    SQL > set timing on

    SQL > define pages 100

    SQL > set lines 200

    SQL > set autotrace on explain

    SQL >

    SQL > exec dbms_stats.gather_table_stats (user, 'TEST_TAB');

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:00.92

    SQL > select count (*)

    2 of test_tab

    3 where (xmlexists)

    4 ' declare default element namespace "http://xmlns.example.org"; / root/item/Text () '

    5 passage doc

    6  ) ;

    COUNT (*)

    ----------

    20000

    Elapsed time: 00:00:09.09

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 2371188561

    --------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    --------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |          |     1.   125.   271 (1) | 00:00:04 |

    |   1.  GLOBAL TRI |          |     1.   125.            |          |

    |*  2 |   FILTER |          |       |       |            |          |

    |   3.    TABLE ACCESS FULL | TEST_TAB |   100K |    11 M |   269 (1) | 00:00:04 |

    |   4.    XPATH EVALUATION.          |       |       |            |          |

    --------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    2 filter (EXISTS (SELECT 0 FROM))

    XPATHTABLE ('/ oraxq_defpfx:root / oraxq_defpfx:Item / Text () ' PASSING: B1)

    PATH OF XMLTYPE COLUMNS ' C_00$ ' '.')  "P"))

    SQL >

    With the index structured:

    SQL >

    SQL > create index test_tab_sxi on test_tab (doc)

    2 indextype is xdb.xmlindex

    () 3 parameters

    4Q ' {XMLTABLE test_tab_xt

    5 XMLNAMESPACES (default 'http://xmlns.example.org'),

    6 ' / root/item / text () '

    {7 item_value PATH VARCHAR2 COLUMNS (30) '.'} "

    8  ) ;

    The index is created.

    Elapsed time: 00:00:10.13

    SQL >

    SQL > exec dbms_stats.gather_table_stats (user, 'TEST_TAB');

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:01.69

    SQL >

    SQL > select count (*)

    2 of test_tab

    3 where (xmlexists)

    4 ' declare default element namespace "http://xmlns.example.org"; / root/item/Text () '

    5 passage doc

    6  ) ;

    COUNT (*)

    ----------

    20000

    Elapsed time: 00:00:00.18

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 3461631238

    -------------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    -------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |             |     1.    28.   290 (1) | 00:00:04 |

    |   1.  GLOBAL TRI |             |     1.    28.            |          |

    |*  2 |   HASH JOIN RIGHT SEMI |             | 22015 |   601K |   290 (1) | 00:00:04 |

    |*  3 |    TABLE ACCESS FULL | TEST_TAB_XT | 22015 |   343K |    20 (0) | 00:00:01 |

    |   4.    TABLE ACCESS FULL | TEST_TAB |   100K |  1171K |   269 (1) | 00:00:04 |

    -------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    2 - access ("TEST_TAB". ROWID = "SYS_SXI_0." ("' RID ')

    3 - filter("SYS_SXI_0".") ITEM_VALUE' IS NOT NULL)

    With an index not structured:

    SQL > drop index test_tab_sxi;

    The index is deleted.

    Elapsed time: 00:00:00.11

    SQL >

    SQL >

    SQL > create index test_tab_uxi on test_tab (doc)

    2 indextype is xdb.xmlindex

    3 parameters ("PATH of TABLE test_tab_pt

    4 PATHS (INCLUDE (/ root/point))

    (5 MAPPING of namespace (xmlns = "http://xmlns.example.org"))');

    The index is created.

    Elapsed time: 00:01:20.99

    SQL >

    SQL > exec dbms_stats.gather_table_stats (user, 'TEST_TAB');

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:06.56

    SQL >

    SQL > select count (*)

    2 of test_tab

    3 where (xmlexists)

    4 ' declare default element namespace "http://xmlns.example.org"; / root/item/Text () '

    5 passage doc

    6  ) ;

    COUNT (*)

    ----------

    20000

    Elapsed time: 00:00:00.45

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 2464052102

    ---------------------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | TempSpc | Cost (% CPU). Time |

    ---------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |             |     1.    42.       |   773 (1) | 00:00:10 |

    |   1.  GLOBAL TRI |             |     1.    42.       |            |          |

    |*  2 |   HASH JOIN RIGHT SEMI |             |  6547 |   268K |  2176K |   773 (1) | 00:00:10 |

    |*  3 |    TABLE ACCESS FULL | TEST_TAB_PT | 53020 |  1553K |       |   283 (2) | 00:00:04 |

    |   4.    TABLE ACCESS FULL | TEST_TAB |   100K |  1171K |       |   269 (1) | 00:00:04 |

    ---------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    2 - access ("TEST_TAB". ROWID = "SYS_P0." ("' RID ')

    3 - filter("SYS_P0".") PATHID "= HEXTORAW ('061D') AND"

    SYS_XMLI_LOC_ISTEXT ("SYS_P0". "LOCATOR", "SYS_P0" "." " PATHID') = 1)

    (tested on 11.2.0.2)

  • Remove an XML node

    Hello

    I have an XML that is generated at the click of a button in the form.

    I use xfa.data.saveXML ("pretty"); to generate the XML.

    Here is the XML

    <? XML version = "1.0" encoding = "UTF-8"? >

    "< xfa: data xmlns:xfa ="http://www.xfa.org/schema/xfa-data/1.0/">."

    < ITEM >

    < DATA >

    < ROW_IID > 0 < / ROW_IID >

    < PARENT > 0 < / PARENT >

    < CHILD > 0 < / CHILD >

    < / DATA >

    < NAME >

    < FNAME > 0 < / FNAME >

    < LNAME > 0 < / LNAME >

    < / NAME >

    < / ITEM >

    < / xfa: data >

    I want to remove the < NAME > node in the XML file and assign the XML handling to a text field.

    Could you get it someone please let me know how to do the same thing?

    Thanks :)

    Hello

    Whereas you want to output a string you can use XSLT, so something like (which copy all xml except the NAME nodes);

    var stylesheet =

    http://www.w3.org/1999/XSL/transform">

    txt var = $data. ELEMENT.applyXSL (stylesheet.toXMLString ());

    Console.println (txt)

    You can also use;

    $data. ELEMENT.nodes.remove ($data.) ELEMENT.NAME)

    Console.println($Data.) ELEMENT.saveXML ("pretty"));

    Concerning

    Bruce

  • TypeError: Error #1090: XML parser failure: element is incorrect.

    So I try to do a carousel 3D Vertical using Flash CS3, ActionScript 3, a program called TweenMax and XML. The site that I got a tutorial is a dead site, so no help there.

    Here is the error I get:

    TypeError: Error #1090: XML parser failure: element is incorrect.
    at outrageouslycooltitlescreennoerrors_fla::MainTimeline/xmlLoaded()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

    And here is the actionscript code that I have:

    Import TweenMax
    Import gs.*;

    Path to the XML file
    var xmlPath:String = " " http://download139.mediafire.com/ugg079ku9srg/7h8ki2fbhti272b/cookies.XML ";

    Store the XML file in a variable
    var xml;

    Create a loader and load the XML. When finished, call the function xmlLoaded
    var loader = new URLLoader();
    Loader.Load (new URLRequest (xmlPath));
    loader.addEventListener (Event.COMPLETE, xmlLoaded);

    Call the function
    function xmlLoaded(e:Event):void {}

    Make sure that the variable is not null
    If ((e.target as URLLoader)! = null) {}

    Create a new XML object with the XML data that is loaded
    XML = new XML (loader.data);

    Call the function that creates the menu
    createMenu();

    }

    }

    Need to know how many items on the stage
    var numberOfItems:uint = 0;

    An array that contains all menu items
    var menuItems:Array = new Array();

    Set the focal length
    var focalLength:Number = 350;

    Set the vanishing point
    var vanishingPointX:Number = stage.stageWidth / 2;
    var vanishingPointY:Number = stage.stageHeight / 2;

    Calculate the angleSpeed in the ENTER_FRAME listener
    var angleSpeed:Number = 0;

    Radius of the circle
    var radius: Number = 128;

    This function creates the menu
    function createMenu (): void {}

    Get the number of menu items, as we have
    numberOfItems = xml.items.item.length ();

    Calculate the difference in angle between the elements of menu in radians
    var angleDifference:Number = Math.PI * (360 / numberOfItems) / 180;

    Use a meter to see how menus have been created
    var: County: uint = 0;

    Performs a loop over all the < button > < / button > nodes in the XML document
    for each {(var point: XML dans xml.items.item)}

    Create a new menu item
    var menuItem:MenuItem = new MenuItem();

    Calculate the angle of departure for the menu item
    var startingAngle:Number = angleDifference * count;

    Define an attribute "currentAngle" for the menu item
    menuItem.currentAngle = startingAngle;

    Position of the menu item
    menuItem.xpos3D = 0;
    menuItem.ypos3D = RADIUS * Math.sin (startingAngle);
    menuItem.zpos3D = RADIUS * Math.cos (startingAngle);

    Calculate the ratio of scale for the menu item; the further question, the ratio of scale
    var scaleRatio is focalLength /(focalLength + menuItem.zpos3D);.

    Scale of the item of menu according to the scale ratio
    menuItem.scaleX = menuItem.scaleY = scaleRatio;

    Position of the menu item to the stage (from 3D to 2D coordinates coordinates)
    menuItem.x = vanishingPointX + menuItem.xpos3D * scaleRatio;
    menuItem.y = vanishingPointY + menuItem.ypos3D * scaleRatio;

    Add text to the menu item
    menuItem.menuText.text = item.label;

    Add a variable "linkTo" for the URL
    menuItem.linkTo = item.linkTo;

    Say the text field do not intercept mouse events
    menuItem.mouseChildren = false;

    Affect the MOUSE_OVER, MOUSE_OUT, then click event for the menu item listeners
    menuItem.addEventListener (MouseEvent.MOUSE_OVER, mouseOverItem);
    menuItem.addEventListener (MouseEvent.MOUSE_OUT, mouseOutItem);
    menuItem.addEventListener (MouseEvent.CLICK, itemClicked);

    Add the menu item to the array of menu items
    menuItems.push (menuItem);

    Add the menu item to the stage
    addChild (menuItem);

    Assign an initial alpha
    menuItem.alpha = 0.3;

    Add a blur at the element
    TweenMax.to (menuItem, 0, {blurFilter: {blurX:1, blurY:1}});}})

    Update County
    Count ++;

    }

    }

    This function is called when a mouse is over an element
    function mouseOverItem(e:Event):void {}

    Interpolation of element properties
    TweenMax.to (e.target, 0.1, {alpha: 1, glowFilter: {color: 0xffffff, alpha: 1, blurX:60, blurY:60}, blurFilter: {blurX:0, blurY:0}});}})

    }

    This function is called when a mouse is over an element
    function mouseOutItem(e:Event):void {}

    Interpolation of element properties
    TweenMax.to (e.target, 1, {alpha: 0.3, glowFilter: {color: 0xffffff, alpha: 1, blurX:0, blurY:0}, blurFilter: {blurX:1, blurY:1}});}})

    }

    This function is called when the user clicks on an element
    function itemClicked(e:Event):void {}

    Navigate to the URL that is assigned to the menu item
    var urlRequest:URLRequest = new URLRequest (e.target.linkTo);
    navigateToURL (urlRequest);

    }

    Add a listener to EVENT_FRAME for animation
    addEventListener (Event.ENTER_FRAME, moveCarousel);

    This function is called in each frame
    function moveCarousel(e:Event):void {}

    Calculate the angular position mouseY speed
    angleSpeed = (mouseY - stage.stageHeight / 2) * 0.0002;

    To loop through the menu items
    for (var i: uint = 0; i < menuItems.length; i ++) {}

    Store the menu at a local variable item
    var menuItem:MenuItem = [i] menuItems like MenuItem;

    Update the current angle of the question
    menuItem.currentAngle += angleSpeed;

    Calculate a ratio scale
    var scaleRatio is focalLength /(focalLength + menuItem.zpos3D);.

    Scale of the element according to the scale ratio
    menuItem.scaleX = menuItem.scaleY = scaleRatio;

    Set of new 3D coordinates
    menuItem.xpos3D = 0;
    menuItem.ypos3D = radius * Math.sin (menuItem.currentAngle);
    menuItem.zpos3D = radius * Math.cos (menuItem.currentAngle);

    Update the coordinates of the element
    menuItem.x = vanishingPointX + menuItem.xpos3D * scaleRatio;
    menuItem.y = vanishingPointY + menuItem.ypos3D * scaleRatio;

    }

    Call the function that sorts the elements so that they overlap correctly
    sortZ();

    }

    This function sorts the items so that they overlap correctly
    function sortZ (): void {}

    Sort the table so that the element that has the highest
    z position (= further) is the first in the table
    menuItems.sortOn ("zpos3D", Array.NUMERIC |) Array.DESCENDING);

    Define the new index for the item children
    for (var i: uint = 0; i < menuItems.length; i ++) {}
    setChildIndex (menuItems [i], i);

    }

    }

    the problem is in your xml file.

  • XML, parsing and adding to the database

    Hello

    I'm parsing an xml file and want to add the items to the database. Basically it works, but only the last element in the xml file is added to the database over and over again (count: M.length).

    I wonder if the loop is too fast and crush the variables and the tx.executeSql (); Gets the last element. Any ideas on that?

    function RSSRequest() {
    
        xmlDoc = loadXMLDoc(RSSBackend);
        var M = xmlDoc.getElementsByTagName("push");
    
        for (i=0;i
    

    When I'm alert (title); I'll get all showing different titles. Any idea and help is appreciated

    Kind regards

    bert2002

    Well I use an anonymous function and works:

    (function(title){
    
    // CODE
    
    })(title);
    
  • Replace the current XML node with another node in XML fragments

    Hello

    Please help, trying to replace an XML node with other fragments XML using XML DB, updateXML/deleteXML functions don't receive the desired result, on the front of the image below, this is what I have, and the transom is the replacement with new values XML fragment, I expect to see, there is a list of records from the XML that I need to open and do the replacement of the < broker-retail > according to the number of records to be inserted.

    Before the photo:

    < Broker-benefits-link >

    < hpp-rule > 0 < / hpp-rule >

    LISP < in.-CVCA-benefits-type > < / po-CVCA-benefits-type >

    < commit / >

    <broker-retail >

    < broker-entity-not > 1000947836 < / broker-entity-not >

    < broker-pct > 100 < / broker-pct >

    Y < principal > < / main >

    < / broker-retail >

    < / Broker-benefits-link >


    After photo (expected result):

    < Broker-benefits-link >

    < hpp-rule > 0 < / hpp-rule >

    LISP < in.-CVCA-benefits-type > < / po-CVCA-benefits-type >

    < commit / >

    <broker-retail >

    < broker-entity-not > 65656524 < / broker-entity-not >

    < broker-pct > 25 < / broker-pct >

    N < principal > < / main >

    < / broker-retail >

    <broker-retail >

    < broker-entity-not > 122224444 < / broker-entity-not >

    < > 75 broker-pct < / broker-pct >

    Y < principal > < / main >

    < / broker-retail >

    < / Broker-benefits-link >

    Kind regards

    Qwestion

    You can use DELETEXML and INSERTCHILDXML

    SQL> set long 10000
    SQL> column xmldata_new format a100
    SQL> set linesize 150
    SQL>
    SQL> with t
      2  as
      3  (
      4  select
      5  xmltype('
      6    0
      7    LISP
      8    
      9    
     10      1000947836
     11      100
     12      Y
     13    
     14  ') xmldata from dual
     15  )
     16  select xmlserialize
     17         (
     18             document
     19             insertchildxml
     20             (
     21                deletexml
     22                (
     23                    xmldata
     24                  , '/broker-benefit-link/broker-detail'
     25                )
     26              , '/broker-benefit-link'
     27              , 'broker-detail'
     28              , xmltype
     29                (
     30                '
     31                    
     32                        65656524
     33                        25
     34                        N
     35                    
     36                    
     37                        122224444
     38                        75
     39                        Y
     40                    
     41                 ').extract('/broker-master/broker-detail')
     42             )
     43             as clob indent size = 2
     44         ) xmldata_new
     45    from t;
    
    XMLDATA_NEW
    ----------------------------------------------------------------------------------------
    
      0
      LISP
      
      
        65656524
        25
        N
      
      
        122224444
        75
        Y
      
    
    
    SQL>
    
  • Nested exception on the SOAP webservice in Orchestrator calls - org.xml.sax.SAXException: element not valid in ch.dunes.vso.webservice.WorkflowToken - businessState?

    I created a java client program to call Orchestrator webservice for the execution of a workflow.

    When executing my code, the workflow is executed in Orchestrator with new token generated workflow.

    But my client side receives SAX exception. All trace is as below:

    WARNING: Could not find the required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.

    20 sep 2013 13:02:23 org.apache.axis.client.Call invoke

    SEVERE: Exception:

    • org.xml.sax.SAXException: element not valid in ch.dunes.vso.webservice.WorkflowToken - businessState

    at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)

    at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)

    at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)

    at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)

    at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)

    at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)

    at org.apache.axis.client.Call.invoke(Call.java:2467)

    at org.apache.axis.client.Call.invoke(Call.java:2366)

    at org.apache.axis.client.Call.invoke(Call.java:1812)

    at ch.dunes.vso.webservice.WebserviceSoapBindingStub.executeWorkflow(WebserviceSoapBindingStub.java:744)

    at ch.dunes.vso.webservice.VSOWebControlProxy.executeWorkflow(VSOWebControlProxy.java:95)

    at com.vmware.client.LaunchWorkflow.main (unknown Source)

    ; nested exception is:

    org.xml.sax.SAXException: invalid element in ch.dunes.vso.webservice.WorkflowToken - businessState [Ljava.lang.StackTraceElement;@793d7a

    Any suggestions?

    You can check the version of the WSDL file that you use in your java application? Looks like it's outdated, perhaps to an old version 4.1

  • Parse the XML file and extract data

    I want to parse a XML file and get the data as columns.

    Input country.xml file:

    <?xml version="1.0" encoding="UTF-8"?>
    <MAS Action="Insert">
    <Country ObjectId="100000000000000009" VersionId="8"><Id>1</Id><NlTexts><Name Language="de">Land1</Name><Name Language="en">Country1</Name></NlTexts></Country>
    <Country ObjectId="100000000000000033" VersionId="2"><Id>2</Id><NlTexts><Name Language="de">Land2</Name><Name Language="en">Country1</Name></NlTexts></Country>
    </MAS>
    
    

    I would like to analyze the xmlfile to get the following result

    Required result:

    col1        col2           col3
    1            Land1        Country1
    2            Land2        Country2
    

    or alternatively

    col1  col2       
    1            Land1       
    1            Country1
    2            Land2       
    2            Country2
    

    I tried the extract function

    select extract((XMLTYPE(BFILENAME('XML_DAT_DIR', 'country.xml'),
               NLS_CHARSET_ID('AL32UTF8'))) , '/*/*/Id') as "xdata"
    from dual;
    
    xdata
    ------------------------
    <Id>1</Id><Id>2</Id>
    

    and XMLTABLE (but how can I add countries now)

    SELECT *
        FROM XMLTABLE('/*/*/Id'
               PASSING XMLTYPE(BFILENAME('XML_DAT_DIR', 'country.xml'),
               NLS_CHARSET_ID('AL32UTF8'))
           )
      ;
    COLUMN_VALUE
    ------------------------
    <Id>1</Id>
    <Id>2</Id>
    

    DB version 11.2.0.3 on Windows 64-bit

    Thank you

    Tim

    Here are a few examples.

    For your output required:

    SELECT *.

    FROM XMLTable)

    "/ MAS/country".

    from XMLType (bfilename ('TEST_DIR', 'country.xml'), nls_charset_id ('AL32UTF8'))

    number of columns col1 way "Id".

    , col2 varchar2 (30) path "NlTexts/name [1].

    , col3 varchar2 (30) path "NlTexts/name [2]»

    )

    ;

    or, if the Language attribute is significant:

    SELECT *.

    FROM XMLTable)

    "/ MAS/country".

    from XMLType (bfilename ('TEST_DIR', 'country.xml'), nls_charset_id ('AL32UTF8'))

    number of columns col1 way "Id".

    col2 varchar2 (30) path "NlTexts/Name[@Language="de"]"

    col3 varchar2 (30) path "NlTexts/Name[@Language="en"]"

    )

    ;

    For your alternate exit:

    SELECT x1.col1

    x2.col2

    -, x2.col3

    FROM XMLTable)

    "/ MAS/country".

    from XMLType (bfilename ('TEST_DIR', 'country.xml'), nls_charset_id ('AL32UTF8'))

    number of columns col1 way "Id".

    , path of xmltype names ' NlTexts/name '.

    ) x 1

    XMLTable)

    "/ Name".

    in passing x1.names

    path of column col2 varchar2 (30) '.'

    -, col3 to ordinalite

    ) x 2

    ;

    (uncomment col3 to see what he does)

    or in a shorter way:

    SELECT *.

    FROM XMLTable)

    ' for $i/MAS/country

    , $j in $ NlTexts/i/name

    Returns the r element {$i / Id, $j}'

    from XMLType (bfilename ('TEST_DIR', 'country.xml'), nls_charset_id ('AL32UTF8'))

    number of columns col1 way "Id".

    , col2 varchar2 (30) path 'name '.

    ) ;

  • WSSE-Server CodecHandler toUnable Failed to find the xml for setting element

    Hi all
    I invoke a Java webservice with signature and encryption (WSSE) of the soap message in my client program.
    The webservice is built with a JWSC ant task and deployed in weblogic 10.3.2 I get the below exception when calling it.
    I invoke a web service that takes a string as input and returns a string output. This web service uses the signature and encryption on both directions.
    I checked the public/private key certificates and everything seems to be ok.
    I don't know how to fix the sub question. Let me know if you have encountered this problem and it is solved.


    -[HTTP - https://cdctdevapp:7042/casestatusservice/CaseStatusService - 500 response]-
    Date: Monday, October 15, 2012 03:24:12 GMT
    X-powered-by: Servlet/JSP/2.1 2.5
    Content-type: text/xml; charset = utf-8
    Encoding: segmented
    NULL: HTTP/1.1 500 Internal Server Error
    < env:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:env > < env:Header / > < env:Server env:Body > < env:Fault > < faultcode > < / faultcode > < faultstring > [CodecHandler Server] could not decode
    -& gt; Could not find the xml for setting element: message
    < / faultstring > < details > < bea_fault:stacktrace xmlns:bea_fault = "http://www.bea.com/servers/wls70/webservice/fault/1.0.0" > weblogic.wsee.codec.CodecException: could not find the xml for setting element: message
    at weblogic.wsee.codec.soap11.SoapDecoder.checkNullElement(SoapDecoder.java:397)
    at weblogic.wsee.codec.soap11.SoapDecoder.decodeParams(SoapDecoder.java:285)
    at weblogic.wsee.codec.soap11.SoapDecoder.decodeParts(SoapDecoder.java:172)
    at weblogic.wsee.codec.soap11.SoapDecoder.decode(SoapDecoder.java:125)
    at weblogic.wsee.codec.soap11.SoapCodec.decode(SoapCodec.java:182)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.decode(CodecHandler.java:139)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.handleRequest(CodecHandler.java:40)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:114)
    at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
    at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
    at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
    to weblogic.wsee.server.servlet.BaseWSServlet$ AuthorizedInvoke.run (BaseWSServlet.java:285)
    at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:169)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3717)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    < / bea_fault:stacktrace > < / details > < / env:Fault > < / env:Body > < / env:Envelope >.

    < WSEE:1 > create < SoapMessageContext. < init >: 48 >
    < WSEE:1 > set Message called: com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl@996b65 < SoapMessageContext.setMessage:65 >
    < WSEE:1 > set Message called: com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl@996b65 < SoapMessageContext.setMessage:65 >
    < WSEE:1 > set Message called: com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl@996b65 < SoapMessageContext.setMessage:65 >
    < WSEE:1 > set Message called: com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl@996b65 < SoapMessageContext.setMessage:65 >
    Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: [CodecHandler Server] could not decode
    -> Could not find the xml for setting element: message

    at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:197)
    at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:125)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
    to $Proxy27.sayHello (Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
    at java.lang.reflect.Method.invoke (unknown Source)
    at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
    to $Proxy28.sayHello (Unknown Source)
    at org.adr.nydcci.wss.ws5UntSignEncryptHttps.client.ws5UntSignEncryptHttpsPortClient.main(ws5UntSignEncryptHttpsPortClient.java:44)

    Thank you very much, Sunil. I could solve the problem.
    Demand has been framed properly, as my annotation TJS for my client was pointing to a fake name.
    fixed the ' @WebParam (name = "") ")" attribute to my client and it worked well. " The problem is solved now.

    Thank you
    Sriram

  • Date in format XML nodes

    I work with XML in AS3. I'm loading in an xml with dates in a format such as:

    2011-1-12-10-00-a

    I am to convert those to the actual Date of Flash in order to compare them and use the methods of the class Date, etc. I prefer convert once and then store them in the XML node, they came.

    Is it possible to store complex values such as date or what you have in an XML?

    Yes, or more directly using:

    var ms:int=date.getTime();

    var newDate:Date = new Date (ms);

Maybe you are looking for

  • Update Firefox lost it of Wharf logo, shows only the generic Mac App logo

    After update to 17.0 for Mac, I lost my Firefox, the dock shows only the generic Mac App logo.

  • Help! Received WARNING! OS block report! Scam? I can't close Safari!

    RE: need help unlock Safari on my Mac. I got the pop up WARNING! OS block report! Due to the third party application your operating system broke down. Contact support 1-866-537-7060. Possible scam? I can't close Safari. Help will be greatly appreciat

  • HP Jet 13-c020na (touch): Hp driver update recommended

    I have a recommended driver update Support Assistant (latest version), who was able to install. Can someone please? Intel driver customer thermal and dynamic framework. In the device under Intel (r) platform dynamic and thermal management framework t

  • Game sounds

    Originally publishing family vista and upgraded to windows 7... had it fixed a computer failure and it.  Now has same windows 7. Sounds of the game are now changed... which means there just not here.  Examples; Minesweeper makes no noise when a mine

  • NavigationPane second push freezes and blocks the application

    I use a navigation pane to view a list of some points. So, if I type an item in the list, it grows perfectly to another page. Burst of this page also works. When I try to type another item, the application hangs and crashes. This is the output of the