|
|
#1 |
|
New Member
Join Date: Apr 05
Posts: 14
![]() |
Help with XML
I am having a problem trying to parse thrugh my xml response. It does not get all the information in the response. Here is what my xml soap message looks like:
Code:
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:getCardResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://services.com">
<getCardReturn href="#id0" />
</ns1:getCardResponse>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Card" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://www.mccoymyers.com/CardMaint">
<addrOne xsi:type="xsd:string">6200 Bell</addrOne>
<addrTwo xsi:type="xsd:string">
</addrTwo>
<atmOflLimit xsi:type="xsd:long">200</atmOflLimit>
<atmOnlLimit xsi:type="xsd:long">300</atmOnlLimit>
<cardAccounts soapenc:arrayType="ns2:CardAccount[4]" xsi:type="soapenc:Array">
<cardAccounts href="#id1" />
<cardAccounts href="#id2" />
<cardAccounts href="#id3" />
<cardAccounts href="#id4" />
</cardAccounts>
<cardType xsi:type="xsd:string">MD</cardType>
<chkOflLimit xsi:type="xsd:long">100</chkOflLimit>
<chkOnlLimit xsi:type="xsd:long">200</chkOnlLimit>
<city xsi:type="xsd:string">Bumsville</city>
<custName xsi:type="xsd:string">Test User</custName>
<expDate xsi:type="xsd:string">1010</expDate>
<issueDate xsi:type="xsd:string">0605</issueDate>
<issueStatus xsi:type="xsd:string">1</issueStatus>
<maxAtmTrans xsi:type="xsd:long">100</maxAtmTrans>
<maxOflLimit xsi:type="xsd:long">400</maxOflLimit>
<maxOnlLimit xsi:type="xsd:long">700</maxOnlLimit>
<maxPosTrans xsi:type="xsd:long">200</maxPosTrans>
<memberNbr xsi:type="xsd:int">1</memberNbr>
<nbrIssued xsi:type="xsd:string">1</nbrIssued>
<orderCard xsi:type="xsd:string">N</orderCard>
<orderPin xsi:type="xsd:string">N</orderPin>
<pan xsi:type="xsd:string">9999999999999999999</pan>
<pinOffset xsi:type="xsd:string">0000</pinOffset>
<pposOflLimit xsi:type="xsd:long">200</pposOflLimit>
<pposOnlLimit xsi:type="xsd:long">400</pposOnlLimit>
<state xsi:type="xsd:string">TX</state>
<status xsi:type="xsd:string">0</status>
<waiveSerChg xsi:type="xsd:string">A</waiveSerChg>
<zip xsi:type="xsd:string">79109</zip>
</multiRef>
<multiRef id="id4" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:CardAccount" xmlns:ns3="http://www.mccoymyers.com/CardMaint" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<acctDesc xsi:type="xsd:string">Savings number two</acctDesc>
<acctType xsi:type="xsd:string">11</acctType>
<id xsi:type="xsd:string">4</id>
<num xsi:type="xsd:string">1234567851</num>
<status xsi:type="xsd:string">1</status>
</multiRef>
<multiRef id="id3" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:CardAccount" xmlns:ns4="http://www.mccoymyers.com/CardMaint" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<acctDesc xsi:type="xsd:string">Savings number one</acctDesc>
<acctType xsi:type="xsd:string">11</acctType>
<id xsi:type="xsd:string">3</id>
<num xsi:type="xsd:string">1234567850</num>
<status xsi:type="xsd:string">1</status>
</multiRef>
<multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns5:CardAccount" xmlns:ns5="http://www.mccoymyers.com/CardMaint" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<acctDesc xsi:type="xsd:string">Checking number two</acctDesc>
<acctType xsi:type="xsd:string">01</acctType>
<id xsi:type="xsd:string">2</id>
<num xsi:type="xsd:string">1234567801</num>
<status xsi:type="xsd:string">1</status>
</multiRef>
<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns6:CardAccount" xmlns:ns6="http://www.mccoymyers.com/CardMaint" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<acctDesc xsi:type="xsd:string">Checking number one</acctDesc>
<acctType xsi:type="xsd:string">01</acctType>
<id xsi:type="xsd:string">1</id>
<num xsi:type="xsd:string">1234567800</num>
<status xsi:type="xsd:string">1</status>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
VB Code:
This is what I get in my textbox: Code:
6200 Bell 200 300 MD 100 200 Amarillo Test User 1010 0605 1 100 400 700 200 1 1 N N 9999999999999999999 0000 200 400 TX 0 A 79109 |
|
|
|
|
|
#2 |
|
VB6, XHTML & CSS hobbyist
Join Date: Oct 02
Location: Finland
Posts: 6,440
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Help with XML
Take a look into attributes. Basically the same kind of array stuff you've done with the nodes, just that you need to work out the attributes for each node. If you're not sure how to access attributes, open up Object Browser and look from there what you need, the naming convention is similar (IXMLDOMAttributes or something).
__________________
Unicode classes, functions... in Visual Basic 6
VB6 in occasional use. I'm mostly HTML, CSS & JavaScript these days. « Antec Sonata II: Core 2 Duo E7400, ASRock P45TS, Asus EN9600GT 512 MB, 4 GB, 1.25 TB » « OS: Windows 7 | Laptop: Amilo Pi 2530-12P| Netbook: Asus EEE 901 » |
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|