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

RE: EndProc not triggered for Elements



Using Scott's Expat port, you can call a routine at startProc too. Look in the HTTPAPI_H for the documentation of the call. For example, if you are using http_get_xml(), the startproc is the second parameter (usually passed a NULL). EXAMPLE14 in the version I have is using startofElement logic. Take a look there.


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Thomas Raddatz
Sent: Tuesday, July 21, 2015 10:02 AM
To: HTTPAPI and FTPAPI Projects
Subject: Re: EndProc not triggered for Elements

'streetname' is the first element that triggers endProc, because it is the first element that is closed. All other elements are still open when the parser comes to streetName.

Thomas.

Gesendet mit AquaMail für Android
http://www.aqua-mail.com


Am 21. Juli 2015 15:06:22 schrieb George Jeffcock <George.Jeffcock@xxxxxxxxx>:

> Firstly thanks for the open source initiative Scott. I am hopeful this 
> initiative will help CA Plex IBMi users<http://www.stellatools.com/> 
> as much as it has helped native rpg IBMi users.
>
> Secondly all works great and the 'modern' way of coding RPG really 
> suits CA Plex coding and it has proved a nice fit.
>
> One question thou:
>
> Consider the following XML response:
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
> <naturalCustomerInformation>
>                       <addresses>
>                                             <address type="POPULATION">
>                                                                  <streetName>My Street</streetName>
>                                             </address>
>                       </addresses>
>                       <phoneNumbers>
>                                             <phoneNumber type="FIXED_LINE">003345415896</phoneNumber>
>                       </phoneNumbers>
> </naturalCustomerInformation>
>
> Why is my 'EndProc' call-back procedure not triggered for the first 3 elements?
>
> In the above example 'streetName' element is the first to trigger the 
> EndProc procedure which is not what I expected if I want to read 'address'
> type attribute.
>
> In the above example 'naturalCustomerInformation' element is the first 
> to trigger the StartProc procedure which is what I expected.
>
> I care because I'm trying to read the attribute 'type' belonging to 
> element 'address'.
>
> I have no problem reading the attribute 'type' belonging to element 
> 'phoneNumber' within the 'EndProc'
>
>
> Misunderstanding or bug or config or developer stupidity..I am trying 
> to narrow it down.
>
> Currently using the current version of HTTPAPI downloaded and 
> installed last month
>
> Many thanks
> George Jeffcock
> www.stellatools.com<http://www.stellatools.com/>
>
>
>
>
>
>
> [cid:07d1c6.png@df49d3f1.4ca03e53]
> George Jeffcock
> Utvecklare Kontosystemet
> IT | Utveckling
>
>
>
>
> Resurs Bank AB
> Ekslingan 9
> Box 22209, SE-250 24 Helsingborg
>
>
>
>
> Växel:  +46 42 38 20 00
> E-post: George.Jeffcock@xxxxxxxxx<mailto:George.Jeffcock@xxxxxxxxx>
> Webb:   www.resursbank.se<http://www.resursbank.se>
>
>
>
>
>
>
> ----------
> ----------------------------------------------------------------------
> - 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
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------