Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XMLtoCursor help needed
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00676855
Message ID:
00676879
Vues:
13
Tristan,

VFP can not natively handle this sort of hierarchical XML document with XMLToCursor(). You are going to have to write some custom code to process the XMLDOM nodes yourself. It's not really that hard to do. You should check some stuff just released in the COM Codebook I read that it might be able to handle these sorts of documents. If not check out Rick Strahl's wwxml classlib. Rick's code can at least give you some pointers as to how to go about traversing the DOM.

>Here's the contents of the xml document:
>
>
><?xml version="1.0" encoding="ISO-8859-1"?>
><e5Notification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xml.element5.com/1.0/notification.xsd">
>	<OrderNotification>
>		<Purchase>
>			<PurchaseId>1845252</PurchaseId>
>			<PurchaseDate>2002-07-02T06:09:50</PurchaseDate>
>			<PaymentCompleteDate>2002-07-02T06:09:51</PaymentCompleteDate>
>			<PaymentStatus>test payment arrived</PaymentStatus>
>			<CustomerData>
>				<BillingContact>
>					<Salutation>MR.</Salutation>
>					<LastName>McElhinney</LastName>
>					<FirstName>Tristan</FirstName>
>					<Company>Elmbrook Technologies Limited</Company>
>					<Email>myemail@company.co.nz</Email>
>					<Address>
>						<Street1>Dummy street 1</Street1>
>						<Street2>Dummy street 2</Street2>
>						<City>Wellington</City>
>						<PostalCode>6040</PostalCode>
>						<Country>NEW ZEALAND</Country>
>					</Address>
>				</BillingContact>
>				<DeliveryContact>
>					<Salutation>MR.</Salutation>
>					<LastName>McElhinney</LastName>
>					<FirstName>Tristan</FirstName>
>					<Company>Elmbrook Technologies Limited</Company>
>					<Email>myemail@company.co.nz</Email>
>					<Address>
>						<Street1>Dummy street 1</Street1>
>						<Street2>Dummy street 2</Street2>
>						<City>Wellington</City>
>						<PostalCode>6040</PostalCode>
>						<Country>NEW ZEALAND</Country>
>					</Address>
>				</DeliveryContact>
>				<CustomerPaymentData>
>					<PaymentType>Credit Card</PaymentType>
>					<Currency>USD</Currency>
>					<CCType>Mastercard / Eurocard</CCType>
>					<DCType>Other</DCType>
>				</CustomerPaymentData>
>				<Language>English</Language>
>				<RegName>Tristan McElhinney</RegName>
>				<RemoteHost>202-1-33-145.cable.paradise.net.nz</RemoteHost>
>				<RemoteAddr>202.1.33.145</RemoteAddr>
>				<UserAgent>Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)</UserAgent>
>				<SubscribeNewsletter>false</SubscribeNewsletter>
>			</CustomerData>
>			<PurchaseItem>
>				<RunningNo>1</RunningNo>
>				<ProductId>149867</ProductId>
>				<NotificationNo>0</NotificationNo>
>				<DeliveryType>Electronically</DeliveryType>
>				<Quantity>1</Quantity>
>				<AdditionalInformation>
>					<AdditonalId>1</AdditonalId>
>					<AdditionalValue>None</AdditionalValue>
>				</AdditionalInformation>
>				<AdditionalInformation>
>					<AdditonalId>2</AdditonalId>
>					<AdditionalValue>Nonet</AdditionalValue>
>				</AdditionalInformation>
>			</PurchaseItem>
>		</Purchase>
>	</OrderNotification>
></e5Notification>
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform