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

Re: Getting access to the entire attributes string



   Scott M
   my xmlReader is constructed so you can read the data in the XML
   document you
   need and in the same time store part of the original XML document.
   Let me give you an example ...
   In denmark we have a requirement by law to store the original document
   you
   receive.
   If we receive a XML document with invoices we both need to extract data
   to the
   inhouse ERP system and store the original document.
   Let's say the I receive a XML document with 100 invoices I can in the
   same
   process update the inhouse files and chop up the invoices in 100 small
   IFS files
   per invoice for documentation or even i CLOB fields.
   So one invoice may generate a number of DB2 transactions but I can also
   at invoice level store a reference in the DB2 transactions to the
   original XML�   document.
   �
   On Wed, May 21, 2014 at 4:43 PM, Scott Mildenberger
   <[1]SMildenberger@xxxxxxxxxxxxxxxxxx> wrote:

     Henrik,
     You are right that using another XML reader that had the capability
     I needed would work for what I was asking. �But, Charles'
     suggestion got me thinking differently and will work out better.
     �It will result in being able to use the data immediately when I am
     ready, it will be easy to summarize with SQL. �My original idea
     would have required more processing to be done later to get the data
     usable.
     Thanks,
     Scott

   -----Original Message-----
   From: [2]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   [mailto:[3]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Henrik
   Rützou
   Sent: Wednesday, May 21, 2014 8:26 AM
   To: HTTPAPI and FTPAPI Projects
   Subject: Re: Getting access to the entire attributes string
   Scott M
   you just have to use another XML reader that is able to store an
   element or a part of a xml document like this that stores the "data"
   element at end of any element into a field or a IFS file:
   �* Reading XML
   �/copy qsrc,pxapihdr � � �General H-Spec's
   �* powerEXT API Connectors
   �/copy qsrc,pxapicgicn � �Basic HTTP connecter & Basic Services
   �* Declare Internal Variables
   d dsp � � � � � � s � � � � � � 52a � varying
   d wrkElement � � �s � � � � �65535a � based(wrkElementP)
   d �wrkElementP � �s � � � � � � � *
   �/free
   � clearSrvPgm();
   � setContent('*none');
   � xmlFromStmf('xls.xml');
   � xmlReaderInz(xmladdr:xmlsize);
   � xmlReaderCase('L');
   � dow xmlReader = 0;
   � � select;
   � � � when xmlGetNode = '/data';
   � � � � wrkElementP = xmlAddrOuter;
   � � � � dsp = %subst(wrkElement:1:xmlSizeOuter);
   � � � � dsply dsp;
   � � endsl;
   � enddo;
   � *inlr = *on;
   �/end-free
   On Wed, May 21, 2014 at 3:46 PM, Scott Mildenberger <
   [4]SMildenberger@xxxxxxxxxxxxxxxxxx> wrote:
   > Charles,
   >
   > That is a very good idea, I didn't think of that. �I like that it
   will
   > automatically store new attributes that are added in the future.
   >
   > Thanks,
   >
   > Scott
   >
   > -----Original Message-----
   > From: [5]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:
   > [6]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Charles Wilt
   > Sent: Wednesday, May 21, 2014 6:42 AM
   > To: HTTPAPI and FTPAPI Projects
   > Subject: Re: Getting access to the entire attributes string
   >
   > I'd simply store the parsed data returned by http_nextXmlAttr() in a
   > new table with a structure that looked like
   >
   > foreignKey �<the PK from whatever existing table you are updating in
   > your
   > system>
   > attribute
   > value
   >
   > Then when it's time to start doing something, the data is already
   > parsed and it will be real easy to get to the attributes you are
   interested in.
   >
   > Charles
   >
   >
   >
   > On Tue, May 20, 2014 at 5:40 PM, Scott Mildenberger <
   > [7]SMildenberger@xxxxxxxxxxxxxxxxxx> wrote:
   >
   > > Most of the XML I do want the parsed response, it is just the one
   > > element that contains 300+ attributes that I would like to store
   for
   > > now in its raw form. �If there weren't that many attributes I
   would
   > > just grab them individually. �Sometime in the future I plan on
   > > storing all the attributes individually but I may not get to that
   > > for a little bit. �This is just a temporary thing due to task
   priorities.
   > >
   > > Scott
   > >
   > > -----Original Message-----
   > > From: [8]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:
   > > [9]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott
   Klement
   > > Sent: Tuesday, May 20, 2014 3:22 PM
   > > To: HTTPAPI and FTPAPI Projects
   > > Subject: Re: Getting access to the entire attributes string
   > >
   > >
   > > I wonder, though, why you'd want to parse the XML but then want to
   > > get the original XML code instead of a parsed response? �That
   seems
   > > like a strange thing.
   > >
   --------------------------------------------------------------------
   > > --
   > > - This is the FTPAPI mailing list. �To unsubscribe, please go to:
   > > [10]http://www.scottklement.com/mailman/listinfo/ftpapi
   > >
   --------------------------------------------------------------------
   > > ---
   > >
   >
   ----------------------------------------------------------------------
   > - This is the FTPAPI mailing list. �To unsubscribe, please go to:
   > [11]http://www.scottklement.com/mailman/listinfo/ftpapi
   >
   ----------------------------------------------------------------------
   > -
   >

     --
     Regards,
     Henrik Rützou
     �[12]http://powerEXT.com <[13]http://powerext.com/>

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

   --
   Regards,
   Henrik Rützou
   �   [15]http://powerEXT.com
   �
References

   1. mailto:SMildenberger@xxxxxxxxxxxxxxxxxx
   2. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   3. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   4. mailto:SMildenberger@xxxxxxxxxxxxxxxxxx
   5. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   6. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   7. mailto:SMildenberger@xxxxxxxxxxxxxxxxxx
   8. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   9. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  10. http://www.scottklement.com/mailman/listinfo/ftpapi
  11. http://www.scottklement.com/mailman/listinfo/ftpapi
  12. http://powerEXT.com/
  13. http://powerext.com/
  14. http://www.scottklement.com/mailman/listinfo/ftpapi
  15. http://powerext.com/
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------