Extract data from XML
(Testing on CF2016)
I have test CFM file that creates an XML file with the result as:
<TransferredValueTxn>
<TransferredValueTxnReq>
<ReqCat>TransferredUse</ReqCat>
<ReqAction>StatInq</ReqAction>
<Date>20100318</Date>
<Time>124430</Time>
<PartnerName>PARTNER</PartnerName>
<CardActionInfo>
<PIN>th2i-s4is-4a34-fa9k-e71u</PIN>
<AcctNum>optional</AcctNum>
<SrcRefNum>987654</SrcRefNum>
</CardActionInfo>
</TransferredValueTxnReq>
</TransferredValueTxn>
I use another CFM page to retrieve this data:
<cfhttp url="http://127.0.0.1/dev/api/test.cfm" method="get" result="objGet">
<CFDUMP VAR="#objget#">
This gives me all of the data in the FILECONTENT, which is
<?xml version="1.0" ?> <TransferredValueTxn> <TransferredValueTxnReq> <ReqCat>TransferredUse</ReqCat> <ReqAction>StatInq</ReqAction> <Date>20100318</Date> <Time>124430</Time> <PartnerName>PARTNER</PartnerName> <CardActionInfo> <PIN>th2i-s4is-4a34-fa9k-e71u</PIN> <AcctNum>optional</AcctNum> <SrcRefNum>987654</SrcRefNum> </CardActionInfo> </TransferredValueTxnReq> </TransferredValueTxn>
Could anybody give me some guidance as to how I would extract all of the data into separate variables so that I could then work with the data.
Thanks
