Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dumb xmladapter or Dumb me
Message
From
26/06/2003 14:25:59
 
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00803232
Message ID:
00804366
Views:
30
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform