Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dumb xmladapter or Dumb me
Message
De
26/06/2003 14:25:59
 
 
À
25/06/2003 16:45:57
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
00803232
Message ID:
00804366
Vues:
31
>May I email the DATA to you? It is very awkward to deliver the schema and data by way of th UT. I can deliver the schema in this format but I would ha a difficult time with the data.
>

Hi Glenn,

I've not received table schema and data from you.
Any way, have you tried to map the field to binary XML type?
Here is the code that shows how to do this:
CLOSE DATABASES all
CLEAR
SET MEMOWIDTH TO 150

CREATE CURSOR foo (cb c(1) NOCPTRANS)
INSERT INTO foo VALUES (CHR(15))

LOCAL oXA as XMLAdapter, oXF as XMLField

oXA=CREATEOBJECT("XMLAdapter")
oXA.AddTableSchema("foo",.T.)

oXF=oXA.Tables(1).Fields(1)

oXF.XSDtype=""
oXF.IsBinary=.T.
oXF.DisableEncode=.F.

oXA.ToXML("cXml",,.F.)

?cXml

oXA=null
oXF=null

oXA=CREATEOBJECT("XMLAdapter")
oXA.LoadXML(cXml,.F.)

oXF=oXA.Tables(1).Fields(1)

oXF.DataType="C"
oXF.NoCpTrans= .T.
oXF.DisableEncode=.F.

oXA.Tables(1).ToCursor(.F.,"foo1")

SELECT foo1
DISPLAY STRUCTURE 
GO top
?ASC(cb)

return
Does it solve the problem?

Thanks,
Aleksey.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform