Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error to copy content of XML file to Cursor
Message
From
08/02/2022 08:07:20
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
08/02/2022 08:00:54
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01683464
Message ID:
01683469
Views:
31
>Hi Luis.
>
>I need to run the code and see what fails - to do it with just looking is to much for this day.
>
>>docomando fails while looking into the code ...
>>
>>looking through it w/o running it. Well that's large
>>
>>;)
>>
>>Hi Lutz,
>>
>>Thanks for your reply, but can you suggest me another method that be able to read all the XML file content inserting the values into my cursor crstmp !?
>>A small example based on my code would be fantastic :)
>>
>>Curiously, on my XML file i have 2 days : 05.02.2022 and 06.02.2022, this problem occurs only if i try to insert 1 Day, ex: 07.02.2022, but if i specifie from 05.02.2022 to 07.02.2022, everything work !!??
>>Sincerely, i don´t understand why ?
>>
>>I send you in attachment Zip file for theses 2 days.
>>
>>Best regards,
>>Luis
>>
>>Many thanks,
>
>Hi Lutz,
>
>I understand !
>
>I try this little approach using xmlAdapter:
>
>cFile = "c:\phc24\dossiers.xml"
>adapter = CREATEOBJECT("XMLAdapter")
>adapter.LoadXML(cFile,.T.)
>adapter.tables(1).ToCursor()
>
>But i receive this error:
>Index or experession does not match an existing member of the collection
>
>Sorry and thanks again,
>
>Luis

Luis,
to get rid of all overhead
What does a simple CURSORTOXML()?
XMLTOCURSOR("c:\phc24\dossiers.xml")
If this fails.
#1 Open the XML with a web-browser and see what happens
#2 Try to reduce the XML step by step - remove all records but one, and then field by field.

let me know the result - I can look into the file later on, but those are simple steps.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform