Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie to XML --- simple XML file, where do I start?
Message
From
18/09/2006 13:23:20
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Title:
Newbie to XML --- simple XML file, where do I start?
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01154806
Message ID:
01154806
Views:
49
Below is a portion of a little sample XML file whose contents I must extract. I assume that I need to use XMLAdapter, but have no experience with it.

It looks to me like there are a few related tables in this file, so I tried using .LoadXML but with no luck (it didn't complain, but it didn't create any tables, either.)

Any suggestions on a starting path for this?

Thanks in advance,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE OrderList SYSTEM "http://store.yahoo.com/doc/dtd/OrderList2.dtd">
<OrderList StoreAccountName="yhst-11111111111111">
 <Order currency="USD" id="yhst-11111111111111-1550">
  <Time>Wed Sep  6 14:17:17 2006 GMT</Time>
  <NumericTime>1157552237</NumericTime>
  <AddressInfo type="ship">
   <Name>
    <First>Kathleen</First>
    <Last>Jones</Last>
    <Full>Kathleen Jones</Full>
   </Name>
   <Address1>12345 Main Street</Address1>
   <Address2></Address2>
   <City>Grand Rapids</City>
   <State>WV</State>
   <Country>US United States</Country>
   <Zip>11111</Zip>
   <Phone>304-777-7777</Phone>
   <Custom name="Sales Rep">Chris Jones</Custom>
  </AddressInfo>
  <AddressInfo type="bill">
   <Name>
    <First>Kathleen</First>
    <Last>Jones</Last>
    <Full>Kathleen Jones</Full>
   </Name>
   <Address1>12345 Main Street</Address1>
   <Address2></Address2>
   <City>Grand Rapids</City>
   <State>WV</State>
   <Country>US United States</Country>
   <Zip>11111</Zip>
   <Phone>304-777-7777</Phone>
   <Email>AAAAA@juno.com</Email>
  </AddressInfo>
  <Shipping>UPS Ground</Shipping>
  <CreditCard expiration="11/2006" type="MasterCard"/>
  <Item num="0">
   <Id>rww27</Id>
   <Code>RWW-27</Code>
   <Quantity>1</Quantity>
   <Unit-Price>44.88</Unit-Price>
   <Description>Night Poppa</Description>
   <Url>http://www.Poppawholesale.com/ssl/order-night-Poppa.htm</Url>
   <Taxable>YES</Taxable>
  </Item>
  <Item num="1">
   <Id>rww16</Id>
   <Code>RWW-16</Code>
   <Quantity>1</Quantity>
   <Unit-Price>41.88</Unit-Price>
   <Description>Poppa Poppa - Royal Blue</Description>
   <Url>http://www.Poppawholesale.com/ssl/order-Poppa-Poppa.htm</Url>
   <Taxable>YES</Taxable>
  </Item>
  <Item num="2">
   <Id>rww05</Id>
   <Code>RWW-05</Code>
   <Quantity>1</Quantity>
   <Unit-Price>26.88</Unit-Price>
   <Description>Wee Poppa - Classic Mix</Description>
   <Url>http://www.Poppawholesale.com/ssl/order-wee-Poppa.htm</Url>
   <Taxable>YES</Taxable>
  </Item>
  <Item num="3">
   <Id>rww02</Id>
   <Code>RWW-02</Code>
   <Quantity>1</Quantity>
   <Unit-Price>35.88</Unit-Price>
   <Description>Poppa Bone - Classic Mix</Description>
   <Url>http://www.Poppawholesale.com/ssl/order-Poppa-bone.htm</Url>
   <Taxable>YES</Taxable>
  </Item>
  <Item num="4">
   <Id>rww10</Id>
   <Code>RWW-10</Code>
   <Quantity>1</Quantity>
   <Unit-Price>41.88</Unit-Price>
   <Description>Poppa Poppa - Red</Description>
   <Url>http://www.Poppawholesale.com/ssl/order-Poppa-Poppa.htm</Url>
   <Taxable>YES</Taxable>
  </Item>
  <Item num="5">
   <Id>rww12</Id>
   <Code>RWW-12</Code>
   <Quantity>1</Quantity>
   <Unit-Price>35.88</Unit-Price>
   <Description>Poppa Flyer - Red</Description>
   <Url>http://www.Poppawholesale.com/ssl/order-Poppa-flyer.htm</Url>
   <Taxable>YES</Taxable>
  </Item>
  <Total>
   <Line type="Subtotal" name="Subtotal">227.28</Line>
   <Line type="Shipping" name="Shipping">16.55</Line>
   <Line type="Tax" name="Tax">0.00</Line>
   <Line type="Total" name="Total">243.83</Line>
  </Total>
  <Space-Id></Space-Id>
  <CardEvents>
   <CardAuth auth-response="A" cvv-response="M" amount="243.83" avs-response="YYY" approval-number="55555"/>
   <CardEvent amount="243.83" type="Charge"/>
  </CardEvents>
 </Order>
</OrderList>
Jim Nelson
Newbury Park, CA
Next
Reply
Map
View

Click here to load this message in the networking platform