[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Getting access to the entire attributes string
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: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto: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 < 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: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:
> 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 <
> 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: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:
> > 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:
> > 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
> ----------------------------------------------------------------------
> -
>
--
Regards,
Henrik Rützou
http://powerEXT.com <http://powerext.com/>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------