Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formatting issue with XML column
Message
From
04/12/2008 12:08:22
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01365487
Message ID:
01365502
Views:
12
Simon,
Do you have any control on .Net side? If yes then you can control formatting of the XML. If not still .Net datasets are easily converted to VFP tables using XMLAdapter class (not XMLToCursor). ie:
oXMLAdapter = Createobject('XMLAdapter')
oXMLAdapter.LoadXML('c:\myfolder\NetDataset.xml',.T.)
For ix=1 To oXMLAdapter.Tables.Count
  oXMLAdapter.Tables.Item(m.ix).ToCursor()
  SELECT (oXMLAdapter.Tables.Item(m.ix).Alias)
  browse
Endfor
For another sample with .Net code + CursorAdapter + Diffgram check:
http://www.fox4um.com/viewtopic.php?id=1177

Site is in Turkish but you would find the codes.

Cetin


>I am trying to display a XML column coming from a SQL 2005 table in the nicely formatted layout that I can see if I open it within SQL Management Studio.
>
>I do not have an XSD file.
>
>I have used SPT to get a table with a single column which is a memo datatype. When I open this, the XML is there, but as text with no line breaks etc, and very difficult to read.
>
>I have tried using XMLTOCURSOR and get parsing errors, but nothing is reported as wrong when I view in SQL.
>
>Are there any ways of viewing this XML in a properly formatted layout, say in an edit box (this is for viewing only by the way).
>
>Thanks
>Simon
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform