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

Re: parsing help



    Yes sir I am debugging as we speak. I've learned a great deal in the
    past 9hrs lol
    Thanks for all of your help. I have figured out my issues and well on
    my way to finishing up this program[1]
    Sent from Yahoo Mail for iPhone
     __________________________________________________________________

   From: CXGBaldwin@xxxxxxxxxxxxx <CXGBaldwin@xxxxxxxxxxxxx>;
   To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>;
   Cc: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>;
   Subject: Re: parsing help
   Sent: Tue, Dec 2, 2014 5:20:40 PM
     Donnie,
     Can you debug the procedure and figure out why you are not getting
   the
     parsing like it is needed?  You probably notice that we have major
   and
     minor tags in the XML coming back something  like the path is equal
   to
     /PolkServiceResponse/VehiclesList/VinPrefix  and then within that we
     have sub-tags (probably not the right term on that) but that way when
     the NAME='BodyStyle ' move the contents of VALUE to a field.
     But to gather all the data we also have:
     '/PolkServiceResponse/VinData'    and once we see this then we use>>
     When Name='vin'  move the contents or the VALUE field to a hold
   field.
       But then once we find this data then we do
     When Name = 'Fields'
       A = 1;
       dow HTTP_nextXmlAttr( attrs: a: attrName: attrVal );
         select;
         when attrVal = 'ABS_BRK_CD';
           WK_VNDATA(1) = Value;
         when attrVal = 'BODY_STYLE_CD';
           WK_VNDATA(9) = Value;
         when attrVal = 'BODY_STYLE_DESC';
           WK_VNDATA(10) = Value;
     ect, ect......
     EndSL;
     You need to know the XML form that is being sent to you for the
     specific tags you are looking for.  I hope this helps in some way
     because If you are doing this it should be working if you see the
   tags
     at all..  In debug you should be able to see the ATTRVAL and see if
   you
     are seeing your tags you need.
     Hope this helps in someway,
     George A. Baldwin
     CGI Consultant
     Cell: 614-284-5679
     From:        Donnie Barrow <[2]ddbarrow@xxxxxxxxx>
     To:        HTTPAPI and FTPAPI Projects
   <[3]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>,
     Cc:        "[4]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx"
     <[5]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
     Date:        12/01/2014 02:41 PM
     Subject:        Re: parsing help
     Sent by:        [6]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
       __________________________________________________________________
     I spoke too soon. it's not working. I am not parsing anything ...back
     to square 1
           From: "[7]CXGBaldwin@xxxxxxxxxxxxx"
   <[8]CXGBaldwin@xxxxxxxxxxxxx>
     To: HTTPAPI and FTPAPI Projects <[9]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
     Cc: "[10]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx"
     <[11]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
     Sent: Monday, December 1, 2014 12:48 PM
     Subject: Re: parsing help
       I do not have to connect using Userid or password I consume the
     service
       from behind our firewall so I do not have to log on..
       Can anyone out there Help Donnie with his last question????
       Thanks,
       George A. Baldwin
       CGI Consultant
       Cell: 614-284-5679
       From:        Donnie Barrow <[12]ddbarrow@xxxxxxxxx>
       To:        HTTPAPI and FTPAPI Projects
     <[13]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>,
       Cc:        "[14]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx"
       <[15]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
       Date:        12/01/2014 12:24 PM
       Subject:        Re: parsing help
       Sent by:        [16]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx

   __________________________________________________________________
       Boom Boom I got it. Last question. I have to sign on with a profile
     and
       password to the webservice.Is there a routine that will disconnect
   me
       from the web service?
             From: "[17]CXGBaldwin@xxxxxxxxxxxxx"
   <[18]CXGBaldwin@xxxxxxxxxxxxx>
       To: HTTPAPI and FTPAPI Projects <[19]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
       Cc: "[20]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx"
       <[21]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
       Sent: Monday, December 1, 2014 7:31 AM
       Subject: Re: parsing help
         Yes, when I return the XML from the web service using the command
     it
       is
         built in to call the procedure PARSERTRNXML... Code as follows:

   /////////////////////////////////////////////////////////////////
           // send and get the response, and parse it as an XML document.
           //  http_url_get_xml() will call the PARSERTRNXML procedure
           //  for each XML tag found.

   /////////////////////////////////////////////////////////////////
             rc = http_url_get_xml( uri: *null: %paddr(PARSERTRNXML):
     *null);
           //  If error on process then display message to user
             if (rc <> 1);
                 @MSGID = 'CMS9898';
                 @MSGFI = 'CISMSGFILE';
                 @MSGDA = 'Error while processing data with server';
                 $ERRMSG = 'Error while processing data with server';
         Now the  procedure in the program itself is like this:
         D PARSERTRNXML    PR
         D  userData                      *  value
         D  depth                      10I 0 value
         D  name                      1024A  varying const
         D  path                    24576A  varying const
         D  value                    65535A  varying const
         D  attrs                        *  dim(32767)
         D                                    const options(*varsize)
         P PARSERTRNXML    B
         D                PI
         D  userData                      *  value
         D  depth                      10I 0 value
         D  name                      1024A  varying const
         D  path                    24576A  varying const
         D  value                    65535A  varying const
         D  attrs                        *  dim(32767)
         D                                    const options(*varsize)
         D title          s          24576a  varying static
         D a              s            10i 0
         D attrName        s          1024a  varying
         D attrVal        s          65535a  varying
         *** Then the code I sent earlier to you as an example. ***
         NOTE: This code is similar to what is in the example program for
     the
         weather forcast (sorry I do not remember what program that was)
     that
       is
         in the examples in Scott's Package.
         Good Luck,
         George A. Baldwin
         CGI Consultant
         Cell: 614-284-5679
         From:        Donnie Barrow <[22]ddbarrow@xxxxxxxxx>
         To:        HTTPAPI and FTPAPI Projects
       <[23]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>,
         Cc:        "[24]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx"
         <[25]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
         Date:        11/26/2014 12:20 PM
         Subject:        Re: parsing help
         Sent by:        [26]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
     __________________________________________________________________
         Hey George thanksI have this in my program except just like with
         example17 I used the embedded prototype and I don't see it
   working.
       the
         only exception I see is where you are using the HTTP_nextXMLAttr
     in
       a
         dowhile.  are you calling this in a routine?
               From: "[27]CXGBaldwin@xxxxxxxxxxxxx"
   <[28]CXGBaldwin@xxxxxxxxxxxxx>
         To: HTTPAPI and FTPAPI Projects
   <[29]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
         Cc: [30]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
         Sent: Wednesday, November 26, 2014 11:48 AM
         Subject: Re: parsing help
           I had to do this for parsing the XML coming back from VIN look
     ups
       we
           do and here is how I done it... I think this may be what your
       looking
           for at least???
           in the D specs:
             D  name                      1024A  varying const
             D  path                    24576A  varying const
             D  value                    65535A  varying const
             D a                        s            10i 0
             D attrName        s          1024a  varying
             D attrVal              s          65535a  varying
           In the code:
           individual tags:
               //*******************************************************
               //**** Bring Back the Values when <<VIN DATA>>passed in**
               //*******************************************************
               if path = '/PolkServiceResponse/VinData';
                 select;
                 when name='vin';
                   eval SAVVIN = Value;
                 when name='correctedVin';
                   eval SUGVIN = Value;
             // HANDLE INDIVIDUAL ATTRIBUTES IN THE VDTA RETURN XML //
                 when name='fields';
                   A = 1;
                   dow HTTP_nextXmlAttr( attrs: a: attrName: attrVal );
                     select;
                     when attrVal = 'ABS_BRK_CD';
                       WK_VNDATA(1) = Value;
                     when attrVal = 'BODY_STYLE_CD';
                       WK_VNDATA(9) = Value;
           I do load this data to another array for other uses but this
     should
           give you an Idea of how to handle the tags in the XML being
       returned.
           Hope this helps you,
           George A. Baldwin
           CGI Consultant
           Cell: 614-284-5679
           From:        Donnie Barrow <[31]ddbarrow@xxxxxxxxx>
           To:        HTTPAPI and FTPAPI Projects
         <[32]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>,
           Date:        11/26/2014 11:25 AM
           Subject:        parsing help
           Sent by:        [33]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
       __________________________________________________________________
           I have HTTPAPI and EXPAT loaded. I have attached a program I
   used
         from
           example 17. I call a web service and I am writing the return
   xml
     to
         the
           IFS /tmp folder. This all works YAiii!  But for some reason I
   am
         stuck
           trying to parse the daggone return XML to my array.[ or even a
       field]
           UGHHH!  Can someone help push me in the right direction? I
   looked
       at
           CHARDATA1 in the EXPAT examples and I kinda understand it
           but....hmmmmhow do I pull this in?  HeLP        Donnie
       BarrowiSeries
           Consultant 513.709.0370[attachment "pca001cnsm.txt" deleted by
       George
           Baldwin/ACIC]

   -----------------------------------------------------------------------
           This is the FTPAPI mailing list.  To unsubscribe, please go to:

   [1][1][1][1][34]http://www.scottklement.com/mailman/listinfo/ftpapi

   -----------------------------------------------------------------------
         References
           1.
   [2][2][2][35]http://www.scottklement.com/mailman/listinfo/ftpapi

   -----------------------------------------------------------------------
         This is the FTPAPI mailing list.  To unsubscribe, please go to:
         [3][3][3][36]http://www.scottklement.com/mailman/listinfo/ftpapi

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

   ----------------------------------------------------------------------
         -
         This is the FTPAPI mailing list.  To unsubscribe, please go to:
         [4][4][4][37]http://www.scottklement.com/mailman/listinfo/ftpapi

   -----------------------------------------------------------------------
       References
         1. [5][5][38]http://www.scottklement.com/mailman/listinfo/ftpapi
         2. [6][6][39]http://www.scottklement.com/mailman/listinfo/ftpapi
         3. [7][7][40]http://www.scottklement.com/mailman/listinfo/ftpapi
         4. [8][8][41]http://www.scottklement.com/mailman/listinfo/ftpapi

   -----------------------------------------------------------------------
       This is the FTPAPI mailing list.  To unsubscribe, please go to:
       [9][9][42]http://www.scottklement.com/mailman/listinfo/ftpapi

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

   ----------------------------------------------------------------------
       -
       This is the FTPAPI mailing list.  To unsubscribe, please go to:
       [10][10][43]http://www.scottklement.com/mailman/listinfo/ftpapi

   -----------------------------------------------------------------------
     References
       1. [11][44]http://www.scottklement.com/mailman/listinfo/ftpapi
       2. [12][45]http://www.scottklement.com/mailman/listinfo/ftpapi
       3. [13][46]http://www.scottklement.com/mailman/listinfo/ftpapi
       4. [14][47]http://www.scottklement.com/mailman/listinfo/ftpapi
       5. [15][48]http://www.scottklement.com/mailman/listinfo/ftpapi
       6. [16][49]http://www.scottklement.com/mailman/listinfo/ftpapi
       7. [17][50]http://www.scottklement.com/mailman/listinfo/ftpapi
       8. [18][51]http://www.scottklement.com/mailman/listinfo/ftpapi
       9. [19][52]http://www.scottklement.com/mailman/listinfo/ftpapi
       10. [20][53]http://www.scottklement.com/mailman/listinfo/ftpapi

   -----------------------------------------------------------------------
     This is the FTPAPI mailing list.  To unsubscribe, please go to:
     [21][54]http://www.scottklement.com/mailman/listinfo/ftpapi

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

   ----------------------------------------------------------------------
     -
     This is the FTPAPI mailing list.  To unsubscribe, please go to:
     [22][55]http://www.scottklement.com/mailman/listinfo/ftpapi

   -----------------------------------------------------------------------
   References
     1. [56]http://www.scottklement.com/mailman/listinfo/ftpapi
     2. [57]http://www.scottklement.com/mailman/listinfo/ftpapi
     3. [58]http://www.scottklement.com/mailman/listinfo/ftpapi
     4. [59]http://www.scottklement.com/mailman/listinfo/ftpapi
     5. [60]http://www.scottklement.com/mailman/listinfo/ftpapi
     6. [61]http://www.scottklement.com/mailman/listinfo/ftpapi
     7. [62]http://www.scottklement.com/mailman/listinfo/ftpapi
     8. [63]http://www.scottklement.com/mailman/listinfo/ftpapi
     9. [64]http://www.scottklement.com/mailman/listinfo/ftpapi
     10. [65]http://www.scottklement.com/mailman/listinfo/ftpapi
     11. [66]http://www.scottklement.com/mailman/listinfo/ftpapi
     12. [67]http://www.scottklement.com/mailman/listinfo/ftpapi
     13. [68]http://www.scottklement.com/mailman/listinfo/ftpapi
     14. [69]http://www.scottklement.com/mailman/listinfo/ftpapi
     15. [70]http://www.scottklement.com/mailman/listinfo/ftpapi
     16. [71]http://www.scottklement.com/mailman/listinfo/ftpapi
     17. [72]http://www.scottklement.com/mailman/listinfo/ftpapi
     18. [73]http://www.scottklement.com/mailman/listinfo/ftpapi
     19. [74]http://www.scottklement.com/mailman/listinfo/ftpapi
     20. [75]http://www.scottklement.com/mailman/listinfo/ftpapi
     21. [76]http://www.scottklement.com/mailman/listinfo/ftpapi
     22. [77]http://www.scottklement.com/mailman/listinfo/ftpapi

References

   1. https://overview.mail.yahoo.com/?.src=iOS
   2. javascript:return
   3. javascript:return
   4. javascript:return
   5. javascript:return
   6. javascript:return
   7. javascript:return
   8. javascript:return
   9. javascript:return
  10. javascript:return
  11. javascript:return
  12. javascript:return
  13. javascript:return
  14. javascript:return
  15. javascript:return
  16. javascript:return
  17. javascript:return
  18. javascript:return
  19. javascript:return
  20. javascript:return
  21. javascript:return
  22. javascript:return
  23. javascript:return
  24. javascript:return
  25. javascript:return
  26. javascript:return
  27. javascript:return
  28. javascript:return
  29. javascript:return
  30. javascript:return
  31. javascript:return
  32. javascript:return
  33. javascript:return
  34. http://www.scottklement.com/mailman/listinfo/ftpapi
  35. http://www.scottklement.com/mailman/listinfo/ftpapi
  36. http://www.scottklement.com/mailman/listinfo/ftpapi
  37. http://www.scottklement.com/mailman/listinfo/ftpapi
  38. http://www.scottklement.com/mailman/listinfo/ftpapi
  39. http://www.scottklement.com/mailman/listinfo/ftpapi
  40. http://www.scottklement.com/mailman/listinfo/ftpapi
  41. http://www.scottklement.com/mailman/listinfo/ftpapi
  42. http://www.scottklement.com/mailman/listinfo/ftpapi
  43. http://www.scottklement.com/mailman/listinfo/ftpapi
  44. http://www.scottklement.com/mailman/listinfo/ftpapi
  45. http://www.scottklement.com/mailman/listinfo/ftpapi
  46. http://www.scottklement.com/mailman/listinfo/ftpapi
  47. http://www.scottklement.com/mailman/listinfo/ftpapi
  48. http://www.scottklement.com/mailman/listinfo/ftpapi
  49. http://www.scottklement.com/mailman/listinfo/ftpapi
  50. http://www.scottklement.com/mailman/listinfo/ftpapi
  51. http://www.scottklement.com/mailman/listinfo/ftpapi
  52. http://www.scottklement.com/mailman/listinfo/ftpapi
  53. http://www.scottklement.com/mailman/listinfo/ftpapi
  54. http://www.scottklement.com/mailman/listinfo/ftpapi
  55. http://www.scottklement.com/mailman/listinfo/ftpapi
  56. http://www.scottklement.com/mailman/listinfo/ftpapi
  57. http://www.scottklement.com/mailman/listinfo/ftpapi
  58. http://www.scottklement.com/mailman/listinfo/ftpapi
  59. http://www.scottklement.com/mailman/listinfo/ftpapi
  60. http://www.scottklement.com/mailman/listinfo/ftpapi
  61. http://www.scottklement.com/mailman/listinfo/ftpapi
  62. http://www.scottklement.com/mailman/listinfo/ftpapi
  63. http://www.scottklement.com/mailman/listinfo/ftpapi
  64. http://www.scottklement.com/mailman/listinfo/ftpapi
  65. http://www.scottklement.com/mailman/listinfo/ftpapi
  66. http://www.scottklement.com/mailman/listinfo/ftpapi
  67. http://www.scottklement.com/mailman/listinfo/ftpapi
  68. http://www.scottklement.com/mailman/listinfo/ftpapi
  69. http://www.scottklement.com/mailman/listinfo/ftpapi
  70. http://www.scottklement.com/mailman/listinfo/ftpapi
  71. http://www.scottklement.com/mailman/listinfo/ftpapi
  72. http://www.scottklement.com/mailman/listinfo/ftpapi
  73. http://www.scottklement.com/mailman/listinfo/ftpapi
  74. http://www.scottklement.com/mailman/listinfo/ftpapi
  75. http://www.scottklement.com/mailman/listinfo/ftpapi
  76. http://www.scottklement.com/mailman/listinfo/ftpapi
  77. 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
-----------------------------------------------------------------------