Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parse XML in VFP possibly using xpath
Message
From
20/08/2002 16:57:27
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00691656
Message ID:
00691673
Views:
15
Robert

There is an article in the September FPA that talks about xpath.


>I have some XML similar to the sample below. I would like to parse it and place it into two VFP cursors, CurCustomer and CurInvoices. Currently I am parsing the XML with code something like:
> WITH loXMLDOM.DocumentElement.ChildNodes
> FOR iCount = 0 TO .LENGTH - 1
> *APPEND BLANK
> FOR iChild = 0 TO .ITEM(iCount).ChildNodes.LENGTH - 1
> lcVar = .ITEM(iCount).ChildNodes(iChild)
>
>I am looking for a VFP code sample showing a "better" [best practice] method, possibly using XPATH, to accomplish my objective.
>
>
>
> 4045
> MY MOTOR SPORTS, INC.
>
> 4045
> 37466
>

>
> 4045
> 37946
>

>
> 4045
> 39226
>

>
> 4045
> 39482
>

>
> 4045
> 40302
>

>
> 4045
> 40727
>

>

>
> 4049
> ZZZ AUTO SERVICE
>
> 4049
> 37276
>

>
> 4049
> 38184
>

>
> 4049
> 38929
>

>
> 4049
> 40117
>

>
> 4049
> 41486
>

>
> 4049
> 42820
>

>

>

>
>TYIA,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform