Count specific while iteration

Greetings ladies and gentleman;
So, i have the following issue.
I want to know the exact amount of iterations a while loop is executed. The main problem is that, this while loop, is not always running, and sometimes it jumps to the next step of the program and the comes back to the same while-loop.
In the attached VI you can see a variable named Y, colored RED that is, in fact, counting this particular while loop. The thing is that, when it meets the condition and moves forward in the program, then it has a possibility to return to this particular loop, but when it returns i lose my account iterations and starts all over again.
The program is simple, it just takes some random numbers and if it meets the conditions of > or < then it chooses the next path. The Leds are there to know in wich while-loop it is runing. I have changed the wait in the while-loop i would like to measure so it can repeat itseld a lot if times.
Thanks, if i dont explain it too well, plis let me know.
Kind Regards,
stgo.
Solved!
Go to Solution.
Attachments:
MC Try to count all.vi ‏39 KB

stgo,
I would guess that you have programmed in some text-based language and are now learning LabVIEW, right?  The structure of your code looks like a conversion from a text-based language and not one which takes advantages of LabVIEW's dataflow paradigm.
Try to do this without duplicated code (all of the case structures and several while loops) and without sequence structures.  For the duplicated code create subVIs. The sequence structures can ususllay be eliminated by dataflow.  Your stacked sequence structures might be replaced by for loops.
You may also want to consider a better way to stop the program. As it presently is constructed the Stopp button is read almost immediately when an iteration of the outer while loop begins. The code inside the sequence structure takes several seconds or longer to execute. Assuming the Stopp button was pressed shortly after (say 100 ms) the iteration started, the loop will not stop until that iteration completes AND the next iteration (when the True Stopp value is read) completes. This makes the user interface seem very unresponsive to the user.  probably something like a state machine architecture could reduce the code to one loop which would respond to the user in ~100 ms.
To do the count you want Y needs to be on a shift register on the outer loop. After the inner loop where Y now is located completes, add the value of i for that loop to the value in the shift register.
Lynn

Similar Messages

  • Find word in text file and count specific words

    now I'll try to explain what I need to do. I have file.txt file, It looks like:
    John //first line - name
    One
    Three
    Four
    Peter //first line - name
    Two
    Three
    Elisa //first line - name
    One
    Three
    Albert //first line - name
    One
    Three
    Four
    Nicole //first line - name
    Two
    FourSo I have program's code:
    public class Testing {
            public static void main(String args[]) throws Exception {
                Scanner input = new Scanner(System.in);
                System.out.println("Select word from list:");
                System.out.println();
                try {
                    FileReader fr = new FileReader("src/lt/kvk/i3_2/test/List.txt"); // this is list of words, everything all right here
                    BufferedReader br = new BufferedReader(fr);
                    String s;
                    while((s = br.readLine()) != null) {
                        System.out.println(s);
                    fr.close();
                    String stilius = input.nextLine();   // eneter word which I want to count in File.txt
                    BufferedReader bf = new BufferedReader(new FileReader("src/lt/kvk/i3_2/test/File.txt")); // from this file I need to count word which I entered before
                    int counter = 0;               
                    String line;
                    System.out.println("Looking for information");
                    while (( line = bf.readLine()) != null){
                        int indexfound = line.indexOf(stilius);
                        if (indexfound > -1) {
                             counter++;
                    if (counter > 0) {
                        System.out.println("Word are repeated "+ counter + "times");}
                        else {
                        System.out.println("Error...");
                    bf.close();
                catch (IOException e) {
                    System.out.println("Error:" + e.toString());
            }This program counting specific word (entered by keyboard) in file.txt.
    I need to make this program: for ex.: if I enter word: One It must show:
    Word One repeated 3 times by John, Elisa, AlbertAll what I need to elect by who this word repeated. But I don't know really how to make It, maybe LinkedList or I dont know, someone could help me?
    Thank you very much.

    966676 wrote:
    All what I need to elect by who this word repeated. But I don't know really how to make It, maybe LinkedListYou should choose the simplest type fullfilling your needs. In this case I'd go for <tt>HashSet</tt> or <tt>ArrayList</tt>.
    or I dont know, someone could help me?You need to introduce a variable to store the actual name which must be resetted if an empty line is found and then gets assigned the verry next word in the file.
    bye
    TPD

  • Concurrent modification exception while iterating through list

    Hi,
    I have a list of objects. I use for each loop in java to iterate through that list of objects and display them.
    The problem is that while iterating other thread can add or remove some objects from that list, and I get ConcurrentModificationException.
    How can I handle this problem. How can I be sure that I am iteration through the updated list.
    Thank you

    Synchonize on the list before iterating through it, and make sure that other code also synchronizes on the list before adding to it or removing from it. Using a list implementation that simply synchronizes all the methods (e.g. Vector) will not do that, you have to do it yourself.

  • ORA-24333: zero iteration count  Cause: An iteration count of zero was specified for the statement Action: Specify the number of times this statement must be executed

    Get the following error from Oracle 
    ORA-24333: zero iteration count
    Cause: An iteration count of zero was specified for the statement
    Action: Specify the number of times this statement must be executed
    Any suggestions on whether is this a Oracle bug or if not what should be set to avoid this failure.

    Hello get this from executing the following.
    Occurs intermitently.
    select MAX(LENGTH(lxVal)) from lxString_74501fb6 where lxType=910231053
    Find the MaxLenght(LxVal) returned is null for this query.
    Did google it but says the iterator not initialized. But not the case here
    Thanks

  • How to insert element to a HashMap while iterating it ?

    Hi all,
    I have a HashMap having <key, value> as <file name, size of file>.
    Before iterating HashMap is loaded with some <key, value> pairs.
    While iterating it I'm trying to find all files matching particular key (Pattern created from file name) and insert to the same HashMap.
    This ends with a "ConcurrentModificationException".
    Is there an alternative way of doing this within one loop ?
    Thanks

    cybertechsum wrote:
    you can try this approach
    Create two threads one for iterating through the list and one for adding items to the list
    then synchronize the method so that only one thread can access hashmap at one timeThat's pointless overkill. He never said anything about needing two threads, and creating an additional thread just for this, but then syncing, will lead to sequential (i.e., single-threaded) behavior anyway.
    This will avoid errorThis is more complex than the other solutions suggested, and therefore more error-prone.

  • Add to list while iterating?

    What's the best way to add an element to a list during an iterating a list and have the item be in the current iteration?
    For example...
        List<Integer> li = new LinkedList<Integer>();
        li.add(1);
        li.add(3);
        li.add(4);
        ListIterator<Integer>iter = li.listIterator();
        while(iter.hasNext()){
          int num = iter.next();
          if(num==1){
            iter.add(2);
          System.out.println(num);
        }the above code would only print 1,3,4...
    Any help would be appreciated, thank you.

    Making the simple change
              if(num==1){
                iter.add(2);
                iter.previous();
              }Seems to do the trick. Looking at the previous API we see:
    Returns the previous element in the list. This method may be called repeatedly to iterate through the list backwards, or intermixed with calls to next to go back and forth. ( Note that alternating calls to next and previous will return the same element repeatedly. )
    add() placed the element BEFORE the next() element. Calling previous() retrieves the added element. A subsequent call to next() gets that same element as per the API doc.

  • How do I count specific, smaller groups of information in one large table?

    Hello all,
    I have a feeling the answer to this is right under my nose, but somehow, it is evading me.
    I would like to be able to count how many photos are in any specific gallery. Why? Well, on my TOC page, I thought it would be cool to show  the user how many photos were in any given gallery displayed on the screen as part of all the gallery data I'm presenting. It's not necessary, but I believe it adds a nice touch. My  thought was to have one massive table containing all the photo information and another massive table containing the gallery  information, and currently I do. I can pull various gallery information  based on user selections, but accurately counting the correct number of  images per gallery is evading me.
    In my DB, I have the table, 'galleries', which has several columns, but the two most relevant are g_id and g_spe. g_id is the primary key and is an AI column that represents also the gallery 'serial' number. g_spec is a value that will have one of 11 different values in it (not relevant for this topic.)
    Additionally, there is the table, 'photos', and in this table are three columns:  p_id, g_id and p_fname. p_id is the primary key, g_id is the foreign key (primary key of the 'galleries' table) and p_fname contains the filename of each photo in my ever-expanding gallery.
    Here's the abbreviated contents of the galleries table showing only the first 2 columns:
    (`g_id`, `g_spec`, etc...)
    (1, 11, etc...),
    (2, 11, etc...),
    (3, 11, etc...),
    (4, 11, etc...),
    (5, 12, etc...),
    (6, 13, etc...)
    Here's the contents of my photos table so far, populated with test images:
    (`p_id`, `g_id`, `p_fname`)
    (1, 1, '1_DSC1155.jpg'),
    (2, 1, '1_DSC1199.jpg'),
    (3, 1, '1_DSC1243.jpg'),
    (4, 1, '1_DSC1332.jpg'),
    (5, 1, '1_DSC1381.jpg'),
    (6, 1, '1_DSC1421.jpg'),
    (7, 1, '1_DSC2097.jpg'),
    (8, 1, '1_DSC2158a.jpg'),
    (9, 1, '1_DSC2204a.jpg'),
    (10, 1, '1_DSC2416.jpg'),
    (11, 1, '1_DSC2639.jpg'),
    (12, 1, '1_DSC3768.jpg'),
    (13, 1, '1_DSC3809.jpg'),
    (14, 1, '1_DSC4226.jpg'),
    (15, 1, '1_DSC4257.jpg'),
    (16, 1, '1_DSC4525.jpg'),
    (17, 1, '1_DSC4549.jpg'),
    (18, 2, '2_DSC1155.jpg'),
    (19, 2, '2_DSC1199.jpg'),
    (20, 2, '2_DSC1243.jpg'),
    (21, 2, '2_DSC1332.jpg'),
    (22, 2, '2_DSC1381.jpg'),
    (23, 2, '2_DSC1421.jpg'),
    (24, 2, '2_DSC2097.jpg'),
    (25, 2, '2_DSC2158a.jpg'),
    (26, 2, '2_DSC2204a.jpg'),
    (27, 2, '2_DSC2416.jpg'),
    (28, 2, '2_DSC2639.jpg'),
    (29, 2, '2_DSC3768.jpg'),
    (30, 2, '2_DSC3809.jpg'),
    (31, 2, '2_DSC4226.jpg'),
    (32, 2, '2_DSC4257.jpg'),
    (33, 2, '2_DSC4525.jpg'),
    (34, 2, '2_DSC4549.jpg'),
    (35, 3, '3_DSC1155.jpg'),
    (36, 3, '3_DSC1199.jpg'),
    (37, 3, '3_DSC1243.jpg'),
    (38, 3, '3_DSC1332.jpg'),
    (39, 3, '3_DSC1381.jpg'),
    (40, 3, '3_DSC1421.jpg'),
    (41, 3, '3_DSC2097.jpg'),
    (42, 3, '3_DSC2158a.jpg'),
    (43, 3, '3_DSC2204a.jpg'),
    (44, 3, '3_DSC2416.jpg'),
    (45, 3, '3_DSC2639.jpg'),
    (46, 3, '3_DSC3768.jpg'),
    (47, 3, '3_DSC3809.jpg'),
    (48, 3, '3_DSC4226.jpg'),
    (49, 3, '3_DSC4257.jpg'),
    (50, 3, '3_DSC4525.jpg'),
    (51, 3, '3_DSC4549.jpg');
    For now, each gallery has 17 images which was just some random number I chose.
    I need to be able to write a query that says, tell me how many photos are in a specific photoset (in the photos table) based on the number in galleries.g_id  and photos.g_id being equal.
    As you see in the photos table, the p_id column is an AI column (call it photo serial numbers), and the g_id column assigns each specific photo to a specific gallery number that is equal to some gallery ID in the galleries.g_id table. SPECIFICALLY, for example I would want to have the query count the number of rows in the photos table whose g_id = 2 when referenced to g_id = 2 in the galleries table.
    I have been messing with different DISTINCT and COUNT methods, but all seem to be limited to working with just one table, and here, I need to reference two tables to acheive my result.
    Would this be better if each gallery had its own table?
    It should be so bloody simple, but it's just not clear.
    Please let me know if I have left out any key information, and thank you all in advance for your kind and generous help.
    Sincerely,
    wordman

    bregent,
    I got it!
    Here's the deal: the query that picks the subset of records:
    $conn = dbConnect('query');
    $sql = "SELECT *
            FROM galleries
            WHERE g_spec = '$spec%'
            ORDER BY g_id DESC
            LIMIT $startRow,".SHOWMAX;
    $result = $conn->query($sql) or die(mysqli_error());
    $galSpec = $result->fetch_assoc();
    picks 3 at a time, and with each record is an individual gallery number (g_id). So, I went down into my code where a do...while loop runs through the data, displaying the info for each subset of records and I added another query:
    $conn = dbConnect('query');
    $getTotal = "SELECT COUNT(*)
                FROM photos
                WHERE g_id = {$galSpec['g_id']}
                GROUP BY g_id";
    $total = $conn->query($getTotal);
    $row = $total->fetch_row();
    $totalPix = $row[0];
    which uses the value in $galSpec['g_id']. I didn't know the proper syntax for including it, but when I tried the curly braces, it worked. I altered the number of photos in each gallery in the photos table so that each total is different, and the results display perfectly.
    And as you can see, I used some of the code you suggested in the second query and all is well.
    Again, thank you so much for being patient and lending me your advice and assistance!
    Sincerely,
    wordman

  • Read multiple DAQ data packet in one WHILE iteration

    Hello,
    I am looking for a solution to the following problem :
    I am using a PXI-6132 to acquire an anlogue waveform, the DAQ is trigerred by the falling edge of an other analog waveform with the same theoritical frequency. What I would like to do is to acquire for example 30 samples after the trigger, then store this data in the on-board memory; then wait for the next falling edge (my trigger) to acquire another 30 samples batch and, after let say 5 acquisition events, transfer this data form the on-board memory to my host computer memory to be read by a classical "Read fonction" in one itération of my while loop. I tried a lot of solutions (for ex. by setting the on-board memory buffer size to 150 before entering the while loop) but the read function still reads only 30 samples in one iteration. Is it possible to find a solution with the classical : create channel, timing function, trigerring function then a read function in a while loop or do I need to use a more complicated structure ....
    Thanks in advance for your help

    Please post questions only once. This is a double post - see here

  • Code to count specific row of a system form

    Hi,
    Pls tell me how to count the specific row number of a form.I m making a addon to provide serial no. to receipt goods in which In when a user selects a item in a document and press the button then the value of that specific row is transfered to the next form.

    Hi,
    Your question belongs to SDK forum. Please close this one and post it on SDK forum.
    Thanks,
    Gordon

  • Encountering ORA-39000: bad dump file specification while using datapump

    Hello,
    I am trying to use datapump to take a export of a schema(Meta_data only). However, I want the dump file to be named after the date & time of the export taken.
    When i use the following command -- the job runs perfectly.
    expdp system@***** dumpfile=expdp-`date '+%d%m%Y_%H%M%S'`.dmp directory=EXP_DP logfile=expdp-`date '+%d%m%Y_%H%M%S'`.log SCHEMAS=MARTMGR CONTENT=METADATA_ONLY
    However, I want to run the export using an parfile. but if use the below parfile, i am encountering the following errors.
    USERID=system@*****
    DIRECTORY=EXP_DP
    SCHEMAS=TEST
    dumpfile=expdp-`date '+%d%m%Y_%H%M%S'`
    LOGFILE=MARTMGR.log
    CONTENT=METADATA_ONLY
    expdp parfile=martmgr.par
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning option
    ORA-39001: invalid argument value
    ORA-39000: bad dump file specification
    ORA-39157: error appending extension to file "expdp-`date '+%d%m%Y_%H%M%S'`"
    ORA-07225: sldext: translation error, unable to expand file name.
    Additional information: 7217
    How do i append date&time to the dumpfile name when using a parfile.
    Thanks
    Rohit

    I got the below error while using the dumpfile parameter as dumpfile=dump_$export_date.dmp
    Export: Release 11.2.0.2.0 - Production on Thu Feb 7 16:46:22 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning option
    ORA-39001: invalid argument value
    ORA-39000: bad dump file specification
    ORA-39157: error appending extension to file "dump_$export_date.dmp"
    ORA-07225: sldext: translation error, unable to expand file name.
    Additional information: 7217
    Script i used is as follows
    export ORACLE_HOME=/orcl01/app/oracle/product/11.2.0.2
    export ORACLE_SID=$1
    export PATH=$PATH:$ORACLE_HOME/bin
    echo $ORACLE_HOME
    export export_date=`date '+%d%m%Y_%H%M%S'`
    echo $export_date
    expdp parfile=$2
    parfile is
    DIRECTORY=EXP_DP
    SCHEMAS=MARTMGR
    dumpfile=dump_$export_date.dmp
    LOGFILE=MARTMGR.log
    CONTENT=METADATA_ONLY

  • Counting specific characters in string

    // method  that counts and returns the number of times a specific character
    // appears in the data string
    public int numChar(char _charData)
         for(int i = 0; i < dataString.length(); i++)
               if(_charData == dataString.indexOf(_charData))
                    int count = 1;
                    int countIt = 0;
                    countIt = countIt + count;
                    return countIt;
    int nothing = 0;
    return nothing;
    }

    And your question is....?
    I have one: Where does dataString come from? You don't pass it in. Seems ridiculous to make it a class member.
    This is wrong:
    if(_charData == dataString.indexOf(_charData))Should be:
    if(_charData == dataString.charAt(i))The logic inside the if is incorrect, too. You don't want to return after the first time you find a character. You want to loop all the way through and count all the instances.
    You might have been trying to stop the loop once the indexOf returned -1, but you should be doing it on the remaining substring in that case.
    The style is poor. If I were reviewing your code, I'd say that your "nothing = 0" doesn't add any value.
    I'd write it like this:
    public class CharCounter
       public static void main(String [] args)
          if (args.length > 1)
             String str  = args[0];
             char ch     = args[1].charAt(0);
             System.out.println("str  : " + str);
             System.out.println("ch   : " + ch);
             System.out.println("count: " + getCharCount(ch, str));
       public static int getCharCount(char ch, String str)  
          int charCount = 0;
          if (str != null)
             int numChars = str.length();
             for (int i = 0; i < numChars; ++i)
                if (ch == str.charAt(i))
                   ++charCount;
          return charCount; 
    }%

  • Counting specific words aspect for statistic (CS3)

    Hi! everybody!
    I'm looking forward a script using Adobe "Extend Script Toolkit", that could allow me to count (statistics) all specific colored words (in red in my case) that I have in my Indesign CS3 document.
    A friendly French guy sended me that script test code but it didn't work fine on Extend Script Toolkit
    Déclarer variables
    var_Compteur [entier]
    var_Attribut_Couleur_Mot [string]
    var_Mot  [string]
    Initialiser variables
    var_Compteur = 0
    var_Attribut_Couleur_Mot = ""
    var_Mot =  ""
    Début boucle Tant que
    var_mot = non  vide
    si var_Attribut_Couleur_Mot = "Rouge"
    alors var_Compteur = var_Compteur +1
    => mot  suivant
    Fin tant que
    Fin Boucle
    Afficher var_Compteur
    Please help!!!!!
    Thanks a lot!

    Here the code done by peter (megathanks!!!) :
    app.findTextPreferences =  null;
    app.findTextPreferences.fillColor =  "red";
    //set some options here
    app.findChangeTextOptions.caseSensitive =  true;
    app.findChangeTextOptions.wholeWord  =  true;
    app.findChangeTextOptions.includeFootnotes = true;
    alert   (app.activeDocument.findText().length);
    Sadly the script don't work I got an error to the line 2 : app.findTextPreferences.fillColor =  "red";
    could someone tell me what is wrong?
    Again thanks a lot to Peter

  • May I change counter parameter while it is counting?

    Hi all.
    I'm using CVI 7.1 and traditional daq with a PCI-6601 board to perform simple event counting to count delays on some tested devices
    For my application I need to change the type of counting from ungated to gated while the counter is running: is it possible?
    My application is configured this way:
    GPCTR_Set_Application (1, ND_COUNTER_0, ND_SIMPLE_EVENT_CNT);
    GPCTR_Change_Parameter (1, ND_COUNTER_0, ND_SOURCE, ND_INTERNAL_100_KHZ);
    GPCTR_Control (1, ND_COUNTER_0, ND_PROGRAM);
    Now, while the counter is running I need to follow on counting only if the gate signal is high. If I simply use
    GPCTR_Change_Parameter (1, ND_COUNTER_0, ND_GATE, ND_PFI_38);
    I receive the error that "The specified resource is already armed", so I tried with
    GPCTR_Control (1, ND_COUNTER_0, ND_DISARM);
    GPCTR_Change_Parameter (1, ND_COUNTER_0, ND_GATE, ND_PFI_38);
    GPCTR_Control (1, ND_COUNTER_0, ND_ARM);
    but the counter continues counting regardless the state of the gate signal. That's why my question: how can I perform this task?
    (Note: if configured from start for gated counting, the counter operates regularly based on gate state)
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

    Kevin, in my application I am monitoring a long-lasting process (approx. 45 seconds long) in which I must measure the time a contact is on. 6601 card is dedicated to measure this time: the contact is used as the gate signal of the counter so that time measurement is exactly related to the process being surveyed. The problem is that during part of this process I cannot be connected to the actual contact, so I cannot use its state as the gating signal during all time.
    I was hoping that I could change counter configuration on the fly so that I can start counting based on the gate, switch to ungated counting while I cannot survey the contact and switch back to gated at the end of the interval, when I can use again the contact as counter gate.
    In the meanwhile I am monitoring some other parts of the process and acquiring measures on serial (that is intrinsically "slow") devices: due to this sum of processes going on inside the computer, I cannot rely of my program being enough fast as to monitor the state of the DUT and mirror it in a gating signal.
    I have tested my solution to sum up partial timer counts and found it not so easy to manage so I decided to introduce a little hardware modification in the measuring system and OR the gating signal with a digital output of the 6601: I can manage in the software to drive this signal with significant margin on actual phenomenon, so that I am now using the counter always in gated mode. This solution is more or less in the way of your last answer seem we arrived at it contemporarily!
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to Create a batch file to display and count specific words in log file

    Hi All,
    I have requirement Program to be written that will go through a log file and look for following key words.
    Unexpected Essbase error
    And also it will count the # of times the word error appear in a log file.
    You may use batch file or Perl script to complete this task.
    e.g. in the log file - It will flag yes that keyword "Unexpected Essbase error" found and word error occurs 9 times.
    Pls help me in know process to achieve above requirement.
    and pls let me know what is perl scripting ?
    Thanks in Advance
    Regards,
    SM

    Sorry but it sounds like you have been asked to do something and you have pasted the requirement on the forum, have you done any research to find out which scripting language you are going to use or any find examples, there are so many differents examples and help on the internet it just takes a little bit of time and investment.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Issues while iterating BDB XML

    Hello there,
    to begin with the issue, I've got a BDB XML, with couple of inserted documents. Using Java API.
    I'm creating an application which integrates the database within and displays the contents (that is, documents) of a container in a JTree.
    Next, I've overridden toString() of XmlDocument:
    class MyTreeModelChild extends XmlDocument{
        ContainerManager cmanager; //ContainerManager is the class, which deals with the environments settings, opening containers, putting documents etc.
        public MyTreeModelChild(XmlDocument v, ContainerManager cmanager) throws Exception{
            super(v);
            this.cmanager = cmanager;
        public String toString(){
            //executeQuery is the method, which executes XPath queries. It's located in ContainerManager class and takes a string argument
            try{
                XmlResults xResults = cmanager.executeQuery("collection('demo.dbxml')/info/title/string()");
                while(xResults.hasNext()){
                    XmlValue value = xResults.next();
                    return value.asString();
                return null;
            catch(Exception e){
                return e.toString();
    }The content of XML documents (don't mind the validation, that's an example):
    first.xml
    <info>
       <title>One</title>
    </info>
    second.xml
    <info>
       <title>Two</title>
    </info>Finally, I run the compiled code and watch the documents appear in the tree. They both have same titles (the second document is overridden by the first):
    -One
    -OneIf I check the query using dbxml shell, everything's nice:
    -One
    -TwoAny ideas, suggestions?
    Andy

    John,
    thank you for the reply.
    Indeed. The query returns the title of every document.
            try{
                XmlResults xResults = cmanager.executeQuery("collection('demo.dbxml')/info/title/string()");
                while(xResults.hasNext()){
                    XmlValue value = xResults.next();
                    return value.asString();
                }I execute the query and while it has some results to return, do the loop. Take the first value as a XmlValue and return it as String. If I have more results (in this case -- yes, I do), the loop runs again.
    Unfortunately, I cannot figure out what's from now on. The loop will return the same value.
    I'm nor a geek in BDB XML neither in Java. Almost there, just a few obstacles in the way :)

Maybe you are looking for

  • Sharing iPhoto Library on a large LAN

    I am having a strange problem with sharing an iPhoto Library (v5.0.4 & OS 10.3.9). The computer doing the sharing is an iBook G4 with a wireless card. Once sharing was turned on, I iPhoto in our main computer lab could "see" the shared library, but a

  • Reg.No G/L Account found

    Dear Experts I am newly configure in IDES system,in which I create Inventory A/c,Consumption account,GR/IR a/c,Inv offsetting a/c,Inc/Dec a/c,Cash payable on purchase a/c ,Gain loss revaluation a/c and Loss in exchange rate a/c and configured in OBYC

  • BI SUITE - Business Explorer Documentation

    Hi everybody, I need to know, if anybody knows some place where I would find documentation about Business Explorer in Spanish. Thanks in advanced for your response.

  • How Can I run the GenericServlet in the iPlanetAppServer6.0 sp4

     

  • Pop Up Menu Behavour Dissappears

    Hi Guys, I have Dreamweaver MX 2004. I have added Navigation Box with menu listed vertically. I have then added pop-up menu through the Behaviour going up to three levels deep. These are attached to Buttons I have downloaded from a free Button site.