[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Example16



The basic technique is to check for what you are looking for and "save" that value in a variable. The variables are usually global variables and so are available to both the "Incoming" procedure and other code in the program. "Incoming" is just a user written procedure. You could call it anything you wanted and you can make it do anything you want within the confines of the parameters it is receiving. "name" is the name of the element and "value" is the character representation of that value. If "value" is a number and you need a number in your program, you will need to convert it.

If this is the pertinent part of the returned XML:

<Description>This is a beautiful piece of swamp land</Description>
<SignedForByName>Magic Johnson</SignedForByName>

This code will pull out the values and save them in Desc and SignedBy.

      select;                              
      when name = 'Description';           
        Desc = value;        
      when name = 'SignedForByName';       
        SignedBy = value;    
      endsl;                               

Depending on the XML being returned, it can be very complicated or very simple. Check the example programs in whatever version you currently have. The current beta has some nice examples of "complicated" xml with multiple iterations of same elements.

Just remember that each time Incoming is called, it only has one value but you will call Incoming for each element. By using different variables to save the values, at some point (when all the elements have been processed) you will have all the values you saved.

If you have trouble with this after looking over various EXAMPLE programs, post the returned XML and I'm sure you can get some help with the code needed.



> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-
> bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Fernando
> Sent: Thursday, September 09, 2010 6:03 PM
> To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Example16
> 
> How can I get more than one value in de Incoming?
> 
> 
> Thanks for your help.
> 
> 
> Fernando.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------