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

Re: Extracting Element Attributes.



   Hi Scott,
   if this is smart:

   if (name = 'rss');

      count = 1;
      dow attrs(count) <> *NULL;
         attrname = %str(attrs(count));
         count = count + 1;
         attrval = %str(attrs(count));
         count = count + 1;
         if (attrname = 'version');
            PrintLine = 'RSS version ' + attrval;
            except;
         endif;
      enddo;

   endif;
   maybe this is smarter:
   when xmlGetNode = 'rss' and xmlGetAttr = 'version';
     PrintLine = 'RSS version ' + xmlGetData;
     except;
   ;-)
   /Henrik

   Scott Klement <sk@xxxxxxxxxxxxxxxx>
   Sent by: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx

   28-04-2010 18:37

                             Please respond to
        HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>

                                                                       To

   HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>

                                                                       cc

                                                                  Subject

   Re: Extracting Element Attributes.

   EXAMPLE15 has an example of parsing attributes.  It parses the
   'version'
   attribute from the XML message.
   There may be other examples in the mailing list archives:
    http://www.scottklement.com/archives/ftpapi
   On 4/28/2010 12:51 AM, Eftimios Pantzopoulos wrote:
   >
   >     I am trying to obtain an attribute value from a response
   message. I've
   >     been using the exchange rate example and have understood what's
   >     happening with the call-back.
   >
   ----------------------------------------------------------------------
   -
   This is the FTPAPI mailing list.  To unsubscribe, please go to:
   http://www.scottklement.com/mailman/listinfo/ftpapi
   ----------------------------------------------------------------------
   -
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------