Totally New To Xml
Jun 14, 2005Whilst on holiday last week I have been reading about the wonders of xml! Following this, one of my clients has forwarded a piece of code that he says is "dead easy" to use!!! erm. Maybe easy for some, but total gobbeldy gook to a layperson like me.
What I would really love to do is understand how to use this to automatically fire data via the web from my database to his
I am assuming that say on line 4 where it says "983", I could substitute this with Me.DealerCode (for exampole?)
Here is the code he has sent me
<?xml version="1.0" ?>
<proposal request_type="NEW_PROPOSAL">
<proposal_type>CONSUMER</proposal_type>
<introducer_ref>983</introducer_ref>
<vendor>ABC Cars Ltd</vendor>
<customer type="MAIN"> <!-- Range MAIN, JOINT -->
<name>
<title>Mr</title> <!-- Range MR, MRS, MISS, MS, DR -->
<first_name>Keith</first_name>
<last_name>Miller</last_name>
</name>
<date_of_birth>
<dd>1</dd>
<mm>1</mm>
<yyyy>1970</yyyy>
</date_of_birth>
<gender>M</gender> <!-- Range M, F -->
<marital_status>married</marital_status> <!-- Range SINGLE, MARRIED, DIVORCED_SEPARATED,WIDOWED, LIVES_WITH_PARTNER -->
<home_phone>
<std>01908</std>
<number>123456</number>
</home_phone>
<work_phone>
<std>01234</std>
<number>456789</number>
</work_phone>
<mobile_phone>
<std>07777</std>
<number>987654</number>
</mobile_phone>
<address type="current"> <!-- Range CURRENT, PREVIOUS -->
<years_at>3</years_at>
<months_at></months_at>
<occupancy_status>owner</occupancy_status> <!-- Range OWNER, FURNISHED_TENANT, UNFURNISHED_TENANT, LIVES_WITH_PARENTS, COUNCIL_TENANT, TENANT -->
<flat></flat>
<house_name></house_name>
<house_number>18</house_number>
<postcode>mk187es</postcode>
<street> </street>
<district></district>
<town></town>
<county></county>
</address>
<employment index="0"> <!-- Range 0,1,2,3, ... -->
<employment_type>E</employment_type> <!-- Range E=Employed, SE=Self Employed, R=Retired, UE=Unemployed, O=Other -->
<employed_from>
<mm>12</mm>
<yyyy>1999</yyyy>
</employed_from>
<occupation>Plumber</occupation>
<company_name>Plumbers Ltd</company_name>
<business_address>1 Plumbing Road</business_address>
<business_postcode>MK11MK</business_postcode>
</employment>
<bank>
<account_name>Mr K Miller</account_name>
<sortcode>601455</sortcode>
<account_no>36528609</account_no>
</bank>
</customer>
<customer type="JOINT"> <!-- Range MAIN, JOINT -->
<name>
<title>Mr</title> <!-- Range MR, MRS, MISS, MS, DR -->
<first_name>Graham</first_name>
<last_name>White</last_name>
</name>
<date_of_birth>
<dd>02</dd>
<mm>01</mm>
<yyyy>1949</yyyy>
</date_of_birth>
<gender>M</gender> <!-- Range M, F -->
<marital_status>MARRIED</marital_status> <!-- Range SINGLE, MARRIED, DIVORCED_SEPARATED,WIDOWED, LIVES_WITH_PARTNER -->
<home_phone>
<std>01908</std>
<number>456789</number>
</home_phone>
<work_phone>
<std>01234</std>
<number>789987</number>
</work_phone>
<mobile_phone>
<std>07777</std>
<number>111222</number>
</mobile_phone>
<address type="CURRENT"> <!-- Range CURRENT, PREVIOUS -->
<years_at>3</years_at>
<months_at></months_at>
<occupancy_status>OWNER</occupancy_status> <!-- Range OWNER, FURNISHED_TENANT, UNFURNISHED_TENANT, LIVES_WITH_PARENTS, COUNCIL_TENANT, TENANT -->
<flat></flat>
<house_name></house_name>
<house_number>8</house_number>
<postcode>MK77EP</postcode>
<street></street>
<district></district>
<town></town>
<county></county>
</address>
<address type="previous"> <!-- Range CURRENT, PREVIOUS -->
<years_at>1</years_at>
<months_at></months_at>
<occupancy_status>FURNISHED_TENANT</occupancy_status> <!-- Range OWNER, FURNISHED_TENANT, UNFURNISHED_TENANT, LIVES_WITH_PARENTS, COUNCIL_TENANT, TENANT -->
<flat></flat>
<house_name></house_name>
<house_number>8</house_number>
<postcode>MK77EP</postcode>
<street></street>
<district></district>
<town></town>
<county></county>
</address>
<employment index="0"> <!-- Range 0,1,2,3, ... -->
<employment_type>E</employment_type> <!-- Range E=Employed, SE=Self Employed, R=Retired, UE=Unemployed, O=Other -->
<employed_from>
<mm>02</mm>
<yyyy>1983</yyyy>
</employed_from>
<occupation>Project Manager</occupation>
<company_name>Transition Computing Ltd</company_name>
<business_address>Suite 12, Challenge House, Bletchley
</business_address>
<business_postcode>MK63DP</business_postcode>
</employment>
</customer>
<vehicle>
<vrm>V843LOX</vrm>
<mileage>5000</mileage>
<type>U</type> <!-- Range N,U -->
<first_reg>UK</first_reg> <!-- Range UK, OVERSEAS -->
<category>CAR</category> <!-- Range CAR, MCYCLE, LCV, OTHER -->
<classic>N</classic> <!-- Range Y, N -->
<make>BMW</make>
<model>3 SERIES (E46) 323CI SE</model>
<body_type>Coupe</body_type>
<transmission>MANUAL 5 GEARS</transmission>
<engine_capacity>2500</engine_capacity>
<colour>BLUE</colour>
<FRUK>
<dd>03</dd>
<mm>11</mm>
<yyyy>1999</yyyy>
</FRUK>
<year_of_manufacture>1999</year_of_manufacture>
<engine_number>26749325</engine_number>
<VIN>WBABM32020EX32433</VIN>
<fuel_type>PETROL</fuel_type>
<ins_grp>15</ins_grp>
<TVMA>9200</TVMA>
<retail>11400</retail>
</vehicle>
<finance>
<cost>5000</cost>
<vat_applicable>N</vat_applicable> <!-- Range Y, N -->
<deposit>500</deposit>
<term>36</term> <!-- Range 12 to 48 -->
<flat_rate>6</flat_rate>
</finance>
</proposal>