Urgent - ADO XML data ending up in single field

I'm really in seriour trouble, running way behind on a
project and have tried everything, I think. I've got to
create reports from data that's stored in a text field
in XML. I get a recordset using ADO then I invoke the
save method on the recordset to generate an XML file.

The problem is the is the file that is saved contains a
number of fields from the same table as well as the
fields from the text field; most of my data is in the
text field and just gets strung together as one field.

I've tried authenicating the ADO XML file using XML Spy
but it gives me error - unable to locate a reference
to a support schema type within document.

This is the file generated by the ADO XML, you can see
where Text starts all those fileds are what I want to
be able to see in the reports but I can't get to them.
I can only see Text as a single field. I've tried
creating several schema files with XML Spy but none
seem to work.

I'm also using Crystal 9 and have tried configuring the
XML driver in Data Island, ADO XML, and Datat Direct
modes. When I take the "Text" field and drag it to the crystal report sheet, it shows me everything: <datamachineID>
343</datamachineID><SequenceNumber>5656</SequenceNumber>...and on. I just want to see datamachine data under one column and sequence number data under one column.

Any help would really be appreciated, I'm in big
trouble these should have been done days ago , it
looked pretty simple on the surface, I'm out of things
to try!!!
<xml xmlns: s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
xmlns:rs='urn:schemas-microsoft-com:rowset'
xmlns:z='#RowsetSchema'>

<s:Schema id='RowsetSchema'>
<s:ElementType name='row' content='eltOnly'>
<s:AttributeType name='Data_Machine_Id' rs:number='1' rs:nullable='true'>
<s:datatype dt:type='int' dt:maxLength='4' rsrecision='10' rs:fixedlength='true'/>
</s:AttributeType>
<s:AttributeType name='Sequence_Number' rs:number='2' rs:nullable='true'>
<s:datatype dt:type='int' dt:maxLength='4' rsrecision='10' rs:fixedlength='true'/>
</s:AttributeType>
<s:AttributeType name='Client_Id' rs:number='3' rs:nullable='true' rs:write='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='23'/>
</s:AttributeType>
<s:AttributeType name='Contact_Number' rs:number='4' rs:nullable='true' rs:write='true'>
<s:datatype dt:type='i2' dt:maxLength='2' rsrecision='5' rs:fixedlength='true'/>
</s:AttributeType>
<s:AttributeType name='Text' rs:number='5' rs:nullable='true' rs:maydefer='true' rs:write='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='65500' rs:long='true'/>
</s:AttributeType>
<s:extends type='rs:rowbase'/>
</s:ElementType>
</s:Schema>

<rs:data>
<z:row Data_Machine_Id='1036934551' Sequence_Number='21242' Client_Id='020826025612475385043C' Contact_Number='1'
Text='<Row><DataMachineID>100797316</DataMachineID><SeqNum>8064</SeqNum><NoteHeader>Project Plan</NoteHeader><Contact>Shauna Butchereit</Contact><Company>CIBC - NaSCo - National Support &amp; Consulting</Company><User>BOLES</User><BusUnit></BusUnit><AppointmentDate>January 13, 2003</AppointmentDate><AppointmentTime>09:00 AM</AppointmentTime><AttendeesIDs></AttendeesIDs><CallType>Service Call</CallType><ProductsDiscussed></ProductsDiscussed><PromotionsDiscussed></PromotionsDiscussed><Conversation></Conversation><NextStep></NextStep><ApptID>100797316:8064</ApptID><HotlistIDs></HotlistIDs><IssueIDs></IssueIDs><OppID></OppID><OppNum></OppNum><OppDesc></OppDesc></Row>'/>
<z:row Data_Machine_Id='1036934551' Sequence_Number='28213' Client_Id='020424021472475385043C' Contact_Number='8'

<rs:data>
</xml>

[4405 byte] By [hpannu] at [2008-1-22]
# 1
How are you saving this XML to disk? The following attribute is not well formed:
Text='<Row><DataMachineID

This will need to be written by an XML Document object so that the special caracters are all escaped, for example '<' should be &lt; and so on.

Text='&lt;Row>&lt;DataMachineID...

ChrisLovett at 2007-8-21 > top of Msdn Tech,.NET Development,XML and the .NET Framework...
# 2
That what I wanted to know..how to save on a disk. On XML spy using .XML file when

I check the well-formedness, it says it is "well-formed" but when i validate the file it

gives me this error:

"Unable to locate a reference to a supported schema type(DTD, W3c Schema)

within this document instance".
I made a XML Schema file, So how do i give a reference to my schema from the XML file.

So I added this but still it gives me a error:

<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'

xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'

xmlns:rs='urn:schemas-microsoft-com:rowset'

xmlns:z='#RowsetSchema'

xsi:schemaLocation="http://my-company.com/namespace

\\SBS03\Users\hpannu\MYDOCU~1\harman\ReportGenerator\NEWFOL~1\xSCR.xsd">
<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'

xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'

xmlns:rs='urn:schemas-microsoft-com:rowset'

xmlns:z='#RowsetSchema'>
<s:Schema id='RowsetSchema'>

<s:ElementType name='row' content='eltOnly'>

<s:AttributeType name='Data_Machine_Id' rs:number='1' rs:nullable='true'>

<s:datatype dt:type='int' dt:maxLength='4' rs:precision='10' rs:fixedlength='true'/

</s:AttributeType>

<s:AttributeType name='Sequence_Number' rs:number='2' rs:nullable='true'>

<s:datatype dt:type='int' dt:maxLength='4' rs:precision='10' rs:fixedlength='true'/

</s:AttributeType>

<s:AttributeType name='Client_Id' rs:number='3' rs:nullable='true' rs:write='true'>

<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='23'/>

</s:AttributeType>

<s:AttributeType name='Contact_Number' rs:number='4' rs:nullable='true' rs:write='true'>

<s:datatype dt:type='i2' dt:maxLength='2' rs:precision='5' rs:fixedlength='true'/>

</s:AttributeType>

<s:AttributeType name='Text' rs:number='5' rs:nullable='true' rs:maydefer='true' rs:write='true'>

<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='65500' rs:long='true'/>

</s:AttributeType>

<s:extends type='rs:rowbase'/>

</s:ElementType>
</s:Schema>

<rs:data>

<z:row Data_Machine_Id='1036934551' Sequence_Number='21242' Client_Id='020826025612475385043C' Contact_Number='1'
Text='&#x3c;Row&#x3e;&#x3c;DataMachineID&#x3e;100797316&#x3c;/

DataMachineID&#x3e;&#x3c;SeqNum&#x3e;8064&#x3c;/SeqNum&#x3e;&#x3c;

NoteHeader&#x3e;Project Plan&#x3c;/NoteHeader&#x3e;&#x3c;Contact&#x3e;Shauna

Butchereit&#x3c;/Contact&#x3e;&#x3c;Company&#x3e;CIBC - NaSCo - National

Support &#x26;amp; Consulting&#x3c;/Company&#x3e;&#x3c;User&#x3e;

BOLES&#x3c;/User&#x3e;&#x3c;BusUnit&#x3e;&#x3c;/BusUnit&#x3e;&#x3c;

AppointmentDate&#x3e;January 13, 2003&#x3c;/AppointmentDate&#x3e;&#x3c;

AppointmentTime&#x3e;09:00 AM&#x3c;/AppointmentTime&#x3e;&#x3c;

AttendeesIDs&#x3e;&#x3c;/AttendeesIDs&#x3e;&#x3c;CallType&#x3e;Service

Call&#x3c;/CallType&#x3e;&#x3c;ProductsDiscussed&#x3e;&#x3c;/

ProductsDiscussed&#x3e;&#x3c;PromotionsDiscussed&#x3e;&#x3c;/

PromotionsDiscussed&#x3e;&#x3c;Conversation&#x3e;&#x3c;/Conversation&#x3e;

&#x3c;NextStep&#x3e;&#x3c;/NextStep&#x3e;&#x3c;ApptID&#x3e;100797316:

8064&#x3c;/ApptID&#x3e;&#x3c;HotlistIDs&#x3e;&#x3c;/HotlistIDs&#x3e;&#x3c;

IssueIDs&#x3e;&#x3c;/IssueIDs&#x3e;&#x3c;OppID&#x3e;&#x3c;/OppID&#x3e;

&#x3c;OppNum&#x3e;&#x3c;/OppNum&#x3e;&#x3c;OppDesc&#x3e;&#x3c;/

OppDesc&#x3e;&#x3c;/Row&#x3e;'/>

hpannu at 2007-8-21 > top of Msdn Tech,.NET Development,XML and the .NET Framework...
# 3
This is attribute is a pointer to a schema for the namespace http://my-company.com/namespace.

xsi:schemaLocation="http://my-company.com/namespace
\\SBS03\Users\hpannu\MYDOCU~1\harman\ReportGenerator\NEWFOL~1\xSCR.xsd"

Now this is not much use in this case because the data in your document doesn't use this namespace, so you can delete this. Perhaps XML Spy put this there?

ChrisLovett at 2007-8-21 > top of Msdn Tech,.NET Development,XML and the .NET Framework...
# 4
So how come I still get this error "Unable to locate a reference to a supported schema

type(DTD, W3c Schema) within this document instance". when I Validate the file.
What this XML file is doing is it is saving all the data in a TEXT field. When I open this

xml file in Crystal report and display the TEXT field, It displays all the data example:

<datamachineID>100797316</datamachineID><SeqNum>8064</SeqNum>.......

But I want to display the data like this and I want to choose my own columns:

datamachineID SeqNum and on....

100797316 8064

hpannu at 2007-8-21 > top of Msdn Tech,.NET Development,XML and the .NET Framework...

.NET Development

Site Classified