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

RE: MapXmlData question



I figured that is what I needed to do, so I did code it that way. That is, I am saving all occurrences of userID in an array, and all occurrences of mobileDeviceNumber in another array. The element number should be the same if they are parsed in sequence. It appears that is exactly what is happening. I was not sure if the tags were retrieved/parsed in arrival sequence or not. And I wanted to make sure there was not another method. 

Thank you for your help,
Tony 

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Nicolas Machado
Sent: Friday, August 21, 2009 3:54 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: MapXmlData question

Hi Again Tony

I google some pages and I found that MapXMLData IS your callback 
procedure...

well try this:

As fas as the parser "read" the Xml, for each end tag it will call 
mapxmlData subprocedure

    so each time you receive a Tag wih the name  "mobileDeviceNumber" 
you got the value of the tag.,
    each time you receive a Tag wih the name  "userID" you got the value 
of the tag userID.
   
    until now .. nothing new, don't hit me.

    But, because you have 2 tags <agentIdentities>, you must receive 2 
times the tag <agentIdentities> in the subprocedure.
    Whenever you get the FIRST <agentIdentities> tag, you could assume 
that you reach the END of the firs block/ or user or whatever so you 
must save your actual
        MobileDeviceNumber and userId to a persistent data , for example 
a pf-file.

    and for each <agentIdentities> tag, you could do the same.

I really hope this help to you.

Best regards
Nicolas

             

mobileDeviceNumber


Tony.Davis2@xxxxxxx escribió:
>    This is my first post, and as you will be able to tell, I am
>    inexperienced with XML and HTTPAPI. So I do not even know enough to
>    search for a solution first because I am not sure how to refer to the
>    exact definition of the XML tags. But, here is my issue. I have
>    successfully parsed the information that I am looking for (using
>    HTTPAPI of course), specifically, a number of email addresses
>    associated with one account (the tag is userId). The problem is that I
>    need to identify another name tag and associate that with each email
>    address.
>
>
>
>    So, how do I group information by the header tag (not sure of the
>    exact reference)?
>
>
>
>    That is, how do I associate the first <mobileDeviceNumber> with the
>    first <userId>, and the second <mobileDeviceNumber> with the second
>    <userId>? I do not see that they are in this same order when I receive
>    them using MapXmlData.
>
>
>
>    Here is an example of the XML
>
>
>
>    <agentIdentities>
>
>
>    <acctGUIDs>d3566f80-39b3-11de-9934-00217095b8ee</acctGUIDs>
>
>                <acctNbrHistory>6111027582601</acctNbrHistory>
>
>                <agentAccounts>
>
>
>    <acctGUID>d3566f80-39b3-11de-9934-00217095b8ee</acctGUID>
>
>                   <acctNbr13>6111027582601</acctNbr13>
>
>
>    <agentCustGUIDs>3d2ea160-39ba-11de-b400-00217095b8ee</agentCustGUIDs>
>
>
>    <agentCustGUIDs>b5e93240-39bb-11de-b400-00217095b8ee</agentCustGUIDs>
>
>
>    <agentCustGUIDs>d7a238a0-43e8-11de-bb48-00217095b8ee</agentCustGUIDs>
>
>
>    <agentCustGUIDs>3d652b10-6c99-11de-8db9-0003baa015c2</agentCustGUIDs>
>
>
>    <agentCustGUIDs>fae175e0-8765-11de-85e1-00217095b8ee</agentCustGUIDs>
>
>                   <companyNbr>61</companyNbr>
>
>                   <divisionNbr>11</divisionNbr>
>
>
>    <holderCustGUID>d3874380-39b3-11de-9934-00217095b8ee</holderCustGUID>
>
>                   <icomsAcctNbr>027582601</icomsAcctNbr>
>
>                   <siteId>131</siteId>
>
>                </agentAccounts>
>
>                <agentAcctNbrs>6111027582601</agentAcctNbrs>
>
>                <custGUID>d7a238a0-43e8-11de-bb48-00217095b8ee</custGUID>
>
>                <disabled>false</disabled>
>
>                <firstName>Agent3</firstName>
>
>                <fullName>Agent3 Geisler</fullName>
>
>                <homePhone/>
>
>                <idmStatus/>
>
>                <lastName>Geisler</lastName>
>
>                <marketingOptOutFlag>Y</marketingOptOutFlag>
>
>                <mobileDeviceNumber>5559991212</mobileDeviceNumber>
>
>                <nickname/>
>
>                <passwordNew/>
>
>                <pin/>
>
>                <preferredContactEmail/>
>
>                <secretAnswer/>
>
>                <secretQuestion/>
>
>                <secretQuestionCode/>
>
>                <suppressPinFlag>N</suppressPinFlag>
>
>                <userDN/>
>
>                <userId>agent3.geisler@xxxxxxxxxxx</userId>
>
>                <username>agent3.geisler</username>
>
>                <zipCode/>
>
>             </agentIdentities>
>
>    <agentIdentities>
>
>
>    <acctGUIDs>d3566f80-39b3-11de-9934-00217095b8ee</acctGUIDs>
>
>                <acctNbrHistory>6111027582601</acctNbrHistory>
>
>                <agentAccounts>
>
>
>    <acctGUID>d3566f80-39b3-11de-9934-00217095b8ee</acctGUID>
>
>                   <acctNbr13>6111027582601</acctNbr13>
>
>
>    <agentCustGUIDs>3d2ea160-39ba-11de-b400-00217095b8ee</agentCustGUIDs>
>
>
>    <agentCustGUIDs>b5e93240-39bb-11de-b400-00217095b8ee</agentCustGUIDs>
>
>
>    <agentCustGUIDs>d7a238a0-43e8-11de-bb48-00217095b8ee</agentCustGUIDs>
>
>
>    <agentCustGUIDs>3d652b10-6c99-11de-8db9-0003baa015c2</agentCustGUIDs>
>
>
>    <agentCustGUIDs>fae175e0-8765-11de-85e1-00217095b8ee</agentCustGUIDs>
>
>                   <companyNbr>61</companyNbr>
>
>                   <divisionNbr>11</divisionNbr>
>
>
>    <holderCustGUID>d3874380-39b3-11de-9934-00217095b8ee</holderCustGUID>
>
>                   <icomsAcctNbr>027582601</icomsAcctNbr>
>
>                   <siteId>131</siteId>
>
>                </agentAccounts>
>
>                <agentAcctNbrs>6111027582601</agentAcctNbrs>
>
>                <custGUID>3d652b10-6c99-11de-8db9-0003baa015c2</custGUID>
>
>                <disabled>false</disabled>
>
>                <firstName>Agent8</firstName>
>
>                <fullName>Agent8 Geisler</fullName>
>
>                <homePhone/>
>
>                <idmStatus/>
>
>                <lastName>Geisler</lastName>
>
>                <marketingOptOutFlag>Y</marketingOptOutFlag>
>
>                <mobileDeviceNumber>1112223333</mobileDeviceNumber>
>
>                <nickname/>
>
>                <passwordNew/>
>
>                <pin/>
>
>                <preferredContactEmail/>
>
>                <secretAnswer/>
>
>                <secretQuestion/>
>
>                <secretQuestionCode/>
>
>                <suppressPinFlag>N</suppressPinFlag>
>
>                <userDN/>
>
>                <userId>agent8.geisler@xxxxxxxxxxx</userId>
>
>                <username>agent8.geisler</username>
>
>                <zipCode/>
>
>             </agentIdentities>
>
>   
> ------------------------------------------------------------------------
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>   

-- 
.::.
Nicolas Machado
Metodo Argentina S.A.
_____________________
Tel: 02262 527431
Necochea, Buenos Aires.

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