Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with XMLAdapter ToCursor method
Message
De
14/02/2008 17:32:32
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Titre:
Problem with XMLAdapter ToCursor method
Divers
Thread ID:
01292823
Message ID:
01292823
Vues:
103
I am trying to get some XML data into a cursor. I create an XMLAdapter object using something like this:

cxml='res.xml'
o = NEWOBJECT('XMLAdapter')
IF VARTYPE(o)='O'
x=o.LoadXML(cXML,.t.)
o.Tables(1).ToCursor()
endif

This produces an error on the line o.tables(1).ToCursor() -> "Index or expression does not match an existing member of the collection". When I examine the object o the tables collection is empty. I have never worked with XMLAdapter before and the help is somewhat lacking. There is no XSD file and the XML data looks like this -(Sorry the XML is so ugly- it is incredibly difficult to post XML data here.)
<Contract><Codes><Code PaymentDueDate="2008/02/21" DeliveredDate="" DeliveredUser=" "RetrievedDate="">121313</Code>
<Code PaymentDueDate="2008/02/28" DeliveredDate="" DeliveredUser="" RetrievedDate="">121443</Code>
<Code PaymentDueDate="2008/03/06" DeliveredDate="" DeliveredUser="" RetrievedDate="">423112</Code>
<Code PaymentDueDate="2008/03/13" DeliveredDate="" DeliveredUser="" RetrievedDate="">423344</Code>
<Code PaymentDueDate="2008/03/20" DeliveredDate="" DeliveredUser="" RetrievedDate="">122132</Code>
<Code PaymentDueDate="2008/03/27" DeliveredDate="" DeliveredUser="" RetrievedDate="">341111</Code>
</Codes><ResetCode>324442</ResetCode></Contract>
Can anyone point me in the right direction... Thanks!
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform