AnsweredAssumed Answered

Help with XSLT for XML import from ShopSite

Question asked by MountainMan on Jan 14, 2012

Title

Help with XSLT for XML import from ShopSite

Post

I'm trying to get the shopsite XML export into a FM Pro 11 database.  It's a typical Order->multiple items structure, and I can't seem to find an XLST example to start from.  I'm sure that this has been done a bunch of times, but can't find an XLST out on the net anywhere.

Likewise, if anyone has pointers to a good tutorial on how to do this, it'd be welcome.  The documentation on the Fm site is really thin (and mostly about publishing).

 

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE ShopSiteOrders PUBLIC "-//shopsite.com//ShopSiteOrder DTD//EN" "http://www.shopsite.com/XML/2.2/shopsiteorders.dtd">
<ShopSiteOrders>
<Response>
<ResponseCode>1</ResponseCode>
<ResponseDescription>success</ResponseDescription>
</Response>
<Order>
<OrderNumber>3333</OrderNumber>
<ShopSiteTransactionID>30053-12345678</ShopSiteTransactionID>
<OrderDate>2012-01-01 18:50:41</OrderDate>
<Billing>
<FullName>Joe R. Customer</FullName>
<NameParts>
<Title/>
<FirstName>Joe R.</FirstName>
<MiddleName/>
<LastName>Customer</LastName>
<Suffix/>
</NameParts>
<Email>customer@email.com</Email>
<Company/>
<Phone>000-000-0000</Phone>
<Address>
<Street1>123 Main Street</Street1>
<Street2/>
<City>Anytown</City>
<State>CA</State>
<Code>20020</Code>
<Country>United States</Country>
</Address>
</Billing>
<Shipping>
<FullName>Joe R. Customer</FullName>
<NameParts>
<Title/>
<FirstName>Joe R.</FirstName>
<MiddleName/>
<LastName>Customer</LastName>
<Suffix/>
</NameParts>
<Company/>
<Phone>000-000-0000</Phone>
<Address>
<Street1>123 Main Street</Street1>
<Street2/>
<City>Anytown</City>
<State>CA</State>
<Code>20020</Code>
<Country>United States</Country>
</Address>
<Products>
<Product>
<ProdType>Tangible</ProdType>
<Name>Company&trade; Productname 8&quot;x11&quot; Paper</Name>
<SKU>PAPER-8511</SKU>
<Taxable>Yes</Taxable>
<Quantity>1</Quantity>
<ItemPrice>19.95</ItemPrice>
<Total>19.95</Total>
<Weight>2.00</Weight>
<Dimension/>
<OrderOptions/>
<CustomerText/>
<QBImport/>
<DobaItemID/>
</Product>
<Product>
<ProdType>Tangible</ProdType>
<Name>Company&trade; Product-Pack</Name>
<SKU>PRODPACK</SKU>
<Taxable>Yes</Taxable>
<Quantity>1</Quantity>
<ItemPrice>14.45</ItemPrice>
<Total>14.45</Total>
<Weight>1.81</Weight>
<Dimension/>
<OrderOptions/>
<CustomerText/>
<QBImport/>
<DobaItemID/>
</Product>
</Products>
</Shipping>
<Payment>
<CreditCard>
<Issuer>Visa</Issuer>
<Number>************0000</Number>
<VerificationValue>**purged**</VerificationValue>
<FullName>Joe R. Customer</FullName>
<Company/>
<ExpirationDate>**/****</ExpirationDate>
<PaymentGateway>gatewayname</PaymentGateway>
<PaymentStatus/>
<OrderProcessingInfo>Long|code|data</OrderProcessingInfo>
</CreditCard>
</Payment>
<Totals>
<ProductTotal>13.40</ProductTotal>
<Discount/>
<Subtotal>13.40</Subtotal>
<Tax>
<TaxName>No Tax</TaxName>
<TaxRate>0.00</TaxRate>
<TaxAmount>0.00</TaxAmount>
<TaxShipping>No</TaxShipping>
</Tax>
<GrandTotal>15.90</GrandTotal>
<ShippingTotal>
<Total>1.50</Total>
<Description>Priority Mail(R)</Description>
</ShippingTotal>
<Surcharge/>
</Totals>
<Coupon/>
<Other>
<CustomerID/>
<Associate/>
<OrderInstructions/>
<Comments/>
<Notes/>
<OrderUTC>12345678</OrderUTC>
<IpHostname>IP Address:255.255.255.0, Host Name:Not Determined</IpHostname>
<TotalOrderWeight>2.812500</TotalOrderWeight>
<EmailList/>
<BuySafeAmount/>
<BuySafeText/>
<BuySafeCartID/>
<DobaShipping/>
<DobaOrderInfo/>
<VATID/>
<CustomCheckoutField/>
</Other>
</Order>
</ShopSiteOrders>

Outcomes